Documentation ¶
Overview ¶
Package proto is a generated protocol buffer package.
It is generated from these files:
api.proto
It has these top-level messages:
Empty UserCreateType UserGetType User
Index ¶
- func RegisterFilesServiceServer(s *grpc.Server, srv FilesServiceServer)
- func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)
- type Empty
- type FilesServiceClient
- type FilesServiceServer
- type User
- type UserCreateType
- type UserGetType
- type UserServiceClient
- type UserServiceServer
- type UserService_ListClient
- type UserService_ListServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterFilesServiceServer ¶
func RegisterFilesServiceServer(s *grpc.Server, srv FilesServiceServer)
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)
Types ¶
type Empty ¶
type Empty struct { }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
type FilesServiceClient ¶
type FilesServiceClient interface { }
func NewFilesServiceClient ¶
func NewFilesServiceClient(cc *grpc.ClientConn) FilesServiceClient
type FilesServiceServer ¶
type FilesServiceServer interface { }
type User ¶
type User struct { Age uint32 `protobuf:"varint,1,opt,name=age" json:"age,omitempty"` Email string `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"` Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` Sex string `protobuf:"bytes,4,opt,name=sex" json:"sex,omitempty"` }
func (*User) Descriptor ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
type UserCreateType ¶
type UserCreateType struct { Age uint32 `protobuf:"varint,1,opt,name=age" json:"age,omitempty"` Email string `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"` Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` Sex string `protobuf:"bytes,4,opt,name=sex" json:"sex,omitempty"` Type_ string `protobuf:"bytes,5,opt,name=type_,json=type" json:"type_,omitempty"` }
func (*UserCreateType) Descriptor ¶
func (*UserCreateType) Descriptor() ([]byte, []int)
func (*UserCreateType) ProtoMessage ¶
func (*UserCreateType) ProtoMessage()
func (*UserCreateType) Reset ¶
func (m *UserCreateType) Reset()
func (*UserCreateType) String ¶
func (m *UserCreateType) String() string
type UserGetType ¶
type UserGetType struct {
UserID int32 `protobuf:"varint,1,opt,name=userID" json:"userID,omitempty"`
}
func (*UserGetType) Descriptor ¶
func (*UserGetType) Descriptor() ([]byte, []int)
func (*UserGetType) ProtoMessage ¶
func (*UserGetType) ProtoMessage()
func (*UserGetType) Reset ¶
func (m *UserGetType) Reset()
func (*UserGetType) String ¶
func (m *UserGetType) String() string
type UserServiceClient ¶
type UserServiceClient interface { Create(ctx context.Context, in *UserCreateType, opts ...grpc.CallOption) (*Empty, error) Get(ctx context.Context, in *UserGetType, opts ...grpc.CallOption) (*User, error) List(ctx context.Context, in *Empty, opts ...grpc.CallOption) (UserService_ListClient, error) }
func NewUserServiceClient ¶
func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { Create(context.Context, *UserCreateType) (*Empty, error) Get(context.Context, *UserGetType) (*User, error) List(*Empty, UserService_ListServer) error }
type UserService_ListClient ¶
type UserService_ListClient interface { Recv() (*User, error) grpc.ClientStream }
type UserService_ListServer ¶
type UserService_ListServer interface { Send(*User) error grpc.ServerStream }
Click to show internal directories.
Click to hide internal directories.