services

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUserServiceServer

func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)

Types

type UserInfo

type UserInfo struct {
	// @inject_tag: checking:"required,CheckName"
	UserId               int32    `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" checking:"required,CheckName"`
	UserScore            int32    `protobuf:"varint,2,opt,name=user_score,json=userScore,proto3" json:"user_score,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

用户模型

func (*UserInfo) Descriptor

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

func (*UserInfo) GetUserId

func (m *UserInfo) GetUserId() int32

func (*UserInfo) GetUserScore

func (m *UserInfo) GetUserScore() int32

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) Reset

func (m *UserInfo) Reset()

func (*UserInfo) String

func (m *UserInfo) String() string

func (*UserInfo) XXX_DiscardUnknown

func (m *UserInfo) XXX_DiscardUnknown()

func (*UserInfo) XXX_Marshal

func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserInfo) XXX_Merge

func (dst *UserInfo) XXX_Merge(src proto.Message)

func (*UserInfo) XXX_Size

func (m *UserInfo) XXX_Size() int

func (*UserInfo) XXX_Unmarshal

func (m *UserInfo) XXX_Unmarshal(b []byte) error

type UserScoreRequest

type UserScoreRequest struct {
	Users                []*UserInfo `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*UserScoreRequest) Descriptor

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

func (*UserScoreRequest) GetUsers

func (m *UserScoreRequest) GetUsers() []*UserInfo

func (*UserScoreRequest) ProtoMessage

func (*UserScoreRequest) ProtoMessage()

func (*UserScoreRequest) Reset

func (m *UserScoreRequest) Reset()

func (*UserScoreRequest) String

func (m *UserScoreRequest) String() string

func (*UserScoreRequest) XXX_DiscardUnknown

func (m *UserScoreRequest) XXX_DiscardUnknown()

func (*UserScoreRequest) XXX_Marshal

func (m *UserScoreRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserScoreRequest) XXX_Merge

func (dst *UserScoreRequest) XXX_Merge(src proto.Message)

func (*UserScoreRequest) XXX_Size

func (m *UserScoreRequest) XXX_Size() int

func (*UserScoreRequest) XXX_Unmarshal

func (m *UserScoreRequest) XXX_Unmarshal(b []byte) error

type UserScoreResponse

type UserScoreResponse struct {
	Users                []*UserInfo `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*UserScoreResponse) Descriptor

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

func (*UserScoreResponse) GetUsers

func (m *UserScoreResponse) GetUsers() []*UserInfo

func (*UserScoreResponse) ProtoMessage

func (*UserScoreResponse) ProtoMessage()

func (*UserScoreResponse) Reset

func (m *UserScoreResponse) Reset()

func (*UserScoreResponse) String

func (m *UserScoreResponse) String() string

func (*UserScoreResponse) XXX_DiscardUnknown

func (m *UserScoreResponse) XXX_DiscardUnknown()

func (*UserScoreResponse) XXX_Marshal

func (m *UserScoreResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserScoreResponse) XXX_Merge

func (dst *UserScoreResponse) XXX_Merge(src proto.Message)

func (*UserScoreResponse) XXX_Size

func (m *UserScoreResponse) XXX_Size() int

func (*UserScoreResponse) XXX_Unmarshal

func (m *UserScoreResponse) XXX_Unmarshal(b []byte) error

type UserServiceClient

type UserServiceClient interface {
	GetUserScore(ctx context.Context, in *UserScoreRequest, opts ...grpc.CallOption) (*UserScoreResponse, error)
	GetUserScoreByServerStream(ctx context.Context, in *UserScoreRequest, opts ...grpc.CallOption) (UserService_GetUserScoreByServerStreamClient, error)
	GetUserScoreByClientStream(ctx context.Context, opts ...grpc.CallOption) (UserService_GetUserScoreByClientStreamClient, error)
	GetUserScoreByTWS(ctx context.Context, opts ...grpc.CallOption) (UserService_GetUserScoreByTWSClient, error)
}

UserServiceClient is the client API for UserService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewUserServiceClient

func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient

type UserServiceServer

type UserServiceServer interface {
	GetUserScore(context.Context, *UserScoreRequest) (*UserScoreResponse, error)
	GetUserScoreByServerStream(*UserScoreRequest, UserService_GetUserScoreByServerStreamServer) error
	GetUserScoreByClientStream(UserService_GetUserScoreByClientStreamServer) error
	GetUserScoreByTWS(UserService_GetUserScoreByTWSServer) error
}

UserServiceServer is the server API for UserService service.

type UserService_GetUserScoreByClientStreamClient

type UserService_GetUserScoreByClientStreamClient interface {
	Send(*UserScoreRequest) error
	CloseAndRecv() (*UserScoreResponse, error)
	grpc.ClientStream
}

type UserService_GetUserScoreByClientStreamServer

type UserService_GetUserScoreByClientStreamServer interface {
	SendAndClose(*UserScoreResponse) error
	Recv() (*UserScoreRequest, error)
	grpc.ServerStream
}

type UserService_GetUserScoreByServerStreamClient

type UserService_GetUserScoreByServerStreamClient interface {
	Recv() (*UserScoreResponse, error)
	grpc.ClientStream
}

type UserService_GetUserScoreByServerStreamServer

type UserService_GetUserScoreByServerStreamServer interface {
	Send(*UserScoreResponse) error
	grpc.ServerStream
}

type UserService_GetUserScoreByTWSClient

type UserService_GetUserScoreByTWSClient interface {
	Send(*UserScoreRequest) error
	Recv() (*UserScoreResponse, error)
	grpc.ClientStream
}

type UserService_GetUserScoreByTWSServer

type UserService_GetUserScoreByTWSServer interface {
	Send(*UserScoreResponse) error
	Recv() (*UserScoreRequest, error)
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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