pb

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "USER_NOT_FOUND",
		1: "CONTENT_MISSING",
	}
	ErrorReason_value = map[string]int32{
		"USER_NOT_FOUND":  0,
		"CONTENT_MISSING": 1,
	}
)

Enum value maps for ErrorReason.

View Source
var (
	ID_name = map[int32]string{
		0: "ID_UNSPECIFIED",
		1: "ID_LOGIN_REQUEST",
		2: "ID_LOGIN_RESPONSE",
		3: "ID_CREATE_ROLE_REQUEST",
		4: "ID_CREATE_ROLE_RESPONSE",
	}
	ID_value = map[string]int32{
		"ID_UNSPECIFIED":          0,
		"ID_LOGIN_REQUEST":        1,
		"ID_LOGIN_RESPONSE":       2,
		"ID_CREATE_ROLE_REQUEST":  3,
		"ID_CREATE_ROLE_RESPONSE": 4,
	}
)

Enum value maps for ID.

View Source
var File_error_proto protoreflect.FileDescriptor
View Source
var File_message_proto protoreflect.FileDescriptor

Functions

func ErrorContentMissing

func ErrorContentMissing(format string, args ...interface{}) *errors.Error

func ErrorUserNotFound

func ErrorUserNotFound(format string, args ...interface{}) *errors.Error

func IsContentMissing

func IsContentMissing(err error) bool

func IsUserNotFound

func IsUserNotFound(err error) bool

func Router added in v0.0.2

func Router(ctx ktcp.Context, srv UserServiceKTCPServer) (err error)

Types

type CreateRoleRequest added in v0.0.2

type CreateRoleRequest struct {
	Name  string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type  uint32           `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
	Props map[int32]string `` /* 152-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CreateRoleRequest) Descriptor deprecated added in v0.0.2

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

Deprecated: Use CreateRoleRequest.ProtoReflect.Descriptor instead.

func (*CreateRoleRequest) GetName added in v0.0.2

func (x *CreateRoleRequest) GetName() string

func (*CreateRoleRequest) GetProps added in v0.0.2

func (x *CreateRoleRequest) GetProps() map[int32]string

func (*CreateRoleRequest) GetType added in v0.0.2

func (x *CreateRoleRequest) GetType() uint32

func (*CreateRoleRequest) ProtoMessage added in v0.0.2

func (*CreateRoleRequest) ProtoMessage()

func (*CreateRoleRequest) ProtoReflect added in v0.0.2

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

func (*CreateRoleRequest) Reset added in v0.0.2

func (x *CreateRoleRequest) Reset()

func (*CreateRoleRequest) String added in v0.0.2

func (x *CreateRoleRequest) String() string

type CreateRoleResponse added in v0.0.2

type CreateRoleResponse struct {
	Sid uint32 `protobuf:"varint,1,opt,name=sid,proto3" json:"sid,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRoleResponse) Descriptor deprecated added in v0.0.2

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

Deprecated: Use CreateRoleResponse.ProtoReflect.Descriptor instead.

func (*CreateRoleResponse) GetSid added in v0.0.2

func (x *CreateRoleResponse) GetSid() uint32

func (*CreateRoleResponse) ProtoMessage added in v0.0.2

func (*CreateRoleResponse) ProtoMessage()

func (*CreateRoleResponse) ProtoReflect added in v0.0.2

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

func (*CreateRoleResponse) Reset added in v0.0.2

func (x *CreateRoleResponse) Reset()

func (*CreateRoleResponse) String added in v0.0.2

func (x *CreateRoleResponse) String() string

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_USER_NOT_FOUND  ErrorReason = 0
	ErrorReason_CONTENT_MISSING ErrorReason = 1
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

func (ErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type ID

type ID int32
const (
	ID_ID_UNSPECIFIED          ID = 0
	ID_ID_LOGIN_REQUEST        ID = 1
	ID_ID_LOGIN_RESPONSE       ID = 2
	ID_ID_CREATE_ROLE_REQUEST  ID = 3
	ID_ID_CREATE_ROLE_RESPONSE ID = 4
)

func (ID) Descriptor

func (ID) Descriptor() protoreflect.EnumDescriptor

func (ID) Enum

func (x ID) Enum() *ID

func (ID) EnumDescriptor deprecated

func (ID) EnumDescriptor() ([]byte, []int)

Deprecated: Use ID.Descriptor instead.

func (ID) Number

func (x ID) Number() protoreflect.EnumNumber

func (ID) String

func (x ID) String() string

func (ID) Type

func (ID) Type() protoreflect.EnumType

type LoginRequest added in v0.0.2

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

func (*LoginRequest) Descriptor deprecated added in v0.0.2

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetToken added in v0.0.2

func (x *LoginRequest) GetToken() string

func (*LoginRequest) ProtoMessage added in v0.0.2

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect added in v0.0.2

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

func (*LoginRequest) Reset added in v0.0.2

func (x *LoginRequest) Reset()

func (*LoginRequest) String added in v0.0.2

func (x *LoginRequest) String() string

type LoginResponse added in v0.0.2

type LoginResponse struct {
	Sid uint32 `protobuf:"varint,1,opt,name=sid,proto3" json:"sid,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginResponse) Descriptor deprecated added in v0.0.2

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetSid added in v0.0.2

func (x *LoginResponse) GetSid() uint32

func (*LoginResponse) ProtoMessage added in v0.0.2

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect added in v0.0.2

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

func (*LoginResponse) Reset added in v0.0.2

func (x *LoginResponse) Reset()

func (*LoginResponse) String added in v0.0.2

func (x *LoginResponse) String() string

type UserServiceKTCPServer

type UserServiceKTCPServer interface {
	CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error)
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
}

Jump to

Keyboard shortcuts

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