command

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Type_name = map[int32]string{
		0:  "COMMAND_TYPE_METADATA_SET",
		1:  "COMMAND_TYPE_METADATA_DELETE",
		2:  "COMMAND_TYPE_NOOP",
		3:  "COMMAND_TYPE_ENFORCE_REQUEST",
		4:  "COMMAND_TYPE_ADD_POLICIES",
		5:  "COMMAND_TYPE_REMOVE_POLICIES",
		6:  "COMMAND_TYPE_REMOVE_FILTERED_POLICY",
		7:  "COMMAND_TYPE_UPDATE_POLICIES",
		8:  "COMMAND_TYPE_CLEAR_POLICY",
		9:  "COMMAND_TYPE_SET_MODEL",
		10: "COMMAND_TYPE_CREATE_NAMESPACE",
		11: "COMMAND_TYPE_LIST_NAMESPACES",
		12: "COMMAND_TYPE_PRINT_MODEL",
		13: "COMMAND_TYPE_LIST_POLICIES",
	}
	Type_value = map[string]int32{
		"COMMAND_TYPE_METADATA_SET":           0,
		"COMMAND_TYPE_METADATA_DELETE":        1,
		"COMMAND_TYPE_NOOP":                   2,
		"COMMAND_TYPE_ENFORCE_REQUEST":        3,
		"COMMAND_TYPE_ADD_POLICIES":           4,
		"COMMAND_TYPE_REMOVE_POLICIES":        5,
		"COMMAND_TYPE_REMOVE_FILTERED_POLICY": 6,
		"COMMAND_TYPE_UPDATE_POLICIES":        7,
		"COMMAND_TYPE_CLEAR_POLICY":           8,
		"COMMAND_TYPE_SET_MODEL":              9,
		"COMMAND_TYPE_CREATE_NAMESPACE":       10,
		"COMMAND_TYPE_LIST_NAMESPACES":        11,
		"COMMAND_TYPE_PRINT_MODEL":            12,
		"COMMAND_TYPE_LIST_POLICIES":          13,
	}
)

Enum value maps for Type.

View Source
var (
	EnforcePayload_Level_name = map[int32]string{
		0: "QUERY_REQUEST_LEVEL_NONE",
		1: "QUERY_REQUEST_LEVEL_WEAK",
		2: "QUERY_REQUEST_LEVEL_STRONG",
	}
	EnforcePayload_Level_value = map[string]int32{
		"QUERY_REQUEST_LEVEL_NONE":   0,
		"QUERY_REQUEST_LEVEL_WEAK":   1,
		"QUERY_REQUEST_LEVEL_STRONG": 2,
	}
)

Enum value maps for EnforcePayload_Level.

View Source
var CasbinMesh_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "command.CasbinMesh",
	HandlerType: (*CasbinMeshServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ShowStats",
			Handler:    _CasbinMesh_ShowStats_Handler,
		},
		{
			MethodName: "ListNamespaces",
			Handler:    _CasbinMesh_ListNamespaces_Handler,
		},
		{
			MethodName: "PrintModel",
			Handler:    _CasbinMesh_PrintModel_Handler,
		},
		{
			MethodName: "ListPolicies",
			Handler:    _CasbinMesh_ListPolicies_Handler,
		},
		{
			MethodName: "Request",
			Handler:    _CasbinMesh_Request_Handler,
		},
		{
			MethodName: "Enforce",
			Handler:    _CasbinMesh_Enforce_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "command.proto",
}

CasbinMesh_ServiceDesc is the grpc.ServiceDesc for CasbinMesh service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_command_proto protoreflect.FileDescriptor

Functions

func RegisterCasbinMeshServer

func RegisterCasbinMeshServer(s grpc.ServiceRegistrar, srv CasbinMeshServer)

func ToInterfaces

func ToInterfaces(input [][]byte) []interface{}

func ToStringArray

func ToStringArray(input []*StringArray) [][]string

Types

type AddPoliciesPayload

type AddPoliciesPayload struct {
	Sec   string         `protobuf:"bytes,1,opt,name=sec,proto3" json:"sec,omitempty"`
	PType string         `protobuf:"bytes,2,opt,name=pType,proto3" json:"pType,omitempty"`
	Rules []*StringArray `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

func (*AddPoliciesPayload) Descriptor deprecated

func (*AddPoliciesPayload) Descriptor() ([]byte, []int)

Deprecated: Use AddPoliciesPayload.ProtoReflect.Descriptor instead.

func (*AddPoliciesPayload) GetPType

func (x *AddPoliciesPayload) GetPType() string

func (*AddPoliciesPayload) GetRules

func (x *AddPoliciesPayload) GetRules() []*StringArray

func (*AddPoliciesPayload) GetSec

func (x *AddPoliciesPayload) GetSec() string

func (*AddPoliciesPayload) ProtoMessage

func (*AddPoliciesPayload) ProtoMessage()

func (*AddPoliciesPayload) ProtoReflect

func (x *AddPoliciesPayload) ProtoReflect() protoreflect.Message

func (*AddPoliciesPayload) Reset

func (x *AddPoliciesPayload) Reset()

func (*AddPoliciesPayload) String

func (x *AddPoliciesPayload) String() string

type CasbinMeshClient

type CasbinMeshClient interface {
	ShowStats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsResponse, error)
	ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error)
	PrintModel(ctx context.Context, in *PrintModelRequest, opts ...grpc.CallOption) (*PrintModelResponse, error)
	ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error)
	Request(ctx context.Context, in *Command, opts ...grpc.CallOption) (*Response, error)
	Enforce(ctx context.Context, in *EnforceRequest, opts ...grpc.CallOption) (*EnforceResponse, error)
}

CasbinMeshClient is the client API for CasbinMesh service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewCasbinMeshClient

func NewCasbinMeshClient(cc grpc.ClientConnInterface) CasbinMeshClient

type CasbinMeshServer

type CasbinMeshServer interface {
	ShowStats(context.Context, *StatsRequest) (*StatsResponse, error)
	ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error)
	PrintModel(context.Context, *PrintModelRequest) (*PrintModelResponse, error)
	ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error)
	Request(context.Context, *Command) (*Response, error)
	Enforce(context.Context, *EnforceRequest) (*EnforceResponse, error)
	// contains filtered or unexported methods
}

CasbinMeshServer is the server API for CasbinMesh service. All implementations must embed UnimplementedCasbinMeshServer for forward compatibility

type Command

type Command struct {
	Type Type `protobuf:"varint,1,opt,name=type,proto3,enum=command.Type" json:"type,omitempty"`
	// namespace
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// payload
	Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	// metadata
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Command) Descriptor deprecated

func (*Command) Descriptor() ([]byte, []int)

Deprecated: Use Command.ProtoReflect.Descriptor instead.

func (*Command) GetMetadata

func (x *Command) GetMetadata() map[string]string

func (*Command) GetNamespace

func (x *Command) GetNamespace() string

func (*Command) GetPayload

func (x *Command) GetPayload() []byte

func (*Command) GetType

func (x *Command) GetType() Type

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) ProtoReflect

func (x *Command) ProtoReflect() protoreflect.Message

func (*Command) Reset

func (x *Command) Reset()

func (*Command) String

func (x *Command) String() string

type EnforcePayload

type EnforcePayload struct {
	B         [][]byte             `protobuf:"bytes,1,rep,name=b,proto3" json:"b,omitempty"`
	Timings   bool                 `protobuf:"varint,2,opt,name=timings,proto3" json:"timings,omitempty"`
	Level     EnforcePayload_Level `protobuf:"varint,3,opt,name=level,proto3,enum=command.EnforcePayload_Level" json:"level,omitempty"`
	Freshness int64                `protobuf:"varint,4,opt,name=freshness,proto3" json:"freshness,omitempty"`
	// contains filtered or unexported fields
}

func (*EnforcePayload) Descriptor deprecated

func (*EnforcePayload) Descriptor() ([]byte, []int)

Deprecated: Use EnforcePayload.ProtoReflect.Descriptor instead.

func (*EnforcePayload) GetB

func (x *EnforcePayload) GetB() [][]byte

func (*EnforcePayload) GetFreshness

func (x *EnforcePayload) GetFreshness() int64

func (*EnforcePayload) GetLevel

func (x *EnforcePayload) GetLevel() EnforcePayload_Level

func (*EnforcePayload) GetTimings

func (x *EnforcePayload) GetTimings() bool

func (*EnforcePayload) ProtoMessage

func (*EnforcePayload) ProtoMessage()

func (*EnforcePayload) ProtoReflect

func (x *EnforcePayload) ProtoReflect() protoreflect.Message

func (*EnforcePayload) Reset

func (x *EnforcePayload) Reset()

func (*EnforcePayload) String

func (x *EnforcePayload) String() string

type EnforcePayload_Level

type EnforcePayload_Level int32
const (
	EnforcePayload_QUERY_REQUEST_LEVEL_NONE   EnforcePayload_Level = 0
	EnforcePayload_QUERY_REQUEST_LEVEL_WEAK   EnforcePayload_Level = 1
	EnforcePayload_QUERY_REQUEST_LEVEL_STRONG EnforcePayload_Level = 2
)

func (EnforcePayload_Level) Descriptor

func (EnforcePayload_Level) Enum

func (EnforcePayload_Level) EnumDescriptor deprecated

func (EnforcePayload_Level) EnumDescriptor() ([]byte, []int)

Deprecated: Use EnforcePayload_Level.Descriptor instead.

func (EnforcePayload_Level) Number

func (EnforcePayload_Level) String

func (x EnforcePayload_Level) String() string

func (EnforcePayload_Level) Type

type EnforceRequest

type EnforceRequest struct {
	Namespace string          `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Payload   *EnforcePayload `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*EnforceRequest) Descriptor deprecated

func (*EnforceRequest) Descriptor() ([]byte, []int)

Deprecated: Use EnforceRequest.ProtoReflect.Descriptor instead.

func (*EnforceRequest) GetNamespace

func (x *EnforceRequest) GetNamespace() string

func (*EnforceRequest) GetPayload

func (x *EnforceRequest) GetPayload() *EnforcePayload

func (*EnforceRequest) ProtoMessage

func (*EnforceRequest) ProtoMessage()

func (*EnforceRequest) ProtoReflect

func (x *EnforceRequest) ProtoReflect() protoreflect.Message

func (*EnforceRequest) Reset

func (x *EnforceRequest) Reset()

func (*EnforceRequest) String

func (x *EnforceRequest) String() string

type EnforceResponse

type EnforceResponse struct {
	Ok    bool   `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*EnforceResponse) Descriptor deprecated

func (*EnforceResponse) Descriptor() ([]byte, []int)

Deprecated: Use EnforceResponse.ProtoReflect.Descriptor instead.

func (*EnforceResponse) GetError

func (x *EnforceResponse) GetError() string

func (*EnforceResponse) GetOk

func (x *EnforceResponse) GetOk() bool

func (*EnforceResponse) ProtoMessage

func (*EnforceResponse) ProtoMessage()

func (*EnforceResponse) ProtoReflect

func (x *EnforceResponse) ProtoReflect() protoreflect.Message

func (*EnforceResponse) Reset

func (x *EnforceResponse) Reset()

func (*EnforceResponse) String

func (x *EnforceResponse) String() string

type ListNamespacesRequest

type ListNamespacesRequest struct {
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ListNamespacesRequest) Descriptor deprecated

func (*ListNamespacesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListNamespacesRequest.ProtoReflect.Descriptor instead.

func (*ListNamespacesRequest) GetMetadata

func (x *ListNamespacesRequest) GetMetadata() map[string]string

func (*ListNamespacesRequest) ProtoMessage

func (*ListNamespacesRequest) ProtoMessage()

func (*ListNamespacesRequest) ProtoReflect

func (x *ListNamespacesRequest) ProtoReflect() protoreflect.Message

func (*ListNamespacesRequest) Reset

func (x *ListNamespacesRequest) Reset()

func (*ListNamespacesRequest) String

func (x *ListNamespacesRequest) String() string

type ListNamespacesResponse

type ListNamespacesResponse struct {
	Error     string   `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	Namespace []string `protobuf:"bytes,2,rep,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*ListNamespacesResponse) Descriptor deprecated

func (*ListNamespacesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListNamespacesResponse.ProtoReflect.Descriptor instead.

func (*ListNamespacesResponse) GetError

func (x *ListNamespacesResponse) GetError() string

func (*ListNamespacesResponse) GetNamespace

func (x *ListNamespacesResponse) GetNamespace() []string

func (*ListNamespacesResponse) ProtoMessage

func (*ListNamespacesResponse) ProtoMessage()

func (*ListNamespacesResponse) ProtoReflect

func (x *ListNamespacesResponse) ProtoReflect() protoreflect.Message

func (*ListNamespacesResponse) Reset

func (x *ListNamespacesResponse) Reset()

func (*ListNamespacesResponse) String

func (x *ListNamespacesResponse) String() string

type ListPoliciesPayload

type ListPoliciesPayload struct {
	Cursor  string `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"`
	Skip    int64  `protobuf:"varint,2,opt,name=skip,proto3" json:"skip,omitempty"`
	Limit   int64  `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	Reverse bool   `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPoliciesPayload) Descriptor deprecated

func (*ListPoliciesPayload) Descriptor() ([]byte, []int)

Deprecated: Use ListPoliciesPayload.ProtoReflect.Descriptor instead.

func (*ListPoliciesPayload) GetCursor

func (x *ListPoliciesPayload) GetCursor() string

func (*ListPoliciesPayload) GetLimit

func (x *ListPoliciesPayload) GetLimit() int64

func (*ListPoliciesPayload) GetReverse

func (x *ListPoliciesPayload) GetReverse() bool

func (*ListPoliciesPayload) GetSkip

func (x *ListPoliciesPayload) GetSkip() int64

func (*ListPoliciesPayload) ProtoMessage

func (*ListPoliciesPayload) ProtoMessage()

func (*ListPoliciesPayload) ProtoReflect

func (x *ListPoliciesPayload) ProtoReflect() protoreflect.Message

func (*ListPoliciesPayload) Reset

func (x *ListPoliciesPayload) Reset()

func (*ListPoliciesPayload) String

func (x *ListPoliciesPayload) String() string

type ListPoliciesRequest

type ListPoliciesRequest struct {
	Metadata  map[string]string `` /* 157-byte string literal not displayed */
	Namespace string            `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPoliciesRequest) Descriptor deprecated

func (*ListPoliciesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListPoliciesRequest.ProtoReflect.Descriptor instead.

func (*ListPoliciesRequest) GetMetadata

func (x *ListPoliciesRequest) GetMetadata() map[string]string

func (*ListPoliciesRequest) GetNamespace

func (x *ListPoliciesRequest) GetNamespace() string

func (*ListPoliciesRequest) ProtoMessage

func (*ListPoliciesRequest) ProtoMessage()

func (*ListPoliciesRequest) ProtoReflect

func (x *ListPoliciesRequest) ProtoReflect() protoreflect.Message

func (*ListPoliciesRequest) Reset

func (x *ListPoliciesRequest) Reset()

func (*ListPoliciesRequest) String

func (x *ListPoliciesRequest) String() string

type ListPoliciesResponse

type ListPoliciesResponse struct {
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	Policies []*StringArray    `protobuf:"bytes,2,rep,name=policies,proto3" json:"policies,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPoliciesResponse) Descriptor deprecated

func (*ListPoliciesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListPoliciesResponse.ProtoReflect.Descriptor instead.

func (*ListPoliciesResponse) GetMetadata

func (x *ListPoliciesResponse) GetMetadata() map[string]string

func (*ListPoliciesResponse) GetPolicies

func (x *ListPoliciesResponse) GetPolicies() []*StringArray

func (*ListPoliciesResponse) ProtoMessage

func (*ListPoliciesResponse) ProtoMessage()

func (*ListPoliciesResponse) ProtoReflect

func (x *ListPoliciesResponse) ProtoReflect() protoreflect.Message

func (*ListPoliciesResponse) Reset

func (x *ListPoliciesResponse) Reset()

func (*ListPoliciesResponse) String

func (x *ListPoliciesResponse) String() string

type MetadataDelete

type MetadataDelete struct {
	RaftId string `protobuf:"bytes,1,opt,name=raft_id,json=raftId,proto3" json:"raft_id,omitempty"`
	// contains filtered or unexported fields
}

func (*MetadataDelete) Descriptor deprecated

func (*MetadataDelete) Descriptor() ([]byte, []int)

Deprecated: Use MetadataDelete.ProtoReflect.Descriptor instead.

func (*MetadataDelete) GetRaftId

func (x *MetadataDelete) GetRaftId() string

func (*MetadataDelete) ProtoMessage

func (*MetadataDelete) ProtoMessage()

func (*MetadataDelete) ProtoReflect

func (x *MetadataDelete) ProtoReflect() protoreflect.Message

func (*MetadataDelete) Reset

func (x *MetadataDelete) Reset()

func (*MetadataDelete) String

func (x *MetadataDelete) String() string

type MetadataSet

type MetadataSet struct {
	RaftId string            `protobuf:"bytes,1,opt,name=raft_id,json=raftId,proto3" json:"raft_id,omitempty"`
	Data   map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MetadataSet) Descriptor deprecated

func (*MetadataSet) Descriptor() ([]byte, []int)

Deprecated: Use MetadataSet.ProtoReflect.Descriptor instead.

func (*MetadataSet) GetData

func (x *MetadataSet) GetData() map[string]string

func (*MetadataSet) GetRaftId

func (x *MetadataSet) GetRaftId() string

func (*MetadataSet) ProtoMessage

func (*MetadataSet) ProtoMessage()

func (*MetadataSet) ProtoReflect

func (x *MetadataSet) ProtoReflect() protoreflect.Message

func (*MetadataSet) Reset

func (x *MetadataSet) Reset()

func (*MetadataSet) String

func (x *MetadataSet) String() string

type PrintModelRequest

type PrintModelRequest struct {
	Metadata  map[string]string `` /* 157-byte string literal not displayed */
	Namespace string            `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*PrintModelRequest) Descriptor deprecated

func (*PrintModelRequest) Descriptor() ([]byte, []int)

Deprecated: Use PrintModelRequest.ProtoReflect.Descriptor instead.

func (*PrintModelRequest) GetMetadata

func (x *PrintModelRequest) GetMetadata() map[string]string

func (*PrintModelRequest) GetNamespace

func (x *PrintModelRequest) GetNamespace() string

func (*PrintModelRequest) ProtoMessage

func (*PrintModelRequest) ProtoMessage()

func (*PrintModelRequest) ProtoReflect

func (x *PrintModelRequest) ProtoReflect() protoreflect.Message

func (*PrintModelRequest) Reset

func (x *PrintModelRequest) Reset()

func (*PrintModelRequest) String

func (x *PrintModelRequest) String() string

type PrintModelResponse

type PrintModelResponse struct {
	Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"`
	// contains filtered or unexported fields
}

func (*PrintModelResponse) Descriptor deprecated

func (*PrintModelResponse) Descriptor() ([]byte, []int)

Deprecated: Use PrintModelResponse.ProtoReflect.Descriptor instead.

func (*PrintModelResponse) GetError

func (x *PrintModelResponse) GetError() string

func (*PrintModelResponse) GetModel

func (x *PrintModelResponse) GetModel() string

func (*PrintModelResponse) ProtoMessage

func (*PrintModelResponse) ProtoMessage()

func (*PrintModelResponse) ProtoReflect

func (x *PrintModelResponse) ProtoReflect() protoreflect.Message

func (*PrintModelResponse) Reset

func (x *PrintModelResponse) Reset()

func (*PrintModelResponse) String

func (x *PrintModelResponse) String() string

type RemoveFilteredPolicyPayload

type RemoveFilteredPolicyPayload struct {
	Sec         string   `protobuf:"bytes,1,opt,name=sec,proto3" json:"sec,omitempty"`
	PType       string   `protobuf:"bytes,2,opt,name=pType,proto3" json:"pType,omitempty"`
	FieldIndex  int32    `protobuf:"varint,3,opt,name=fieldIndex,proto3" json:"fieldIndex,omitempty"`
	FieldValues []string `protobuf:"bytes,4,rep,name=fieldValues,proto3" json:"fieldValues,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoveFilteredPolicyPayload) Descriptor deprecated

func (*RemoveFilteredPolicyPayload) Descriptor() ([]byte, []int)

Deprecated: Use RemoveFilteredPolicyPayload.ProtoReflect.Descriptor instead.

func (*RemoveFilteredPolicyPayload) GetFieldIndex

func (x *RemoveFilteredPolicyPayload) GetFieldIndex() int32

func (*RemoveFilteredPolicyPayload) GetFieldValues

func (x *RemoveFilteredPolicyPayload) GetFieldValues() []string

func (*RemoveFilteredPolicyPayload) GetPType

func (x *RemoveFilteredPolicyPayload) GetPType() string

func (*RemoveFilteredPolicyPayload) GetSec

func (x *RemoveFilteredPolicyPayload) GetSec() string

func (*RemoveFilteredPolicyPayload) ProtoMessage

func (*RemoveFilteredPolicyPayload) ProtoMessage()

func (*RemoveFilteredPolicyPayload) ProtoReflect

func (*RemoveFilteredPolicyPayload) Reset

func (x *RemoveFilteredPolicyPayload) Reset()

func (*RemoveFilteredPolicyPayload) String

func (x *RemoveFilteredPolicyPayload) String() string

type RemovePoliciesPayload

type RemovePoliciesPayload struct {
	Sec   string         `protobuf:"bytes,1,opt,name=sec,proto3" json:"sec,omitempty"`
	PType string         `protobuf:"bytes,2,opt,name=pType,proto3" json:"pType,omitempty"`
	Rules []*StringArray `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

func (*RemovePoliciesPayload) Descriptor deprecated

func (*RemovePoliciesPayload) Descriptor() ([]byte, []int)

Deprecated: Use RemovePoliciesPayload.ProtoReflect.Descriptor instead.

func (*RemovePoliciesPayload) GetPType

func (x *RemovePoliciesPayload) GetPType() string

func (*RemovePoliciesPayload) GetRules

func (x *RemovePoliciesPayload) GetRules() []*StringArray

func (*RemovePoliciesPayload) GetSec

func (x *RemovePoliciesPayload) GetSec() string

func (*RemovePoliciesPayload) ProtoMessage

func (*RemovePoliciesPayload) ProtoMessage()

func (*RemovePoliciesPayload) ProtoReflect

func (x *RemovePoliciesPayload) ProtoReflect() protoreflect.Message

func (*RemovePoliciesPayload) Reset

func (x *RemovePoliciesPayload) Reset()

func (*RemovePoliciesPayload) String

func (x *RemovePoliciesPayload) String() string

type Response

type Response struct {
	Error         string         `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	EffectedRules []*StringArray `protobuf:"bytes,2,rep,name=effectedRules,proto3" json:"effectedRules,omitempty"`
	Effected      bool           `protobuf:"varint,3,opt,name=effected,proto3" json:"effected,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetEffected

func (x *Response) GetEffected() bool

func (*Response) GetEffectedRules

func (x *Response) GetEffectedRules() []*StringArray

func (*Response) GetError

func (x *Response) GetError() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type SetModelFromString

type SetModelFromString struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*SetModelFromString) Descriptor deprecated

func (*SetModelFromString) Descriptor() ([]byte, []int)

Deprecated: Use SetModelFromString.ProtoReflect.Descriptor instead.

func (*SetModelFromString) GetText

func (x *SetModelFromString) GetText() string

func (*SetModelFromString) ProtoMessage

func (*SetModelFromString) ProtoMessage()

func (*SetModelFromString) ProtoReflect

func (x *SetModelFromString) ProtoReflect() protoreflect.Message

func (*SetModelFromString) Reset

func (x *SetModelFromString) Reset()

func (*SetModelFromString) String

func (x *SetModelFromString) String() string

type StatsRequest

type StatsRequest struct {
	// contains filtered or unexported fields
}

func (*StatsRequest) Descriptor deprecated

func (*StatsRequest) Descriptor() ([]byte, []int)

Deprecated: Use StatsRequest.ProtoReflect.Descriptor instead.

func (*StatsRequest) ProtoMessage

func (*StatsRequest) ProtoMessage()

func (*StatsRequest) ProtoReflect

func (x *StatsRequest) ProtoReflect() protoreflect.Message

func (*StatsRequest) Reset

func (x *StatsRequest) Reset()

func (*StatsRequest) String

func (x *StatsRequest) String() string

type StatsResponse

type StatsResponse struct {
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*StatsResponse) Descriptor deprecated

func (*StatsResponse) Descriptor() ([]byte, []int)

Deprecated: Use StatsResponse.ProtoReflect.Descriptor instead.

func (*StatsResponse) GetPayload

func (x *StatsResponse) GetPayload() []byte

func (*StatsResponse) ProtoMessage

func (*StatsResponse) ProtoMessage()

func (*StatsResponse) ProtoReflect

func (x *StatsResponse) ProtoReflect() protoreflect.Message

func (*StatsResponse) Reset

func (x *StatsResponse) Reset()

func (*StatsResponse) String

func (x *StatsResponse) String() string

type StringArray

type StringArray struct {
	S []string `protobuf:"bytes,1,rep,name=s,proto3" json:"s,omitempty"`
	// contains filtered or unexported fields
}

func NewStringArray

func NewStringArray(input [][]string) []*StringArray

func (*StringArray) Descriptor deprecated

func (*StringArray) Descriptor() ([]byte, []int)

Deprecated: Use StringArray.ProtoReflect.Descriptor instead.

func (*StringArray) GetS

func (x *StringArray) GetS() []string

func (*StringArray) ProtoMessage

func (*StringArray) ProtoMessage()

func (*StringArray) ProtoReflect

func (x *StringArray) ProtoReflect() protoreflect.Message

func (*StringArray) Reset

func (x *StringArray) Reset()

func (*StringArray) String

func (x *StringArray) String() string

type Type

type Type int32
const (
	Type_COMMAND_TYPE_METADATA_SET           Type = 0
	Type_COMMAND_TYPE_METADATA_DELETE        Type = 1
	Type_COMMAND_TYPE_NOOP                   Type = 2
	Type_COMMAND_TYPE_ENFORCE_REQUEST        Type = 3
	Type_COMMAND_TYPE_ADD_POLICIES           Type = 4
	Type_COMMAND_TYPE_REMOVE_POLICIES        Type = 5
	Type_COMMAND_TYPE_REMOVE_FILTERED_POLICY Type = 6
	Type_COMMAND_TYPE_UPDATE_POLICIES        Type = 7
	Type_COMMAND_TYPE_CLEAR_POLICY           Type = 8
	Type_COMMAND_TYPE_SET_MODEL              Type = 9
	Type_COMMAND_TYPE_CREATE_NAMESPACE       Type = 10
	Type_COMMAND_TYPE_LIST_NAMESPACES        Type = 11
	Type_COMMAND_TYPE_PRINT_MODEL            Type = 12
	Type_COMMAND_TYPE_LIST_POLICIES          Type = 13
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

func (Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

type UnimplementedCasbinMeshServer

type UnimplementedCasbinMeshServer struct {
}

UnimplementedCasbinMeshServer must be embedded to have forward compatible implementations.

func (UnimplementedCasbinMeshServer) Enforce

func (UnimplementedCasbinMeshServer) ListNamespaces

func (UnimplementedCasbinMeshServer) ListPolicies

func (UnimplementedCasbinMeshServer) PrintModel

func (UnimplementedCasbinMeshServer) Request

func (UnimplementedCasbinMeshServer) ShowStats

type UnsafeCasbinMeshServer

type UnsafeCasbinMeshServer interface {
	// contains filtered or unexported methods
}

UnsafeCasbinMeshServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CasbinMeshServer will result in compilation errors.

type UpdatePoliciesPayload

type UpdatePoliciesPayload struct {
	Sec      string         `protobuf:"bytes,1,opt,name=sec,proto3" json:"sec,omitempty"`
	PType    string         `protobuf:"bytes,2,opt,name=pType,proto3" json:"pType,omitempty"`
	NewRules []*StringArray `protobuf:"bytes,3,rep,name=newRules,proto3" json:"newRules,omitempty"`
	OldRules []*StringArray `protobuf:"bytes,4,rep,name=oldRules,proto3" json:"oldRules,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePoliciesPayload) Descriptor deprecated

func (*UpdatePoliciesPayload) Descriptor() ([]byte, []int)

Deprecated: Use UpdatePoliciesPayload.ProtoReflect.Descriptor instead.

func (*UpdatePoliciesPayload) GetNewRules

func (x *UpdatePoliciesPayload) GetNewRules() []*StringArray

func (*UpdatePoliciesPayload) GetOldRules

func (x *UpdatePoliciesPayload) GetOldRules() []*StringArray

func (*UpdatePoliciesPayload) GetPType

func (x *UpdatePoliciesPayload) GetPType() string

func (*UpdatePoliciesPayload) GetSec

func (x *UpdatePoliciesPayload) GetSec() string

func (*UpdatePoliciesPayload) ProtoMessage

func (*UpdatePoliciesPayload) ProtoMessage()

func (*UpdatePoliciesPayload) ProtoReflect

func (x *UpdatePoliciesPayload) ProtoReflect() protoreflect.Message

func (*UpdatePoliciesPayload) Reset

func (x *UpdatePoliciesPayload) Reset()

func (*UpdatePoliciesPayload) String

func (x *UpdatePoliciesPayload) String() string

type UpdatePolicyPayload

type UpdatePolicyPayload struct {
	Sec     string   `protobuf:"bytes,1,opt,name=sec,proto3" json:"sec,omitempty"`
	PType   string   `protobuf:"bytes,2,opt,name=pType,proto3" json:"pType,omitempty"`
	NewRule []string `protobuf:"bytes,3,rep,name=newRule,proto3" json:"newRule,omitempty"`
	OldRule []string `protobuf:"bytes,4,rep,name=oldRule,proto3" json:"oldRule,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePolicyPayload) Descriptor deprecated

func (*UpdatePolicyPayload) Descriptor() ([]byte, []int)

Deprecated: Use UpdatePolicyPayload.ProtoReflect.Descriptor instead.

func (*UpdatePolicyPayload) GetNewRule

func (x *UpdatePolicyPayload) GetNewRule() []string

func (*UpdatePolicyPayload) GetOldRule

func (x *UpdatePolicyPayload) GetOldRule() []string

func (*UpdatePolicyPayload) GetPType

func (x *UpdatePolicyPayload) GetPType() string

func (*UpdatePolicyPayload) GetSec

func (x *UpdatePolicyPayload) GetSec() string

func (*UpdatePolicyPayload) ProtoMessage

func (*UpdatePolicyPayload) ProtoMessage()

func (*UpdatePolicyPayload) ProtoReflect

func (x *UpdatePolicyPayload) ProtoReflect() protoreflect.Message

func (*UpdatePolicyPayload) Reset

func (x *UpdatePolicyPayload) Reset()

func (*UpdatePolicyPayload) String

func (x *UpdatePolicyPayload) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL