Documentation ¶
Index ¶
- Variables
- func RegisterUserQueryServiceServer(s *grpc.Server, srv UserQueryServiceServer)
- func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetGender() int32
- func (x *CreateUserRequest) GetNickname() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetPhone() string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type CreateUserResponse
- type UnimplementedUserQueryServiceServer
- type UnimplementedUserServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetGender() int32
- func (x *User) GetId() string
- func (x *User) GetNickname() string
- func (x *User) GetPhone() string
- func (x *User) GetUpdatedAt() *timestamppb.Timestamp
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserInfoRequest
- type UserInfoResponse
- type UserPageRequest
- func (*UserPageRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserPageRequest) GetPage() int32
- func (x *UserPageRequest) GetSize() int32
- func (*UserPageRequest) ProtoMessage()
- func (x *UserPageRequest) ProtoReflect() protoreflect.Message
- func (x *UserPageRequest) Reset()
- func (x *UserPageRequest) String() string
- type UserPageResponse
- func (*UserPageResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserPageResponse) GetEdges() []*User
- func (x *UserPageResponse) GetTotalCount() int64
- func (*UserPageResponse) ProtoMessage()
- func (x *UserPageResponse) ProtoReflect() protoreflect.Message
- func (x *UserPageResponse) Reset()
- func (x *UserPageResponse) String() string
- type UserQueryServiceClient
- type UserQueryServiceServer
- type UserServiceClient
- type UserServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_user_proto protoreflect.FileDescriptor
var File_user_query_service_proto protoreflect.FileDescriptor
var File_user_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUserQueryServiceServer ¶
func RegisterUserQueryServiceServer(s *grpc.Server, srv UserQueryServiceServer)
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct { Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` Gender int32 `protobuf:"varint,4,opt,name=gender,proto3" json:"gender,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetGender ¶
func (x *CreateUserRequest) GetGender() int32
func (*CreateUserRequest) GetNickname ¶
func (x *CreateUserRequest) GetNickname() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetPhone ¶
func (x *CreateUserRequest) GetPhone() string
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
type CreateUserResponse ¶
type CreateUserResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CreateUserResponse) Descriptor
deprecated
func (*CreateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.
func (*CreateUserResponse) GetId ¶
func (x *CreateUserResponse) GetId() string
func (*CreateUserResponse) ProtoMessage ¶
func (*CreateUserResponse) ProtoMessage()
func (*CreateUserResponse) ProtoReflect ¶
func (x *CreateUserResponse) ProtoReflect() protoreflect.Message
func (*CreateUserResponse) Reset ¶
func (x *CreateUserResponse) Reset()
func (*CreateUserResponse) String ¶
func (x *CreateUserResponse) String() string
type UnimplementedUserQueryServiceServer ¶
type UnimplementedUserQueryServiceServer struct { }
UnimplementedUserQueryServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedUserQueryServiceServer) UserInfo ¶
func (*UnimplementedUserQueryServiceServer) UserInfo(context.Context, *UserInfoRequest) (*UserInfoResponse, error)
func (*UnimplementedUserQueryServiceServer) UserPage ¶
func (*UnimplementedUserQueryServiceServer) UserPage(context.Context, *UserPageRequest) (*UserPageResponse, error)
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedUserServiceServer) CreateUser ¶
func (*UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"` Nickname string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname,omitempty"` Gender int32 `protobuf:"varint,4,opt,name=gender,proto3" json:"gender,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetNickname ¶
func (*User) GetUpdatedAt ¶
func (x *User) GetUpdatedAt() *timestamppb.Timestamp
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserInfoRequest ¶
type UserInfoRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*UserInfoRequest) Descriptor
deprecated
func (*UserInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoRequest.ProtoReflect.Descriptor instead.
func (*UserInfoRequest) GetId ¶
func (x *UserInfoRequest) GetId() string
func (*UserInfoRequest) ProtoMessage ¶
func (*UserInfoRequest) ProtoMessage()
func (*UserInfoRequest) ProtoReflect ¶
func (x *UserInfoRequest) ProtoReflect() protoreflect.Message
func (*UserInfoRequest) Reset ¶
func (x *UserInfoRequest) Reset()
func (*UserInfoRequest) String ¶
func (x *UserInfoRequest) String() string
type UserInfoResponse ¶
type UserInfoResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UserInfoResponse) Descriptor
deprecated
func (*UserInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoResponse.ProtoReflect.Descriptor instead.
func (*UserInfoResponse) GetUser ¶
func (x *UserInfoResponse) GetUser() *User
func (*UserInfoResponse) ProtoMessage ¶
func (*UserInfoResponse) ProtoMessage()
func (*UserInfoResponse) ProtoReflect ¶
func (x *UserInfoResponse) ProtoReflect() protoreflect.Message
func (*UserInfoResponse) Reset ¶
func (x *UserInfoResponse) Reset()
func (*UserInfoResponse) String ¶
func (x *UserInfoResponse) String() string
type UserPageRequest ¶
type UserPageRequest struct { Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` // contains filtered or unexported fields }
func (*UserPageRequest) Descriptor
deprecated
func (*UserPageRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserPageRequest.ProtoReflect.Descriptor instead.
func (*UserPageRequest) GetPage ¶
func (x *UserPageRequest) GetPage() int32
func (*UserPageRequest) GetSize ¶
func (x *UserPageRequest) GetSize() int32
func (*UserPageRequest) ProtoMessage ¶
func (*UserPageRequest) ProtoMessage()
func (*UserPageRequest) ProtoReflect ¶
func (x *UserPageRequest) ProtoReflect() protoreflect.Message
func (*UserPageRequest) Reset ¶
func (x *UserPageRequest) Reset()
func (*UserPageRequest) String ¶
func (x *UserPageRequest) String() string
type UserPageResponse ¶
type UserPageResponse struct { TotalCount int64 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` Edges []*User `protobuf:"bytes,2,rep,name=edges,proto3" json:"edges,omitempty"` // contains filtered or unexported fields }
func (*UserPageResponse) Descriptor
deprecated
func (*UserPageResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserPageResponse.ProtoReflect.Descriptor instead.
func (*UserPageResponse) GetEdges ¶
func (x *UserPageResponse) GetEdges() []*User
func (*UserPageResponse) GetTotalCount ¶
func (x *UserPageResponse) GetTotalCount() int64
func (*UserPageResponse) ProtoMessage ¶
func (*UserPageResponse) ProtoMessage()
func (*UserPageResponse) ProtoReflect ¶
func (x *UserPageResponse) ProtoReflect() protoreflect.Message
func (*UserPageResponse) Reset ¶
func (x *UserPageResponse) Reset()
func (*UserPageResponse) String ¶
func (x *UserPageResponse) String() string
type UserQueryServiceClient ¶
type UserQueryServiceClient interface { UserPage(ctx context.Context, in *UserPageRequest, opts ...grpc.CallOption) (*UserPageResponse, error) UserInfo(ctx context.Context, in *UserInfoRequest, opts ...grpc.CallOption) (*UserInfoResponse, error) }
UserQueryServiceClient is the client API for UserQueryService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserQueryServiceClient ¶
func NewUserQueryServiceClient(cc grpc.ClientConnInterface) UserQueryServiceClient
type UserQueryServiceServer ¶
type UserQueryServiceServer interface { UserPage(context.Context, *UserPageRequest) (*UserPageResponse, error) UserInfo(context.Context, *UserInfoRequest) (*UserInfoResponse, error) }
UserQueryServiceServer is the server API for UserQueryService service.
type UserServiceClient ¶
type UserServiceClient interface {
CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
}
UserServiceClient is the client API for UserService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface {
CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
}
UserServiceServer is the server API for UserService service.