casbinpb

package module
v0.0.0-...-838a961 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: GPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ServiceName    = "casbinpb"
	ServiceVersion = "latest"
)

Variables

View Source
var File_casbin_proto protoreflect.FileDescriptor

Functions

func RegisterCasbinHandler

func RegisterCasbinHandler(s server.Server, hdlr CasbinHandler, opts ...server.HandlerOption) error

Types

type Array2DReply

type Array2DReply struct {
	D2 []*Array2DReplyD `protobuf:"bytes,1,rep,name=d2,proto3" json:"d2,omitempty"`
	// contains filtered or unexported fields
}

func (*Array2DReply) Descriptor deprecated

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

Deprecated: Use Array2DReply.ProtoReflect.Descriptor instead.

func (*Array2DReply) GetD2

func (x *Array2DReply) GetD2() []*Array2DReplyD

func (*Array2DReply) ProtoMessage

func (*Array2DReply) ProtoMessage()

func (*Array2DReply) ProtoReflect

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

func (*Array2DReply) Reset

func (x *Array2DReply) Reset()

func (*Array2DReply) String

func (x *Array2DReply) String() string

type Array2DReplyD

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

func (*Array2DReplyD) Descriptor deprecated

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

Deprecated: Use Array2DReplyD.ProtoReflect.Descriptor instead.

func (*Array2DReplyD) GetD1

func (x *Array2DReplyD) GetD1() []string

func (*Array2DReplyD) ProtoMessage

func (*Array2DReplyD) ProtoMessage()

func (*Array2DReplyD) ProtoReflect

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

func (*Array2DReplyD) Reset

func (x *Array2DReplyD) Reset()

func (*Array2DReplyD) String

func (x *Array2DReplyD) String() string

type ArrayReply

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

func (*ArrayReply) Descriptor deprecated

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

Deprecated: Use ArrayReply.ProtoReflect.Descriptor instead.

func (*ArrayReply) GetArray

func (x *ArrayReply) GetArray() []string

func (*ArrayReply) ProtoMessage

func (*ArrayReply) ProtoMessage()

func (*ArrayReply) ProtoReflect

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

func (*ArrayReply) Reset

func (x *ArrayReply) Reset()

func (*ArrayReply) String

func (x *ArrayReply) String() string

type CasbinHandler

type CasbinHandler interface {
	Enforce(context.Context, *EnforceRequest, *Empty) error
	ImportPolicy(context.Context, *ImportPolicyRequest, *Empty) error
	LoadPolicy(context.Context, *Empty, *Empty) error
	SavePolicy(context.Context, *Empty, *Empty) error
	AddPolicy(context.Context, *PolicyRequest, *Empty) error
	AddNamedPolicy(context.Context, *PolicyRequest, *Empty) error
	RemovePolicy(context.Context, *PolicyRequest, *Empty) error
	RemoveNamedPolicy(context.Context, *PolicyRequest, *Empty) error
	RemoveFilteredPolicy(context.Context, *FilteredPolicyRequest, *Empty) error
	RemoveFilteredNamedPolicy(context.Context, *FilteredPolicyRequest, *Empty) error
	GetPolicy(context.Context, *Empty, *Array2DReply) error
	GetNamedPolicy(context.Context, *PolicyRequest, *Array2DReply) error
	GetFilteredPolicy(context.Context, *FilteredPolicyRequest, *Array2DReply) error
	GetFilteredNamedPolicy(context.Context, *FilteredPolicyRequest, *Array2DReply) error
	AddGroupingPolicy(context.Context, *PolicyRequest, *Empty) error
	AddNamedGroupingPolicy(context.Context, *PolicyRequest, *Empty) error
	RemoveGroupingPolicy(context.Context, *PolicyRequest, *Empty) error
	RemoveNamedGroupingPolicy(context.Context, *PolicyRequest, *Empty) error
	RemoveFilteredGroupingPolicy(context.Context, *FilteredPolicyRequest, *Empty) error
	RemoveFilteredNamedGroupingPolicy(context.Context, *FilteredPolicyRequest, *Empty) error
	GetGroupingPolicy(context.Context, *Empty, *Array2DReply) error
	GetNamedGroupingPolicy(context.Context, *PolicyRequest, *Array2DReply) error
	GetFilteredGroupingPolicy(context.Context, *FilteredPolicyRequest, *Array2DReply) error
	GetFilteredNamedGroupingPolicy(context.Context, *FilteredPolicyRequest, *Array2DReply) error
	GetAllSubjects(context.Context, *Empty, *ArrayReply) error
	GetAllNamedSubjects(context.Context, *SimpleGetRequest, *ArrayReply) error
	GetAllObjects(context.Context, *Empty, *ArrayReply) error
	GetAllNamedObjects(context.Context, *SimpleGetRequest, *ArrayReply) error
	GetAllActions(context.Context, *Empty, *ArrayReply) error
	GetAllNamedActions(context.Context, *SimpleGetRequest, *ArrayReply) error
	GetAllRoles(context.Context, *Empty, *ArrayReply) error
	GetAllNamedRoles(context.Context, *SimpleGetRequest, *ArrayReply) error
	HasPolicy(context.Context, *PolicyRequest, *Empty) error
	HasNamedPolicy(context.Context, *PolicyRequest, *Empty) error
	HasGroupingPolicy(context.Context, *PolicyRequest, *Empty) error
	HasNamedGroupingPolicy(context.Context, *PolicyRequest, *Empty) error
	AddRoleForUser(context.Context, *UserRoleRequest, *Empty) error
	DeleteRoleForUser(context.Context, *UserRoleRequest, *Empty) error
	DeleteUser(context.Context, *UserRoleRequest, *Empty) error
	GetRolesForUser(context.Context, *UserRoleRequest, *ArrayReply) error
	GetImplicitRolesForUser(context.Context, *UserRoleRequest, *ArrayReply) error
	GetUsersForRole(context.Context, *UserRoleRequest, *ArrayReply) error
	GetPermissionsForUser(context.Context, *PermissionRequest, *Array2DReply) error
	GetImplicitPermissionsForUser(context.Context, *PermissionRequest, *Array2DReply) error
}

type CasbinService

type CasbinService interface {
	Enforce(ctx context.Context, in *EnforceRequest, opts ...client.CallOption) (*Empty, error)
	ImportPolicy(ctx context.Context, in *ImportPolicyRequest, opts ...client.CallOption) (*Empty, error)
	LoadPolicy(ctx context.Context, in *Empty, opts ...client.CallOption) (*Empty, error)
	SavePolicy(ctx context.Context, in *Empty, opts ...client.CallOption) (*Empty, error)
	AddPolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Empty, error)
	AddNamedPolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Empty, error)
	RemovePolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Empty, error)
	RemoveNamedPolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Empty, error)
	RemoveFilteredPolicy(ctx context.Context, in *FilteredPolicyRequest, opts ...client.CallOption) (*Empty, error)
	RemoveFilteredNamedPolicy(ctx context.Context, in *FilteredPolicyRequest, opts ...client.CallOption) (*Empty, error)
	GetPolicy(ctx context.Context, in *Empty, opts ...client.CallOption) (*Array2DReply, error)
	GetNamedPolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Array2DReply, error)
	GetFilteredPolicy(ctx context.Context, in *FilteredPolicyRequest, opts ...client.CallOption) (*Array2DReply, error)
	GetFilteredNamedPolicy(ctx context.Context, in *FilteredPolicyRequest, opts ...client.CallOption) (*Array2DReply, error)
	AddGroupingPolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Empty, error)
	AddNamedGroupingPolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Empty, error)
	RemoveGroupingPolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Empty, error)
	RemoveNamedGroupingPolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Empty, error)
	RemoveFilteredGroupingPolicy(ctx context.Context, in *FilteredPolicyRequest, opts ...client.CallOption) (*Empty, error)
	RemoveFilteredNamedGroupingPolicy(ctx context.Context, in *FilteredPolicyRequest, opts ...client.CallOption) (*Empty, error)
	GetGroupingPolicy(ctx context.Context, in *Empty, opts ...client.CallOption) (*Array2DReply, error)
	GetNamedGroupingPolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Array2DReply, error)
	GetFilteredGroupingPolicy(ctx context.Context, in *FilteredPolicyRequest, opts ...client.CallOption) (*Array2DReply, error)
	GetFilteredNamedGroupingPolicy(ctx context.Context, in *FilteredPolicyRequest, opts ...client.CallOption) (*Array2DReply, error)
	GetAllSubjects(ctx context.Context, in *Empty, opts ...client.CallOption) (*ArrayReply, error)
	GetAllNamedSubjects(ctx context.Context, in *SimpleGetRequest, opts ...client.CallOption) (*ArrayReply, error)
	GetAllObjects(ctx context.Context, in *Empty, opts ...client.CallOption) (*ArrayReply, error)
	GetAllNamedObjects(ctx context.Context, in *SimpleGetRequest, opts ...client.CallOption) (*ArrayReply, error)
	GetAllActions(ctx context.Context, in *Empty, opts ...client.CallOption) (*ArrayReply, error)
	GetAllNamedActions(ctx context.Context, in *SimpleGetRequest, opts ...client.CallOption) (*ArrayReply, error)
	GetAllRoles(ctx context.Context, in *Empty, opts ...client.CallOption) (*ArrayReply, error)
	GetAllNamedRoles(ctx context.Context, in *SimpleGetRequest, opts ...client.CallOption) (*ArrayReply, error)
	HasPolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Empty, error)
	HasNamedPolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Empty, error)
	HasGroupingPolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Empty, error)
	HasNamedGroupingPolicy(ctx context.Context, in *PolicyRequest, opts ...client.CallOption) (*Empty, error)
	AddRoleForUser(ctx context.Context, in *UserRoleRequest, opts ...client.CallOption) (*Empty, error)
	DeleteRoleForUser(ctx context.Context, in *UserRoleRequest, opts ...client.CallOption) (*Empty, error)
	DeleteUser(ctx context.Context, in *UserRoleRequest, opts ...client.CallOption) (*Empty, error)
	GetRolesForUser(ctx context.Context, in *UserRoleRequest, opts ...client.CallOption) (*ArrayReply, error)
	GetImplicitRolesForUser(ctx context.Context, in *UserRoleRequest, opts ...client.CallOption) (*ArrayReply, error)
	GetUsersForRole(ctx context.Context, in *UserRoleRequest, opts ...client.CallOption) (*ArrayReply, error)
	GetPermissionsForUser(ctx context.Context, in *PermissionRequest, opts ...client.CallOption) (*Array2DReply, error)
	GetImplicitPermissionsForUser(ctx context.Context, in *PermissionRequest, opts ...client.CallOption) (*Array2DReply, error)
}

func NewCasbinService

func NewCasbinService(name string, c client.Client) CasbinService

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type EnforceRequest

type EnforceRequest struct {
	Params []string `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

func (*EnforceRequest) Descriptor deprecated

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

Deprecated: Use EnforceRequest.ProtoReflect.Descriptor instead.

func (*EnforceRequest) GetParams

func (x *EnforceRequest) GetParams() []string

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 FilteredPolicyRequest

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

func (*FilteredPolicyRequest) Descriptor deprecated

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

Deprecated: Use FilteredPolicyRequest.ProtoReflect.Descriptor instead.

func (*FilteredPolicyRequest) GetFieldIndex

func (x *FilteredPolicyRequest) GetFieldIndex() int32

func (*FilteredPolicyRequest) GetFieldValues

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

func (*FilteredPolicyRequest) GetPType

func (x *FilteredPolicyRequest) GetPType() string

func (*FilteredPolicyRequest) ProtoMessage

func (*FilteredPolicyRequest) ProtoMessage()

func (*FilteredPolicyRequest) ProtoReflect

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

func (*FilteredPolicyRequest) Reset

func (x *FilteredPolicyRequest) Reset()

func (*FilteredPolicyRequest) String

func (x *FilteredPolicyRequest) String() string

type ImportPolicyRequest

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

func (*ImportPolicyRequest) Descriptor deprecated

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

Deprecated: Use ImportPolicyRequest.ProtoReflect.Descriptor instead.

func (*ImportPolicyRequest) GetData

func (x *ImportPolicyRequest) GetData() []byte

func (*ImportPolicyRequest) ProtoMessage

func (*ImportPolicyRequest) ProtoMessage()

func (*ImportPolicyRequest) ProtoReflect

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

func (*ImportPolicyRequest) Reset

func (x *ImportPolicyRequest) Reset()

func (*ImportPolicyRequest) String

func (x *ImportPolicyRequest) String() string

type PermissionRequest

type PermissionRequest struct {
	User        string   `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Permissions []string `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions,omitempty"`
	// contains filtered or unexported fields
}

func (*PermissionRequest) Descriptor deprecated

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

Deprecated: Use PermissionRequest.ProtoReflect.Descriptor instead.

func (*PermissionRequest) GetPermissions

func (x *PermissionRequest) GetPermissions() []string

func (*PermissionRequest) GetUser

func (x *PermissionRequest) GetUser() string

func (*PermissionRequest) ProtoMessage

func (*PermissionRequest) ProtoMessage()

func (*PermissionRequest) ProtoReflect

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

func (*PermissionRequest) Reset

func (x *PermissionRequest) Reset()

func (*PermissionRequest) String

func (x *PermissionRequest) String() string

type PolicyRequest

type PolicyRequest struct {
	PType  string   `protobuf:"bytes,1,opt,name=pType,proto3" json:"pType,omitempty"`
	Params []string `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

func (*PolicyRequest) Descriptor deprecated

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

Deprecated: Use PolicyRequest.ProtoReflect.Descriptor instead.

func (*PolicyRequest) GetPType

func (x *PolicyRequest) GetPType() string

func (*PolicyRequest) GetParams

func (x *PolicyRequest) GetParams() []string

func (*PolicyRequest) ProtoMessage

func (*PolicyRequest) ProtoMessage()

func (*PolicyRequest) ProtoReflect

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

func (*PolicyRequest) Reset

func (x *PolicyRequest) Reset()

func (*PolicyRequest) String

func (x *PolicyRequest) String() string

type SimpleGetRequest

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

func (*SimpleGetRequest) Descriptor deprecated

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

Deprecated: Use SimpleGetRequest.ProtoReflect.Descriptor instead.

func (*SimpleGetRequest) GetPType

func (x *SimpleGetRequest) GetPType() string

func (*SimpleGetRequest) ProtoMessage

func (*SimpleGetRequest) ProtoMessage()

func (*SimpleGetRequest) ProtoReflect

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

func (*SimpleGetRequest) Reset

func (x *SimpleGetRequest) Reset()

func (*SimpleGetRequest) String

func (x *SimpleGetRequest) String() string

type UserRoleRequest

type UserRoleRequest struct {
	User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*UserRoleRequest) Descriptor deprecated

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

Deprecated: Use UserRoleRequest.ProtoReflect.Descriptor instead.

func (*UserRoleRequest) GetRole

func (x *UserRoleRequest) GetRole() string

func (*UserRoleRequest) GetUser

func (x *UserRoleRequest) GetUser() string

func (*UserRoleRequest) ProtoMessage

func (*UserRoleRequest) ProtoMessage()

func (*UserRoleRequest) ProtoReflect

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

func (*UserRoleRequest) Reset

func (x *UserRoleRequest) Reset()

func (*UserRoleRequest) String

func (x *UserRoleRequest) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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