role

package
v0.0.0-...-895b57c Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_role_role_proto protoreflect.FileDescriptor

Functions

func NewRoleEndpoints

func NewRoleEndpoints() []*api.Endpoint

func RegisterRoleHandler

func RegisterRoleHandler(s server.Server, hdlr RoleHandler, opts ...server.HandlerOption) error

Types

type AllRole

type AllRole struct {
	RoleInfo []*RoleInfo `protobuf:"bytes,1,rep,name=role_info,json=roleInfo,proto3" json:"role_info,omitempty"`
	// contains filtered or unexported fields
}

func (*AllRole) Descriptor deprecated

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

Deprecated: Use AllRole.ProtoReflect.Descriptor instead.

func (*AllRole) GetRoleInfo

func (x *AllRole) GetRoleInfo() []*RoleInfo

func (*AllRole) ProtoMessage

func (*AllRole) ProtoMessage()

func (*AllRole) ProtoReflect

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

func (*AllRole) Reset

func (x *AllRole) Reset()

func (*AllRole) String

func (x *AllRole) String() string

type FindAll

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

func (*FindAll) Descriptor deprecated

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

Deprecated: Use FindAll.ProtoReflect.Descriptor instead.

func (*FindAll) ProtoMessage

func (*FindAll) ProtoMessage()

func (*FindAll) ProtoReflect

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

func (*FindAll) Reset

func (x *FindAll) Reset()

func (*FindAll) String

func (x *FindAll) String() string

type Response

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

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetMsg

func (x *Response) GetMsg() 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 RoleHandler

type RoleHandler interface {
	//对外提供添加服务
	AddRole(context.Context, *RoleInfo, *Response) error
	DeleteRole(context.Context, *RoleId, *Response) error
	UpdateRole(context.Context, *RoleInfo, *Response) error
	FindRoleByID(context.Context, *RoleId, *RoleInfo) error
	FindAllRole(context.Context, *FindAll, *AllRole) error
	AddPermission(context.Context, *RolePermission, *Response) error
	UpdatePermission(context.Context, *RolePermission, *Response) error
	DeletePermission(context.Context, *RolePermission, *Response) error
}

type RoleId

type RoleId struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*RoleId) Descriptor deprecated

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

Deprecated: Use RoleId.ProtoReflect.Descriptor instead.

func (*RoleId) GetId

func (x *RoleId) GetId() int64

func (*RoleId) ProtoMessage

func (*RoleId) ProtoMessage()

func (*RoleId) ProtoReflect

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

func (*RoleId) Reset

func (x *RoleId) Reset()

func (*RoleId) String

func (x *RoleId) String() string

type RoleInfo

type RoleInfo struct {
	Id         int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	RoleName   string `protobuf:"bytes,2,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"`
	RoleStatus string `protobuf:"bytes,3,opt,name=role_status,json=roleStatus,proto3" json:"role_status,omitempty"`
	// contains filtered or unexported fields
}

func (*RoleInfo) Descriptor deprecated

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

Deprecated: Use RoleInfo.ProtoReflect.Descriptor instead.

func (*RoleInfo) GetId

func (x *RoleInfo) GetId() int64

func (*RoleInfo) GetRoleName

func (x *RoleInfo) GetRoleName() string

func (*RoleInfo) GetRoleStatus

func (x *RoleInfo) GetRoleStatus() string

func (*RoleInfo) ProtoMessage

func (*RoleInfo) ProtoMessage()

func (*RoleInfo) ProtoReflect

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

func (*RoleInfo) Reset

func (x *RoleInfo) Reset()

func (*RoleInfo) String

func (x *RoleInfo) String() string

type RolePermission

type RolePermission struct {
	RoleId       int64   `protobuf:"varint,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	PermissionId []int64 `protobuf:"varint,2,rep,packed,name=permission_id,json=permissionId,proto3" json:"permission_id,omitempty"`
	// contains filtered or unexported fields
}

func (*RolePermission) Descriptor deprecated

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

Deprecated: Use RolePermission.ProtoReflect.Descriptor instead.

func (*RolePermission) GetPermissionId

func (x *RolePermission) GetPermissionId() []int64

func (*RolePermission) GetRoleId

func (x *RolePermission) GetRoleId() int64

func (*RolePermission) ProtoMessage

func (*RolePermission) ProtoMessage()

func (*RolePermission) ProtoReflect

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

func (*RolePermission) Reset

func (x *RolePermission) Reset()

func (*RolePermission) String

func (x *RolePermission) String() string

type RoleService

type RoleService interface {
	//对外提供添加服务
	AddRole(ctx context.Context, in *RoleInfo, opts ...client.CallOption) (*Response, error)
	DeleteRole(ctx context.Context, in *RoleId, opts ...client.CallOption) (*Response, error)
	UpdateRole(ctx context.Context, in *RoleInfo, opts ...client.CallOption) (*Response, error)
	FindRoleByID(ctx context.Context, in *RoleId, opts ...client.CallOption) (*RoleInfo, error)
	FindAllRole(ctx context.Context, in *FindAll, opts ...client.CallOption) (*AllRole, error)
	AddPermission(ctx context.Context, in *RolePermission, opts ...client.CallOption) (*Response, error)
	UpdatePermission(ctx context.Context, in *RolePermission, opts ...client.CallOption) (*Response, error)
	DeletePermission(ctx context.Context, in *RolePermission, opts ...client.CallOption) (*Response, error)
}

func NewRoleService

func NewRoleService(name string, c client.Client) RoleService

Jump to

Keyboard shortcuts

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