policyd

package
v1.1.31-alpha4 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 (this *EnforceBucketRequest) Validate() error

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 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.

type UnimplementedPolicydServiceServer added in v1.0.0

type UnimplementedPolicydServiceServer struct {
}

UnimplementedPolicydServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedPolicydServiceServer) AddGroupingPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) AddNamedGroupingPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) AddNamedPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) AddPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) AddPresetPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) Enforce added in v1.0.0

func (*UnimplementedPolicydServiceServer) EnforceBucket added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetAllActions added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetAllNamedActions added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetAllNamedObjects added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetAllNamedRoles added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetAllNamedSubjects added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetAllObjects added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetAllRoles added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetAllSubjects added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetFilteredGroupingPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetFilteredNamedGroupingPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetFilteredNamedPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetFilteredPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetGroupingPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetNamedGroupingPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetNamedPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) GetPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) HasGroupingPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) HasNamedGroupingPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) HasNamedPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) HasPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) Initialize added in v1.0.0

func (*UnimplementedPolicydServiceServer) LoadPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) NewAdapter added in v1.0.0

func (*UnimplementedPolicydServiceServer) NewEnforcer added in v1.0.0

func (*UnimplementedPolicydServiceServer) RemoveFilteredGroupingPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) RemoveFilteredNamedGroupingPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) RemoveFilteredNamedGroupingPolicy(ctx context.Context, req *proto1.FilteredPolicyRequest) (*proto1.BoolReply, error)

func (*UnimplementedPolicydServiceServer) RemoveFilteredNamedPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) RemoveFilteredPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) RemoveGroupingPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) RemoveNamedGroupingPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) RemoveNamedGroupingPolicy(ctx context.Context, req *proto1.PolicyRequest) (*proto1.BoolReply, error)

func (*UnimplementedPolicydServiceServer) RemoveNamedPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) RemovePolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) RemovePresetPolicy added in v1.0.0

func (*UnimplementedPolicydServiceServer) SavePolicy added in v1.0.0

Jump to

Keyboard shortcuts

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