Documentation ¶
Index ¶
- Variables
- func RegisterUsersCRUDServer(s *grpc.Server, srv UsersCRUDServer)
- type ID
- type ListUserReq
- type ListUserRes
- type UnimplementedUsersCRUDServer
- func (*UnimplementedUsersCRUDServer) CreateUser(context.Context, *UserInput) (*UserResponse, error)
- func (*UnimplementedUsersCRUDServer) DeleteUser(context.Context, *ID) (*UserResponse, error)
- func (*UnimplementedUsersCRUDServer) ListUsers(context.Context, *ListUserReq) (*ListUserRes, error)
- func (*UnimplementedUsersCRUDServer) ReadUser(context.Context, *ID) (*User, error)
- func (*UnimplementedUsersCRUDServer) UpdateUser(context.Context, *UserInput) (*UserResponse, error)
- type User
- type UserInput
- func (*UserInput) Descriptor() ([]byte, []int)deprecated
- func (x *UserInput) GetId() uint64
- func (x *UserInput) GetPassword() string
- func (x *UserInput) GetUsername() string
- func (*UserInput) ProtoMessage()
- func (x *UserInput) ProtoReflect() protoreflect.Message
- func (x *UserInput) Reset()
- func (x *UserInput) String() string
- type UserResponse
- type UsersCRUDClient
- type UsersCRUDServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_users_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUsersCRUDServer ¶
func RegisterUsersCRUDServer(s *grpc.Server, srv UsersCRUDServer)
Types ¶
type ID ¶
type ID struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ID) Descriptor
deprecated
func (*ID) ProtoMessage ¶
func (*ID) ProtoMessage()
func (*ID) ProtoReflect ¶
func (x *ID) ProtoReflect() protoreflect.Message
type ListUserReq ¶
type ListUserReq struct {
// contains filtered or unexported fields
}
func (*ListUserReq) Descriptor
deprecated
func (*ListUserReq) Descriptor() ([]byte, []int)
Deprecated: Use ListUserReq.ProtoReflect.Descriptor instead.
func (*ListUserReq) ProtoMessage ¶
func (*ListUserReq) ProtoMessage()
func (*ListUserReq) ProtoReflect ¶
func (x *ListUserReq) ProtoReflect() protoreflect.Message
func (*ListUserReq) Reset ¶
func (x *ListUserReq) Reset()
func (*ListUserReq) String ¶
func (x *ListUserReq) String() string
type ListUserRes ¶
type ListUserRes struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*ListUserRes) Descriptor
deprecated
func (*ListUserRes) Descriptor() ([]byte, []int)
Deprecated: Use ListUserRes.ProtoReflect.Descriptor instead.
func (*ListUserRes) GetUsers ¶
func (x *ListUserRes) GetUsers() []*User
func (*ListUserRes) ProtoMessage ¶
func (*ListUserRes) ProtoMessage()
func (*ListUserRes) ProtoReflect ¶
func (x *ListUserRes) ProtoReflect() protoreflect.Message
func (*ListUserRes) Reset ¶
func (x *ListUserRes) Reset()
func (*ListUserRes) String ¶
func (x *ListUserRes) String() string
type UnimplementedUsersCRUDServer ¶
type UnimplementedUsersCRUDServer struct { }
UnimplementedUsersCRUDServer can be embedded to have forward compatible implementations.
func (*UnimplementedUsersCRUDServer) CreateUser ¶
func (*UnimplementedUsersCRUDServer) CreateUser(context.Context, *UserInput) (*UserResponse, error)
func (*UnimplementedUsersCRUDServer) DeleteUser ¶
func (*UnimplementedUsersCRUDServer) DeleteUser(context.Context, *ID) (*UserResponse, error)
func (*UnimplementedUsersCRUDServer) ListUsers ¶
func (*UnimplementedUsersCRUDServer) ListUsers(context.Context, *ListUserReq) (*ListUserRes, error)
func (*UnimplementedUsersCRUDServer) UpdateUser ¶
func (*UnimplementedUsersCRUDServer) UpdateUser(context.Context, *UserInput) (*UserResponse, error)
type User ¶
type User struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserInput ¶
type UserInput struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*UserInput) Descriptor
deprecated
func (*UserInput) GetPassword ¶
func (*UserInput) GetUsername ¶
func (*UserInput) ProtoMessage ¶
func (*UserInput) ProtoMessage()
func (*UserInput) ProtoReflect ¶
func (x *UserInput) ProtoReflect() protoreflect.Message
type UserResponse ¶
type UserResponse struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*UserResponse) Descriptor
deprecated
func (*UserResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.
func (*UserResponse) GetId ¶
func (x *UserResponse) GetId() uint64
func (*UserResponse) ProtoMessage ¶
func (*UserResponse) ProtoMessage()
func (*UserResponse) ProtoReflect ¶
func (x *UserResponse) ProtoReflect() protoreflect.Message
func (*UserResponse) Reset ¶
func (x *UserResponse) Reset()
func (*UserResponse) String ¶
func (x *UserResponse) String() string
type UsersCRUDClient ¶
type UsersCRUDClient interface { CreateUser(ctx context.Context, in *UserInput, opts ...grpc.CallOption) (*UserResponse, error) ReadUser(ctx context.Context, in *ID, opts ...grpc.CallOption) (*User, error) UpdateUser(ctx context.Context, in *UserInput, opts ...grpc.CallOption) (*UserResponse, error) DeleteUser(ctx context.Context, in *ID, opts ...grpc.CallOption) (*UserResponse, error) ListUsers(ctx context.Context, in *ListUserReq, opts ...grpc.CallOption) (*ListUserRes, error) }
UsersCRUDClient is the client API for UsersCRUD service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUsersCRUDClient ¶
func NewUsersCRUDClient(cc grpc.ClientConnInterface) UsersCRUDClient
type UsersCRUDServer ¶
type UsersCRUDServer interface { CreateUser(context.Context, *UserInput) (*UserResponse, error) ReadUser(context.Context, *ID) (*User, error) UpdateUser(context.Context, *UserInput) (*UserResponse, error) DeleteUser(context.Context, *ID) (*UserResponse, error) ListUsers(context.Context, *ListUserReq) (*ListUserRes, error) }
UsersCRUDServer is the server API for UsersCRUD service.
Click to show internal directories.
Click to hide internal directories.