Documentation ¶
Index ¶
- func RegisterPolicydServiceServer(s *grpc.Server, srv PolicydServiceServer)
- type EnforceBucketRequest
- func (*EnforceBucketRequest) Descriptor() ([]byte, []int)
- func (m *EnforceBucketRequest) GetRequests() []*proto1.EnforceRequest
- func (*EnforceBucketRequest) ProtoMessage()
- func (m *EnforceBucketRequest) Reset()
- func (m *EnforceBucketRequest) String() string
- func (m *EnforceBucketRequest) Validate() error
- func (m *EnforceBucketRequest) XXX_DiscardUnknown()
- func (m *EnforceBucketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EnforceBucketRequest) XXX_Merge(src proto.Message)
- func (m *EnforceBucketRequest) XXX_Size() int
- func (m *EnforceBucketRequest) XXX_Unmarshal(b []byte) error
- type EnforceBucketRequestValidationError
- func (e EnforceBucketRequestValidationError) Cause() error
- func (e EnforceBucketRequestValidationError) Error() string
- func (e EnforceBucketRequestValidationError) ErrorName() string
- func (e EnforceBucketRequestValidationError) Field() string
- func (e EnforceBucketRequestValidationError) Key() bool
- func (e EnforceBucketRequestValidationError) Reason() string
- type PolicydServiceClient
- type PolicydServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterPolicydServiceServer ¶
func RegisterPolicydServiceServer(s *grpc.Server, srv PolicydServiceServer)
Types ¶
type EnforceBucketRequest ¶
type EnforceBucketRequest struct { Requests []*proto1.EnforceRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*EnforceBucketRequest) Descriptor ¶
func (*EnforceBucketRequest) Descriptor() ([]byte, []int)
func (*EnforceBucketRequest) GetRequests ¶
func (m *EnforceBucketRequest) GetRequests() []*proto1.EnforceRequest
func (*EnforceBucketRequest) ProtoMessage ¶
func (*EnforceBucketRequest) ProtoMessage()
func (*EnforceBucketRequest) Reset ¶
func (m *EnforceBucketRequest) Reset()
func (*EnforceBucketRequest) String ¶
func (m *EnforceBucketRequest) String() string
func (*EnforceBucketRequest) Validate ¶
func (m *EnforceBucketRequest) Validate() error
Validate checks the field values on EnforceBucketRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*EnforceBucketRequest) XXX_DiscardUnknown ¶
func (m *EnforceBucketRequest) XXX_DiscardUnknown()
func (*EnforceBucketRequest) XXX_Marshal ¶
func (m *EnforceBucketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EnforceBucketRequest) XXX_Merge ¶
func (m *EnforceBucketRequest) XXX_Merge(src proto.Message)
func (*EnforceBucketRequest) XXX_Size ¶
func (m *EnforceBucketRequest) XXX_Size() int
func (*EnforceBucketRequest) XXX_Unmarshal ¶
func (m *EnforceBucketRequest) XXX_Unmarshal(b []byte) error
type EnforceBucketRequestValidationError ¶
type EnforceBucketRequestValidationError struct {
// contains filtered or unexported fields
}
EnforceBucketRequestValidationError is the validation error returned by EnforceBucketRequest.Validate if the designated constraints aren't met.
func (EnforceBucketRequestValidationError) Cause ¶
func (e EnforceBucketRequestValidationError) Cause() error
Cause function returns cause value.
func (EnforceBucketRequestValidationError) Error ¶
func (e EnforceBucketRequestValidationError) Error() string
Error satisfies the builtin error interface
func (EnforceBucketRequestValidationError) ErrorName ¶
func (e EnforceBucketRequestValidationError) ErrorName() string
ErrorName returns error name.
func (EnforceBucketRequestValidationError) Field ¶
func (e EnforceBucketRequestValidationError) Field() string
Field function returns field value.
func (EnforceBucketRequestValidationError) Key ¶
func (e EnforceBucketRequestValidationError) Key() bool
Key function returns key value.
func (EnforceBucketRequestValidationError) Reason ¶
func (e EnforceBucketRequestValidationError) Reason() string
Reason function returns reason value.
type PolicydServiceClient ¶
type PolicydServiceClient interface { // Casbin server functions NewEnforcer(ctx context.Context, in *proto1.NewEnforcerRequest, opts ...grpc.CallOption) (*proto1.NewEnforcerReply, error) NewAdapter(ctx context.Context, in *proto1.NewAdapterRequest, opts ...grpc.CallOption) (*proto1.NewAdapterReply, error) Enforce(ctx context.Context, in *proto1.EnforceRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) LoadPolicy(ctx context.Context, in *proto1.EmptyRequest, opts ...grpc.CallOption) (*proto1.EmptyReply, error) SavePolicy(ctx context.Context, in *proto1.EmptyRequest, opts ...grpc.CallOption) (*proto1.EmptyReply, error) AddPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) AddNamedPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) RemovePolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) RemoveNamedPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) RemoveFilteredPolicy(ctx context.Context, in *proto1.FilteredPolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) RemoveFilteredNamedPolicy(ctx context.Context, in *proto1.FilteredPolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) GetPolicy(ctx context.Context, in *proto1.EmptyRequest, opts ...grpc.CallOption) (*proto1.Array2DReply, error) GetNamedPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.Array2DReply, error) GetFilteredPolicy(ctx context.Context, in *proto1.FilteredPolicyRequest, opts ...grpc.CallOption) (*proto1.Array2DReply, error) GetFilteredNamedPolicy(ctx context.Context, in *proto1.FilteredPolicyRequest, opts ...grpc.CallOption) (*proto1.Array2DReply, error) AddGroupingPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) AddNamedGroupingPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) RemoveGroupingPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) RemoveNamedGroupingPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) RemoveFilteredGroupingPolicy(ctx context.Context, in *proto1.FilteredPolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) RemoveFilteredNamedGroupingPolicy(ctx context.Context, in *proto1.FilteredPolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) GetGroupingPolicy(ctx context.Context, in *proto1.EmptyRequest, opts ...grpc.CallOption) (*proto1.Array2DReply, error) GetNamedGroupingPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.Array2DReply, error) GetFilteredGroupingPolicy(ctx context.Context, in *proto1.FilteredPolicyRequest, opts ...grpc.CallOption) (*proto1.Array2DReply, error) GetFilteredNamedGroupingPolicy(ctx context.Context, in *proto1.FilteredPolicyRequest, opts ...grpc.CallOption) (*proto1.Array2DReply, error) GetAllSubjects(ctx context.Context, in *proto1.EmptyRequest, opts ...grpc.CallOption) (*proto1.ArrayReply, error) GetAllNamedSubjects(ctx context.Context, in *proto1.SimpleGetRequest, opts ...grpc.CallOption) (*proto1.ArrayReply, error) GetAllObjects(ctx context.Context, in *proto1.EmptyRequest, opts ...grpc.CallOption) (*proto1.ArrayReply, error) GetAllNamedObjects(ctx context.Context, in *proto1.SimpleGetRequest, opts ...grpc.CallOption) (*proto1.ArrayReply, error) GetAllActions(ctx context.Context, in *proto1.EmptyRequest, opts ...grpc.CallOption) (*proto1.ArrayReply, error) GetAllNamedActions(ctx context.Context, in *proto1.SimpleGetRequest, opts ...grpc.CallOption) (*proto1.ArrayReply, error) GetAllRoles(ctx context.Context, in *proto1.EmptyRequest, opts ...grpc.CallOption) (*proto1.ArrayReply, error) GetAllNamedRoles(ctx context.Context, in *proto1.SimpleGetRequest, opts ...grpc.CallOption) (*proto1.ArrayReply, error) HasPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) HasNamedPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) HasGroupingPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) HasNamedGroupingPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) // Custom functions EnforceBucket(ctx context.Context, in *EnforceBucketRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) AddPresetPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) RemovePresetPolicy(ctx context.Context, in *proto1.PolicyRequest, opts ...grpc.CallOption) (*proto1.BoolReply, error) Initialize(ctx context.Context, in *proto1.EmptyRequest, opts ...grpc.CallOption) (*proto1.EmptyReply, error) }
PolicydServiceClient is the client API for PolicydService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPolicydServiceClient ¶
func NewPolicydServiceClient(cc *grpc.ClientConn) PolicydServiceClient
type PolicydServiceServer ¶
type PolicydServiceServer interface { // Casbin server functions NewEnforcer(context.Context, *proto1.NewEnforcerRequest) (*proto1.NewEnforcerReply, error) NewAdapter(context.Context, *proto1.NewAdapterRequest) (*proto1.NewAdapterReply, error) Enforce(context.Context, *proto1.EnforceRequest) (*proto1.BoolReply, error) LoadPolicy(context.Context, *proto1.EmptyRequest) (*proto1.EmptyReply, error) SavePolicy(context.Context, *proto1.EmptyRequest) (*proto1.EmptyReply, error) AddPolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) AddNamedPolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) RemovePolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) RemoveNamedPolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) RemoveFilteredPolicy(context.Context, *proto1.FilteredPolicyRequest) (*proto1.BoolReply, error) RemoveFilteredNamedPolicy(context.Context, *proto1.FilteredPolicyRequest) (*proto1.BoolReply, error) GetPolicy(context.Context, *proto1.EmptyRequest) (*proto1.Array2DReply, error) GetNamedPolicy(context.Context, *proto1.PolicyRequest) (*proto1.Array2DReply, error) GetFilteredPolicy(context.Context, *proto1.FilteredPolicyRequest) (*proto1.Array2DReply, error) GetFilteredNamedPolicy(context.Context, *proto1.FilteredPolicyRequest) (*proto1.Array2DReply, error) AddGroupingPolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) AddNamedGroupingPolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) RemoveGroupingPolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) RemoveNamedGroupingPolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) RemoveFilteredGroupingPolicy(context.Context, *proto1.FilteredPolicyRequest) (*proto1.BoolReply, error) RemoveFilteredNamedGroupingPolicy(context.Context, *proto1.FilteredPolicyRequest) (*proto1.BoolReply, error) GetGroupingPolicy(context.Context, *proto1.EmptyRequest) (*proto1.Array2DReply, error) GetNamedGroupingPolicy(context.Context, *proto1.PolicyRequest) (*proto1.Array2DReply, error) GetFilteredGroupingPolicy(context.Context, *proto1.FilteredPolicyRequest) (*proto1.Array2DReply, error) GetFilteredNamedGroupingPolicy(context.Context, *proto1.FilteredPolicyRequest) (*proto1.Array2DReply, error) GetAllSubjects(context.Context, *proto1.EmptyRequest) (*proto1.ArrayReply, error) GetAllNamedSubjects(context.Context, *proto1.SimpleGetRequest) (*proto1.ArrayReply, error) GetAllObjects(context.Context, *proto1.EmptyRequest) (*proto1.ArrayReply, error) GetAllNamedObjects(context.Context, *proto1.SimpleGetRequest) (*proto1.ArrayReply, error) GetAllActions(context.Context, *proto1.EmptyRequest) (*proto1.ArrayReply, error) GetAllNamedActions(context.Context, *proto1.SimpleGetRequest) (*proto1.ArrayReply, error) GetAllRoles(context.Context, *proto1.EmptyRequest) (*proto1.ArrayReply, error) GetAllNamedRoles(context.Context, *proto1.SimpleGetRequest) (*proto1.ArrayReply, error) HasPolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) HasNamedPolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) HasGroupingPolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) HasNamedGroupingPolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) // Custom functions EnforceBucket(context.Context, *EnforceBucketRequest) (*proto1.BoolReply, error) AddPresetPolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) RemovePresetPolicy(context.Context, *proto1.PolicyRequest) (*proto1.BoolReply, error) Initialize(context.Context, *proto1.EmptyRequest) (*proto1.EmptyReply, error) }
PolicydServiceServer is the server API for PolicydService service.