Documentation ¶
Index ¶
- Variables
- func RegisterQueryServiceServer(s grpc.ServiceRegistrar, srv QueryServiceServer)
- type CreateUserReq
- func (*CreateUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserReq) GetActive() bool
- func (x *CreateUserReq) GetEmail() string
- func (x *CreateUserReq) GetID() string
- func (x *CreateUserReq) GetPassword() string
- func (x *CreateUserReq) GetRoot() bool
- func (x *CreateUserReq) GetUsername() string
- func (*CreateUserReq) ProtoMessage()
- func (x *CreateUserReq) ProtoReflect() protoreflect.Message
- func (x *CreateUserReq) Reset()
- func (x *CreateUserReq) String() string
- type CreateUserRes
- type DeleteUserByIdReq
- type DeleteUserByIdRes
- type GetUserByIdReq
- type GetUserByIdRes
- type QueryServiceClient
- type QueryServiceServer
- type SearchReq
- func (*SearchReq) Descriptor() ([]byte, []int)deprecated
- func (x *SearchReq) GetPage() int64
- func (x *SearchReq) GetSearch() string
- func (x *SearchReq) GetSize() int64
- func (*SearchReq) ProtoMessage()
- func (x *SearchReq) ProtoReflect() protoreflect.Message
- func (x *SearchReq) Reset()
- func (x *SearchReq) String() string
- type SearchRes
- func (*SearchRes) Descriptor() ([]byte, []int)deprecated
- func (x *SearchRes) GetHasMore() bool
- func (x *SearchRes) GetPage() int64
- func (x *SearchRes) GetSize() int64
- func (x *SearchRes) GetTotalCount() int64
- func (x *SearchRes) GetTotalPages() int64
- func (x *SearchRes) GetUsers() []*User
- func (*SearchRes) ProtoMessage()
- func (x *SearchRes) ProtoReflect() protoreflect.Message
- func (x *SearchRes) Reset()
- func (x *SearchRes) String() string
- type UnimplementedQueryServiceServer
- func (UnimplementedQueryServiceServer) CreateUser(context.Context, *CreateUserReq) (*CreateUserRes, error)
- func (UnimplementedQueryServiceServer) DeleteUserByID(context.Context, *DeleteUserByIdReq) (*DeleteUserByIdRes, error)
- func (UnimplementedQueryServiceServer) GetUserById(context.Context, *GetUserByIdReq) (*GetUserByIdRes, error)
- func (UnimplementedQueryServiceServer) SearchUser(context.Context, *SearchReq) (*SearchRes, error)
- func (UnimplementedQueryServiceServer) UpdateUser(context.Context, *UpdateUserReq) (*UpdateUserRes, error)
- type UnsafeQueryServiceServer
- type UpdateUserReq
- func (*UpdateUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserReq) GetEmail() string
- func (x *UpdateUserReq) GetID() string
- func (x *UpdateUserReq) GetUsername() string
- func (*UpdateUserReq) ProtoMessage()
- func (x *UpdateUserReq) ProtoReflect() protoreflect.Message
- func (x *UpdateUserReq) Reset()
- func (x *UpdateUserReq) String() string
- type UpdateUserRes
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetActive() bool
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetID() string
- func (x *User) GetPassword() string
- func (x *User) GetRoot() bool
- func (x *User) GetUpdatedAt() *timestamppb.Timestamp
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
Constants ¶
This section is empty.
Variables ¶
var File_user_query_messages_proto protoreflect.FileDescriptor
var File_user_query_proto protoreflect.FileDescriptor
var QueryService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "queryService.queryService", HandlerType: (*QueryServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _QueryService_CreateUser_Handler, }, { MethodName: "UpdateUser", Handler: _QueryService_UpdateUser_Handler, }, { MethodName: "GetUserById", Handler: _QueryService_GetUserById_Handler, }, { MethodName: "SearchUser", Handler: _QueryService_SearchUser_Handler, }, { MethodName: "DeleteUserByID", Handler: _QueryService_DeleteUserByID_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user_query.proto", }
QueryService_ServiceDesc is the grpc.ServiceDesc for QueryService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterQueryServiceServer ¶
func RegisterQueryServiceServer(s grpc.ServiceRegistrar, srv QueryServiceServer)
Types ¶
type CreateUserReq ¶
type CreateUserReq struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Email string `protobuf:"bytes,2,opt,name=Email,proto3" json:"Email,omitempty"` Username string `protobuf:"bytes,3,opt,name=Username,proto3" json:"Username,omitempty"` Password string `protobuf:"bytes,4,opt,name=Password,proto3" json:"Password,omitempty"` Root bool `protobuf:"varint,5,opt,name=Root,proto3" json:"Root,omitempty"` Active bool `protobuf:"varint,6,opt,name=Active,proto3" json:"Active,omitempty"` // contains filtered or unexported fields }
func (*CreateUserReq) Descriptor
deprecated
func (*CreateUserReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserReq.ProtoReflect.Descriptor instead.
func (*CreateUserReq) GetActive ¶
func (x *CreateUserReq) GetActive() bool
func (*CreateUserReq) GetEmail ¶
func (x *CreateUserReq) GetEmail() string
func (*CreateUserReq) GetID ¶
func (x *CreateUserReq) GetID() string
func (*CreateUserReq) GetPassword ¶
func (x *CreateUserReq) GetPassword() string
func (*CreateUserReq) GetRoot ¶
func (x *CreateUserReq) GetRoot() bool
func (*CreateUserReq) GetUsername ¶
func (x *CreateUserReq) GetUsername() string
func (*CreateUserReq) ProtoMessage ¶
func (*CreateUserReq) ProtoMessage()
func (*CreateUserReq) ProtoReflect ¶
func (x *CreateUserReq) ProtoReflect() protoreflect.Message
func (*CreateUserReq) Reset ¶
func (x *CreateUserReq) Reset()
func (*CreateUserReq) String ¶
func (x *CreateUserReq) String() string
type CreateUserRes ¶
type CreateUserRes struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRes) Descriptor
deprecated
func (*CreateUserRes) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRes.ProtoReflect.Descriptor instead.
func (*CreateUserRes) GetID ¶
func (x *CreateUserRes) GetID() string
func (*CreateUserRes) ProtoMessage ¶
func (*CreateUserRes) ProtoMessage()
func (*CreateUserRes) ProtoReflect ¶
func (x *CreateUserRes) ProtoReflect() protoreflect.Message
func (*CreateUserRes) Reset ¶
func (x *CreateUserRes) Reset()
func (*CreateUserRes) String ¶
func (x *CreateUserRes) String() string
type DeleteUserByIdReq ¶
type DeleteUserByIdReq struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` // contains filtered or unexported fields }
func (*DeleteUserByIdReq) Descriptor
deprecated
func (*DeleteUserByIdReq) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserByIdReq.ProtoReflect.Descriptor instead.
func (*DeleteUserByIdReq) GetID ¶
func (x *DeleteUserByIdReq) GetID() string
func (*DeleteUserByIdReq) ProtoMessage ¶
func (*DeleteUserByIdReq) ProtoMessage()
func (*DeleteUserByIdReq) ProtoReflect ¶
func (x *DeleteUserByIdReq) ProtoReflect() protoreflect.Message
func (*DeleteUserByIdReq) Reset ¶
func (x *DeleteUserByIdReq) Reset()
func (*DeleteUserByIdReq) String ¶
func (x *DeleteUserByIdReq) String() string
type DeleteUserByIdRes ¶
type DeleteUserByIdRes struct {
// contains filtered or unexported fields
}
func (*DeleteUserByIdRes) Descriptor
deprecated
func (*DeleteUserByIdRes) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserByIdRes.ProtoReflect.Descriptor instead.
func (*DeleteUserByIdRes) ProtoMessage ¶
func (*DeleteUserByIdRes) ProtoMessage()
func (*DeleteUserByIdRes) ProtoReflect ¶
func (x *DeleteUserByIdRes) ProtoReflect() protoreflect.Message
func (*DeleteUserByIdRes) Reset ¶
func (x *DeleteUserByIdRes) Reset()
func (*DeleteUserByIdRes) String ¶
func (x *DeleteUserByIdRes) String() string
type GetUserByIdReq ¶
type GetUserByIdReq struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` // contains filtered or unexported fields }
func (*GetUserByIdReq) Descriptor
deprecated
func (*GetUserByIdReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByIdReq.ProtoReflect.Descriptor instead.
func (*GetUserByIdReq) GetID ¶
func (x *GetUserByIdReq) GetID() string
func (*GetUserByIdReq) ProtoMessage ¶
func (*GetUserByIdReq) ProtoMessage()
func (*GetUserByIdReq) ProtoReflect ¶
func (x *GetUserByIdReq) ProtoReflect() protoreflect.Message
func (*GetUserByIdReq) Reset ¶
func (x *GetUserByIdReq) Reset()
func (*GetUserByIdReq) String ¶
func (x *GetUserByIdReq) String() string
type GetUserByIdRes ¶
type GetUserByIdRes struct { User *User `protobuf:"bytes,1,opt,name=User,proto3" json:"User,omitempty"` // contains filtered or unexported fields }
func (*GetUserByIdRes) Descriptor
deprecated
func (*GetUserByIdRes) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByIdRes.ProtoReflect.Descriptor instead.
func (*GetUserByIdRes) GetUser ¶
func (x *GetUserByIdRes) GetUser() *User
func (*GetUserByIdRes) ProtoMessage ¶
func (*GetUserByIdRes) ProtoMessage()
func (*GetUserByIdRes) ProtoReflect ¶
func (x *GetUserByIdRes) ProtoReflect() protoreflect.Message
func (*GetUserByIdRes) Reset ¶
func (x *GetUserByIdRes) Reset()
func (*GetUserByIdRes) String ¶
func (x *GetUserByIdRes) String() string
type QueryServiceClient ¶
type QueryServiceClient interface { CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*CreateUserRes, error) UpdateUser(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*UpdateUserRes, error) GetUserById(ctx context.Context, in *GetUserByIdReq, opts ...grpc.CallOption) (*GetUserByIdRes, error) SearchUser(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchRes, error) DeleteUserByID(ctx context.Context, in *DeleteUserByIdReq, opts ...grpc.CallOption) (*DeleteUserByIdRes, error) }
QueryServiceClient is the client API for QueryService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewQueryServiceClient ¶
func NewQueryServiceClient(cc grpc.ClientConnInterface) QueryServiceClient
type QueryServiceServer ¶
type QueryServiceServer interface { CreateUser(context.Context, *CreateUserReq) (*CreateUserRes, error) UpdateUser(context.Context, *UpdateUserReq) (*UpdateUserRes, error) GetUserById(context.Context, *GetUserByIdReq) (*GetUserByIdRes, error) SearchUser(context.Context, *SearchReq) (*SearchRes, error) DeleteUserByID(context.Context, *DeleteUserByIdReq) (*DeleteUserByIdRes, error) }
QueryServiceServer is the server API for QueryService service. All implementations should embed UnimplementedQueryServiceServer for forward compatibility
type SearchReq ¶
type SearchReq struct { Search string `protobuf:"bytes,1,opt,name=Search,proto3" json:"Search,omitempty"` Page int64 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` // contains filtered or unexported fields }
func (*SearchReq) Descriptor
deprecated
func (*SearchReq) ProtoMessage ¶
func (*SearchReq) ProtoMessage()
func (*SearchReq) ProtoReflect ¶
func (x *SearchReq) ProtoReflect() protoreflect.Message
type SearchRes ¶
type SearchRes struct { TotalCount int64 `protobuf:"varint,1,opt,name=TotalCount,proto3" json:"TotalCount,omitempty"` TotalPages int64 `protobuf:"varint,2,opt,name=TotalPages,proto3" json:"TotalPages,omitempty"` Page int64 `protobuf:"varint,3,opt,name=Page,proto3" json:"Page,omitempty"` Size int64 `protobuf:"varint,4,opt,name=Size,proto3" json:"Size,omitempty"` HasMore bool `protobuf:"varint,5,opt,name=HasMore,proto3" json:"HasMore,omitempty"` Users []*User `protobuf:"bytes,6,rep,name=Users,proto3" json:"Users,omitempty"` // contains filtered or unexported fields }
func (*SearchRes) Descriptor
deprecated
func (*SearchRes) GetHasMore ¶
func (*SearchRes) GetTotalCount ¶
func (*SearchRes) GetTotalPages ¶
func (*SearchRes) ProtoMessage ¶
func (*SearchRes) ProtoMessage()
func (*SearchRes) ProtoReflect ¶
func (x *SearchRes) ProtoReflect() protoreflect.Message
type UnimplementedQueryServiceServer ¶
type UnimplementedQueryServiceServer struct { }
UnimplementedQueryServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedQueryServiceServer) CreateUser ¶
func (UnimplementedQueryServiceServer) CreateUser(context.Context, *CreateUserReq) (*CreateUserRes, error)
func (UnimplementedQueryServiceServer) DeleteUserByID ¶
func (UnimplementedQueryServiceServer) DeleteUserByID(context.Context, *DeleteUserByIdReq) (*DeleteUserByIdRes, error)
func (UnimplementedQueryServiceServer) GetUserById ¶
func (UnimplementedQueryServiceServer) GetUserById(context.Context, *GetUserByIdReq) (*GetUserByIdRes, error)
func (UnimplementedQueryServiceServer) SearchUser ¶
func (UnimplementedQueryServiceServer) UpdateUser ¶
func (UnimplementedQueryServiceServer) UpdateUser(context.Context, *UpdateUserReq) (*UpdateUserRes, error)
type UnsafeQueryServiceServer ¶
type UnsafeQueryServiceServer interface {
// contains filtered or unexported methods
}
UnsafeQueryServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueryServiceServer will result in compilation errors.
type UpdateUserReq ¶
type UpdateUserReq struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Email string `protobuf:"bytes,2,opt,name=Email,proto3" json:"Email,omitempty"` Username string `protobuf:"bytes,3,opt,name=Username,proto3" json:"Username,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserReq) Descriptor
deprecated
func (*UpdateUserReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserReq.ProtoReflect.Descriptor instead.
func (*UpdateUserReq) GetEmail ¶
func (x *UpdateUserReq) GetEmail() string
func (*UpdateUserReq) GetID ¶
func (x *UpdateUserReq) GetID() string
func (*UpdateUserReq) GetUsername ¶
func (x *UpdateUserReq) GetUsername() string
func (*UpdateUserReq) ProtoMessage ¶
func (*UpdateUserReq) ProtoMessage()
func (*UpdateUserReq) ProtoReflect ¶
func (x *UpdateUserReq) ProtoReflect() protoreflect.Message
func (*UpdateUserReq) Reset ¶
func (x *UpdateUserReq) Reset()
func (*UpdateUserReq) String ¶
func (x *UpdateUserReq) String() string
type UpdateUserRes ¶
type UpdateUserRes struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserRes) Descriptor
deprecated
func (*UpdateUserRes) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRes.ProtoReflect.Descriptor instead.
func (*UpdateUserRes) GetID ¶
func (x *UpdateUserRes) GetID() string
func (*UpdateUserRes) ProtoMessage ¶
func (*UpdateUserRes) ProtoMessage()
func (*UpdateUserRes) ProtoReflect ¶
func (x *UpdateUserRes) ProtoReflect() protoreflect.Message
func (*UpdateUserRes) Reset ¶
func (x *UpdateUserRes) Reset()
func (*UpdateUserRes) String ¶
func (x *UpdateUserRes) String() string
type User ¶
type User struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Email string `protobuf:"bytes,2,opt,name=Email,proto3" json:"Email,omitempty"` Username string `protobuf:"bytes,3,opt,name=Username,proto3" json:"Username,omitempty"` Password string `protobuf:"bytes,4,opt,name=Password,proto3" json:"Password,omitempty"` Root bool `protobuf:"varint,5,opt,name=Root,proto3" json:"Root,omitempty"` Active bool `protobuf:"varint,6,opt,name=Active,proto3" json:"Active,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetPassword ¶
func (*User) GetUpdatedAt ¶
func (x *User) GetUpdatedAt() *timestamppb.Timestamp
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message