Documentation ¶
Overview ¶
Package user is a generated protocol buffer package.
It is generated from these files:
user/user.proto
It has these top-level messages:
User CreateUserRequest GetUserRequest ListUsersRequest ListUsersResponse DeleteUserRequest
Package user is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package user is a generated protocol buffer package.
It is generated from these files:
user/user.proto
It has these top-level messages:
User CreateUserRequest GetUserRequest ListUsersRequest ListUsersResponse DeleteUserRequest
Index ¶
- func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)
- func (m *CreateUserRequest) GetAddress() string
- func (m *CreateUserRequest) GetEmail() string
- func (m *CreateUserRequest) GetName() string
- func (*CreateUserRequest) ProtoMessage()
- func (m *CreateUserRequest) Reset()
- func (m *CreateUserRequest) String() string
- func (this *CreateUserRequest) Validate() error
- type DeleteUserRequest
- type GetUserRequest
- type ListUsersRequest
- type ListUsersResponse
- type User
- type UserServiceClient
- type UserServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterUserServiceHandler ¶
func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterUserServiceHandler registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserServiceHandlerFromEndpoint ¶
func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserServiceHandlerFromEndpoint is same as RegisterUserServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Address string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"` Email string `protobuf:"bytes,3,opt,name=email" json:"email,omitempty"` }
func (*CreateUserRequest) Descriptor ¶
func (*CreateUserRequest) Descriptor() ([]byte, []int)
func (*CreateUserRequest) GetAddress ¶
func (m *CreateUserRequest) GetAddress() string
func (*CreateUserRequest) GetEmail ¶
func (m *CreateUserRequest) GetEmail() string
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
func (*CreateUserRequest) Validate ¶
func (this *CreateUserRequest) Validate() error
type DeleteUserRequest ¶
type DeleteUserRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (*DeleteUserRequest) Descriptor ¶
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
func (*DeleteUserRequest) GetId ¶
func (m *DeleteUserRequest) GetId() string
func (*DeleteUserRequest) ProtoMessage ¶
func (*DeleteUserRequest) ProtoMessage()
func (*DeleteUserRequest) Reset ¶
func (m *DeleteUserRequest) Reset()
func (*DeleteUserRequest) String ¶
func (m *DeleteUserRequest) String() string
func (*DeleteUserRequest) Validate ¶
func (this *DeleteUserRequest) Validate() error
type GetUserRequest ¶
type GetUserRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" 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
func (*GetUserRequest) Validate ¶
func (this *GetUserRequest) Validate() error
type ListUsersRequest ¶
type ListUsersRequest struct { }
func (*ListUsersRequest) Descriptor ¶
func (*ListUsersRequest) Descriptor() ([]byte, []int)
func (*ListUsersRequest) ProtoMessage ¶
func (*ListUsersRequest) ProtoMessage()
func (*ListUsersRequest) Reset ¶
func (m *ListUsersRequest) Reset()
func (*ListUsersRequest) String ¶
func (m *ListUsersRequest) String() string
func (*ListUsersRequest) Validate ¶
func (this *ListUsersRequest) Validate() error
type ListUsersResponse ¶
type ListUsersResponse struct {
Users []*User `protobuf:"bytes,1,rep,name=users" json:"users,omitempty"`
}
func (*ListUsersResponse) Descriptor ¶
func (*ListUsersResponse) Descriptor() ([]byte, []int)
func (*ListUsersResponse) GetUsers ¶
func (m *ListUsersResponse) GetUsers() []*User
func (*ListUsersResponse) ProtoMessage ¶
func (*ListUsersResponse) ProtoMessage()
func (*ListUsersResponse) Reset ¶
func (m *ListUsersResponse) Reset()
func (*ListUsersResponse) String ¶
func (m *ListUsersResponse) String() string
func (*ListUsersResponse) Validate ¶
func (this *ListUsersResponse) Validate() error
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Address string `protobuf:"bytes,3,opt,name=address" json:"address,omitempty"` Email string `protobuf:"bytes,4,opt,name=email" json:"email,omitempty"` }
func (*User) Descriptor ¶
func (*User) GetAddress ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
type UserServiceClient ¶
type UserServiceClient interface { CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*User, error) UpdateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error) }
func NewUserServiceClient ¶
func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { CreateUser(context.Context, *CreateUserRequest) (*User, error) GetUser(context.Context, *GetUserRequest) (*User, error) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) DeleteUser(context.Context, *DeleteUserRequest) (*User, error) UpdateUser(context.Context, *User) (*User, error) }
Click to show internal directories.
Click to hide internal directories.