Documentation ¶
Overview ¶
Package user is a generated protocol buffer package.
It is generated from these files:
services/user/user.proto
It has these top-level messages:
CreateUserRequest CreateUserResponse GetUserRequest GetUserResponse User
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (*CreateUserRequest) Descriptor ¶
func (*CreateUserRequest) Descriptor() ([]byte, []int)
func (*CreateUserRequest) GetName ¶
func (m *CreateUserRequest) GetName() string
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) Reset ¶
func (m *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (m *CreateUserRequest) String() string
type CreateUserResponse ¶
type CreateUserResponse struct { User *User `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"` }
func (*CreateUserResponse) Descriptor ¶
func (*CreateUserResponse) Descriptor() ([]byte, []int)
func (*CreateUserResponse) GetErrMsg ¶
func (m *CreateUserResponse) GetErrMsg() string
func (*CreateUserResponse) GetUser ¶
func (m *CreateUserResponse) GetUser() *User
func (*CreateUserResponse) ProtoMessage ¶
func (*CreateUserResponse) ProtoMessage()
func (*CreateUserResponse) Reset ¶
func (m *CreateUserResponse) Reset()
func (*CreateUserResponse) String ¶
func (m *CreateUserResponse) String() string
type GetUserRequest ¶
type GetUserRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (*GetUserRequest) Descriptor ¶
func (*GetUserRequest) Descriptor() ([]byte, []int)
func (*GetUserRequest) GetId ¶
func (m *GetUserRequest) GetId() string
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) Reset ¶
func (m *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (m *GetUserRequest) String() string
type GetUserResponse ¶
type GetUserResponse struct { User *User `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"` }
func (*GetUserResponse) Descriptor ¶
func (*GetUserResponse) Descriptor() ([]byte, []int)
func (*GetUserResponse) GetErrMsg ¶
func (m *GetUserResponse) GetErrMsg() string
func (*GetUserResponse) GetUser ¶
func (m *GetUserResponse) GetUser() *User
func (*GetUserResponse) ProtoMessage ¶
func (*GetUserResponse) ProtoMessage()
func (*GetUserResponse) Reset ¶
func (m *GetUserResponse) Reset()
func (*GetUserResponse) String ¶
func (m *GetUserResponse) String() string
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` }
func (*User) Descriptor ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
type UserServiceClient ¶
type UserServiceClient interface { CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) }
func NewUserServiceClient ¶
func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) }
Click to show internal directories.
Click to hide internal directories.