example

package
v0.0.0-...-f6076c3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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_example_example_proto protoreflect.FileDescriptor

Functions

func Router

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

Types

type CreateRoleRequest

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

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

Deprecated: Use CreateRoleRequest.ProtoReflect.Descriptor instead.

func (*CreateRoleRequest) GetName

func (x *CreateRoleRequest) GetName() string

func (*CreateRoleRequest) GetProps

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

func (*CreateRoleRequest) GetType

func (x *CreateRoleRequest) GetType() uint32

func (*CreateRoleRequest) ProtoMessage

func (*CreateRoleRequest) ProtoMessage()

func (*CreateRoleRequest) ProtoReflect

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

func (*CreateRoleRequest) Reset

func (x *CreateRoleRequest) Reset()

func (*CreateRoleRequest) String

func (x *CreateRoleRequest) String() string

type CreateRoleResponse

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

func (*CreateRoleResponse) Descriptor deprecated

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

Deprecated: Use CreateRoleResponse.ProtoReflect.Descriptor instead.

func (*CreateRoleResponse) GetSid

func (x *CreateRoleResponse) GetSid() uint32

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

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

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetToken

func (x *LoginRequest) GetToken() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LoginResponse

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

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetSid

func (x *LoginResponse) GetSid() uint32

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

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

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

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