permission

package
v0.0.0-...-0523e7d Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_permission_grpc_proto protoreflect.FileDescriptor
View Source
var PermissionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "emortal.grpc.PermissionService",
	HandlerType: (*PermissionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAllRoles",
			Handler:    _PermissionService_GetAllRoles_Handler,
		},
		{
			MethodName: "GetPlayerRoles",
			Handler:    _PermissionService_GetPlayerRoles_Handler,
		},
		{
			MethodName: "CreateRole",
			Handler:    _PermissionService_CreateRole_Handler,
		},
		{
			MethodName: "UpdateRole",
			Handler:    _PermissionService_UpdateRole_Handler,
		},
		{
			MethodName: "AddRoleToPlayer",
			Handler:    _PermissionService_AddRoleToPlayer_Handler,
		},
		{
			MethodName: "RemoveRoleFromPlayer",
			Handler:    _PermissionService_RemoveRoleFromPlayer_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "permission/grpc.proto",
}

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

Functions

func RegisterPermissionServiceServer

func RegisterPermissionServiceServer(s grpc.ServiceRegistrar, srv PermissionServiceServer)

Types

type AddRoleToPlayerRequest

type AddRoleToPlayerRequest struct {
	PlayerId string `protobuf:"bytes,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	RoleId   string `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	// contains filtered or unexported fields
}

func (*AddRoleToPlayerRequest) Descriptor deprecated

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

Deprecated: Use AddRoleToPlayerRequest.ProtoReflect.Descriptor instead.

func (*AddRoleToPlayerRequest) GetPlayerId

func (x *AddRoleToPlayerRequest) GetPlayerId() string

func (*AddRoleToPlayerRequest) GetRoleId

func (x *AddRoleToPlayerRequest) GetRoleId() string

func (*AddRoleToPlayerRequest) ProtoMessage

func (*AddRoleToPlayerRequest) ProtoMessage()

func (*AddRoleToPlayerRequest) ProtoReflect

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

func (*AddRoleToPlayerRequest) Reset

func (x *AddRoleToPlayerRequest) Reset()

func (*AddRoleToPlayerRequest) String

func (x *AddRoleToPlayerRequest) String() string

type AddRoleToPlayerResponse

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

func (*AddRoleToPlayerResponse) Descriptor deprecated

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

Deprecated: Use AddRoleToPlayerResponse.ProtoReflect.Descriptor instead.

func (*AddRoleToPlayerResponse) ProtoMessage

func (*AddRoleToPlayerResponse) ProtoMessage()

func (*AddRoleToPlayerResponse) ProtoReflect

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

func (*AddRoleToPlayerResponse) Reset

func (x *AddRoleToPlayerResponse) Reset()

func (*AddRoleToPlayerResponse) String

func (x *AddRoleToPlayerResponse) String() string

type CreateRoleResponse

type CreateRoleResponse struct {
	Role *permission.Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRoleResponse) Descriptor deprecated

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

Deprecated: Use CreateRoleResponse.ProtoReflect.Descriptor instead.

func (*CreateRoleResponse) GetRole

func (x *CreateRoleResponse) GetRole() *permission.Role

func (*CreateRoleResponse) ProtoMessage

func (*CreateRoleResponse) ProtoMessage()

func (*CreateRoleResponse) ProtoReflect

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

func (*CreateRoleResponse) Reset

func (x *CreateRoleResponse) Reset()

func (*CreateRoleResponse) String

func (x *CreateRoleResponse) String() string

type GetAllRolesRequest

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

func (*GetAllRolesRequest) Descriptor deprecated

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

Deprecated: Use GetAllRolesRequest.ProtoReflect.Descriptor instead.

func (*GetAllRolesRequest) ProtoMessage

func (*GetAllRolesRequest) ProtoMessage()

func (*GetAllRolesRequest) ProtoReflect

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

func (*GetAllRolesRequest) Reset

func (x *GetAllRolesRequest) Reset()

func (*GetAllRolesRequest) String

func (x *GetAllRolesRequest) String() string

type GetAllRolesResponse

type GetAllRolesResponse struct {
	Roles []*permission.Role `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAllRolesResponse) Descriptor deprecated

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

Deprecated: Use GetAllRolesResponse.ProtoReflect.Descriptor instead.

func (*GetAllRolesResponse) GetRoles

func (x *GetAllRolesResponse) GetRoles() []*permission.Role

func (*GetAllRolesResponse) ProtoMessage

func (*GetAllRolesResponse) ProtoMessage()

func (*GetAllRolesResponse) ProtoReflect

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

func (*GetAllRolesResponse) Reset

func (x *GetAllRolesResponse) Reset()

func (*GetAllRolesResponse) String

func (x *GetAllRolesResponse) String() string

type GetPlayerRolesRequest

type GetPlayerRolesRequest struct {
	PlayerId string `protobuf:"bytes,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPlayerRolesRequest) Descriptor deprecated

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

Deprecated: Use GetPlayerRolesRequest.ProtoReflect.Descriptor instead.

func (*GetPlayerRolesRequest) GetPlayerId

func (x *GetPlayerRolesRequest) GetPlayerId() string

func (*GetPlayerRolesRequest) ProtoMessage

func (*GetPlayerRolesRequest) ProtoMessage()

func (*GetPlayerRolesRequest) ProtoReflect

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

func (*GetPlayerRolesRequest) Reset

func (x *GetPlayerRolesRequest) Reset()

func (*GetPlayerRolesRequest) String

func (x *GetPlayerRolesRequest) String() string

type PermissionServiceClient

type PermissionServiceClient interface {
	GetAllRoles(ctx context.Context, in *GetAllRolesRequest, opts ...grpc.CallOption) (*GetAllRolesResponse, error)
	GetPlayerRoles(ctx context.Context, in *GetPlayerRolesRequest, opts ...grpc.CallOption) (*PlayerRolesResponse, error)
	CreateRole(ctx context.Context, in *RoleCreateRequest, opts ...grpc.CallOption) (*CreateRoleResponse, error)
	UpdateRole(ctx context.Context, in *RoleUpdateRequest, opts ...grpc.CallOption) (*UpdateRoleResponse, error)
	AddRoleToPlayer(ctx context.Context, in *AddRoleToPlayerRequest, opts ...grpc.CallOption) (*AddRoleToPlayerResponse, error)
	RemoveRoleFromPlayer(ctx context.Context, in *RemoveRoleFromPlayerRequest, opts ...grpc.CallOption) (*RemoveRoleFromPlayerResponse, error)
}

PermissionServiceClient is the client API for PermissionService service.

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

type PermissionServiceServer

type PermissionServiceServer interface {
	GetAllRoles(context.Context, *GetAllRolesRequest) (*GetAllRolesResponse, error)
	GetPlayerRoles(context.Context, *GetPlayerRolesRequest) (*PlayerRolesResponse, error)
	CreateRole(context.Context, *RoleCreateRequest) (*CreateRoleResponse, error)
	UpdateRole(context.Context, *RoleUpdateRequest) (*UpdateRoleResponse, error)
	AddRoleToPlayer(context.Context, *AddRoleToPlayerRequest) (*AddRoleToPlayerResponse, error)
	RemoveRoleFromPlayer(context.Context, *RemoveRoleFromPlayerRequest) (*RemoveRoleFromPlayerResponse, error)
	// contains filtered or unexported methods
}

PermissionServiceServer is the server API for PermissionService service. All implementations must embed UnimplementedPermissionServiceServer for forward compatibility

type PlayerRolesResponse

type PlayerRolesResponse struct {
	RoleIds []string `protobuf:"bytes,1,rep,name=role_ids,json=roleIds,proto3" json:"role_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*PlayerRolesResponse) Descriptor deprecated

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

Deprecated: Use PlayerRolesResponse.ProtoReflect.Descriptor instead.

func (*PlayerRolesResponse) GetRoleIds

func (x *PlayerRolesResponse) GetRoleIds() []string

func (*PlayerRolesResponse) ProtoMessage

func (*PlayerRolesResponse) ProtoMessage()

func (*PlayerRolesResponse) ProtoReflect

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

func (*PlayerRolesResponse) Reset

func (x *PlayerRolesResponse) Reset()

func (*PlayerRolesResponse) String

func (x *PlayerRolesResponse) String() string

type RemoveRoleFromPlayerRequest

type RemoveRoleFromPlayerRequest struct {
	PlayerId string `protobuf:"bytes,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	RoleId   string `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoveRoleFromPlayerRequest) Descriptor deprecated

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

Deprecated: Use RemoveRoleFromPlayerRequest.ProtoReflect.Descriptor instead.

func (*RemoveRoleFromPlayerRequest) GetPlayerId

func (x *RemoveRoleFromPlayerRequest) GetPlayerId() string

func (*RemoveRoleFromPlayerRequest) GetRoleId

func (x *RemoveRoleFromPlayerRequest) GetRoleId() string

func (*RemoveRoleFromPlayerRequest) ProtoMessage

func (*RemoveRoleFromPlayerRequest) ProtoMessage()

func (*RemoveRoleFromPlayerRequest) ProtoReflect

func (*RemoveRoleFromPlayerRequest) Reset

func (x *RemoveRoleFromPlayerRequest) Reset()

func (*RemoveRoleFromPlayerRequest) String

func (x *RemoveRoleFromPlayerRequest) String() string

type RemoveRoleFromPlayerResponse

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

func (*RemoveRoleFromPlayerResponse) Descriptor deprecated

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

Deprecated: Use RemoveRoleFromPlayerResponse.ProtoReflect.Descriptor instead.

func (*RemoveRoleFromPlayerResponse) ProtoMessage

func (*RemoveRoleFromPlayerResponse) ProtoMessage()

func (*RemoveRoleFromPlayerResponse) ProtoReflect

func (*RemoveRoleFromPlayerResponse) Reset

func (x *RemoveRoleFromPlayerResponse) Reset()

func (*RemoveRoleFromPlayerResponse) String

type RoleCreateRequest

type RoleCreateRequest struct {
	Id            string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Priority      uint32  `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"`
	DisplayPrefix *string `protobuf:"bytes,3,opt,name=display_prefix,json=displayPrefix,proto3,oneof" json:"display_prefix,omitempty"`
	DisplayName   *string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3,oneof" json:"display_name,omitempty"`
	// contains filtered or unexported fields
}

func (*RoleCreateRequest) Descriptor deprecated

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

Deprecated: Use RoleCreateRequest.ProtoReflect.Descriptor instead.

func (*RoleCreateRequest) GetDisplayName

func (x *RoleCreateRequest) GetDisplayName() string

func (*RoleCreateRequest) GetDisplayPrefix

func (x *RoleCreateRequest) GetDisplayPrefix() string

func (*RoleCreateRequest) GetId

func (x *RoleCreateRequest) GetId() string

func (*RoleCreateRequest) GetPriority

func (x *RoleCreateRequest) GetPriority() uint32

func (*RoleCreateRequest) ProtoMessage

func (*RoleCreateRequest) ProtoMessage()

func (*RoleCreateRequest) ProtoReflect

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

func (*RoleCreateRequest) Reset

func (x *RoleCreateRequest) Reset()

func (*RoleCreateRequest) String

func (x *RoleCreateRequest) String() string

type RoleUpdateRequest

type RoleUpdateRequest struct {
	Id               string                       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Priority         *uint32                      `protobuf:"varint,2,opt,name=priority,proto3,oneof" json:"priority,omitempty"`
	DisplayPrefix    *string                      `protobuf:"bytes,3,opt,name=display_prefix,json=displayPrefix,proto3,oneof" json:"display_prefix,omitempty"`
	DisplayName      *string                      `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3,oneof" json:"display_name,omitempty"`
	SetPermissions   []*permission.PermissionNode `protobuf:"bytes,5,rep,name=set_permissions,json=setPermissions,proto3" json:"set_permissions,omitempty"`
	UnsetPermissions []string                     `protobuf:"bytes,6,rep,name=unset_permissions,json=unsetPermissions,proto3" json:"unset_permissions,omitempty"`
	// contains filtered or unexported fields
}

func (*RoleUpdateRequest) Descriptor deprecated

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

Deprecated: Use RoleUpdateRequest.ProtoReflect.Descriptor instead.

func (*RoleUpdateRequest) GetDisplayName

func (x *RoleUpdateRequest) GetDisplayName() string

func (*RoleUpdateRequest) GetDisplayPrefix

func (x *RoleUpdateRequest) GetDisplayPrefix() string

func (*RoleUpdateRequest) GetId

func (x *RoleUpdateRequest) GetId() string

func (*RoleUpdateRequest) GetPriority

func (x *RoleUpdateRequest) GetPriority() uint32

func (*RoleUpdateRequest) GetSetPermissions

func (x *RoleUpdateRequest) GetSetPermissions() []*permission.PermissionNode

func (*RoleUpdateRequest) GetUnsetPermissions

func (x *RoleUpdateRequest) GetUnsetPermissions() []string

func (*RoleUpdateRequest) ProtoMessage

func (*RoleUpdateRequest) ProtoMessage()

func (*RoleUpdateRequest) ProtoReflect

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

func (*RoleUpdateRequest) Reset

func (x *RoleUpdateRequest) Reset()

func (*RoleUpdateRequest) String

func (x *RoleUpdateRequest) String() string

type UnimplementedPermissionServiceServer

type UnimplementedPermissionServiceServer struct {
}

UnimplementedPermissionServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPermissionServiceServer) AddRoleToPlayer

func (UnimplementedPermissionServiceServer) CreateRole

func (UnimplementedPermissionServiceServer) GetAllRoles

func (UnimplementedPermissionServiceServer) GetPlayerRoles

func (UnimplementedPermissionServiceServer) RemoveRoleFromPlayer

func (UnimplementedPermissionServiceServer) UpdateRole

type UnsafePermissionServiceServer

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

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

type UpdateRoleResponse

type UpdateRoleResponse struct {
	Role *permission.Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRoleResponse) Descriptor deprecated

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

Deprecated: Use UpdateRoleResponse.ProtoReflect.Descriptor instead.

func (*UpdateRoleResponse) GetRole

func (x *UpdateRoleResponse) GetRole() *permission.Role

func (*UpdateRoleResponse) ProtoMessage

func (*UpdateRoleResponse) ProtoMessage()

func (*UpdateRoleResponse) ProtoReflect

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

func (*UpdateRoleResponse) Reset

func (x *UpdateRoleResponse) Reset()

func (*UpdateRoleResponse) String

func (x *UpdateRoleResponse) String() string

Jump to

Keyboard shortcuts

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