Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type ChangePasswordRequest
- func (*ChangePasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChangePasswordRequest) GetNewPassword() string
- func (x *ChangePasswordRequest) GetUserId() uint64
- func (*ChangePasswordRequest) ProtoMessage()
- func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message
- func (x *ChangePasswordRequest) Reset()
- func (x *ChangePasswordRequest) String() string
- type ChangePasswordResponse
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetOptions() *options.CreateOptions
- func (x *CreateRequest) GetUser() *User
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- type DeleteRequest
- func (*DeleteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteRequest) GetOptions() *options.DeleteOptions
- func (x *DeleteRequest) GetUserId() uint64
- func (*DeleteRequest) ProtoMessage()
- func (x *DeleteRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteRequest) Reset()
- func (x *DeleteRequest) String() string
- type DeleteResponse
- type GetByUsernameRequest
- func (*GetByUsernameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetByUsernameRequest) GetOptions() *options.GetOptions
- func (x *GetByUsernameRequest) GetUsername() string
- func (*GetByUsernameRequest) ProtoMessage()
- func (x *GetByUsernameRequest) ProtoReflect() protoreflect.Message
- func (x *GetByUsernameRequest) Reset()
- func (x *GetByUsernameRequest) String() string
- type GetByUsernameResponse
- func (*GetByUsernameResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetByUsernameResponse) GetUser() *User
- func (*GetByUsernameResponse) ProtoMessage()
- func (x *GetByUsernameResponse) ProtoReflect() protoreflect.Message
- func (x *GetByUsernameResponse) Reset()
- func (x *GetByUsernameResponse) String() string
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetRequest) GetOptions() *options.GetOptions
- func (x *GetRequest) GetUserId() uint64
- func (*GetRequest) ProtoMessage()
- func (x *GetRequest) ProtoReflect() protoreflect.Message
- func (x *GetRequest) Reset()
- func (x *GetRequest) String() string
- type GetResponse
- type ListRequest
- type ListResponse
- type ObjectMeta
- func (*ObjectMeta) Descriptor() ([]byte, []int)deprecated
- func (x *ObjectMeta) GetCreatedAt() *timestamppb.Timestamp
- func (x *ObjectMeta) GetDeletedAt() *timestamppb.Timestamp
- func (x *ObjectMeta) GetExtend() *structpb.Struct
- func (x *ObjectMeta) GetExtendShadow() string
- func (x *ObjectMeta) GetId() uint64
- func (x *ObjectMeta) GetIsDeleted() bool
- func (x *ObjectMeta) GetStatus() int32
- func (x *ObjectMeta) GetUpdatedAt() *timestamppb.Timestamp
- func (*ObjectMeta) ProtoMessage()
- func (x *ObjectMeta) ProtoReflect() protoreflect.Message
- func (x *ObjectMeta) Reset()
- func (x *ObjectMeta) String() string
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error)
- func (UnimplementedUserServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedUserServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
- func (UnimplementedUserServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedUserServiceServer) GetByUsername(context.Context, *GetByUsernameRequest) (*GetByUsernameResponse, error)
- func (UnimplementedUserServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedUserServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
- type UnsafeUserServiceServer
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetOptions() *options.UpdateOptions
- func (x *UpdateRequest) GetUser() *User
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- type UpdateResponse
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetDiscordId() uint64
- func (x *User) GetEmail() string
- func (x *User) GetEmailVerifiedAt() *timestamppb.Timestamp
- func (x *User) GetMeta() *ObjectMeta
- func (x *User) GetName() string
- func (x *User) GetPassword() string
- func (x *User) GetPmLastFour() string
- func (x *User) GetPmType() string
- func (x *User) GetRememberToken() string
- func (x *User) GetStripeId() string
- func (x *User) GetTotalCredits() int32
- func (x *User) GetTrialEndsAt() *timestamppb.Timestamp
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserList
- type UserServiceClient
- type UserServiceServer
Constants ¶
const ( UserService_Create_FullMethodName = "/gotal.user.UserService/Create" UserService_Update_FullMethodName = "/gotal.user.UserService/Update" UserService_Delete_FullMethodName = "/gotal.user.UserService/Delete" UserService_Get_FullMethodName = "/gotal.user.UserService/Get" UserService_List_FullMethodName = "/gotal.user.UserService/List" UserService_ChangePassword_FullMethodName = "/gotal.user.UserService/ChangePassword" UserService_GetByUsername_FullMethodName = "/gotal.user.UserService/GetByUsername" )
Variables ¶
var File_user_user_service_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gotal.user.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _UserService_Create_Handler, }, { MethodName: "Update", Handler: _UserService_Update_Handler, }, { MethodName: "Delete", Handler: _UserService_Delete_Handler, }, { MethodName: "Get", Handler: _UserService_Get_Handler, }, { MethodName: "List", Handler: _UserService_List_Handler, }, { MethodName: "ChangePassword", Handler: _UserService_ChangePassword_Handler, }, { MethodName: "GetByUsername", Handler: _UserService_GetByUsername_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/user_service.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type ChangePasswordRequest ¶
type ChangePasswordRequest struct { UserId uint64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` NewPassword string `protobuf:"bytes,2,opt,name=newPassword,proto3" json:"newPassword,omitempty"` // contains filtered or unexported fields }
func (*ChangePasswordRequest) Descriptor
deprecated
func (*ChangePasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChangePasswordRequest.ProtoReflect.Descriptor instead.
func (*ChangePasswordRequest) GetNewPassword ¶
func (x *ChangePasswordRequest) GetNewPassword() string
func (*ChangePasswordRequest) GetUserId ¶
func (x *ChangePasswordRequest) GetUserId() uint64
func (*ChangePasswordRequest) ProtoMessage ¶
func (*ChangePasswordRequest) ProtoMessage()
func (*ChangePasswordRequest) ProtoReflect ¶
func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message
func (*ChangePasswordRequest) Reset ¶
func (x *ChangePasswordRequest) Reset()
func (*ChangePasswordRequest) String ¶
func (x *ChangePasswordRequest) String() string
type ChangePasswordResponse ¶
type ChangePasswordResponse struct {
// contains filtered or unexported fields
}
func (*ChangePasswordResponse) Descriptor
deprecated
func (*ChangePasswordResponse) Descriptor() ([]byte, []int)
Deprecated: Use ChangePasswordResponse.ProtoReflect.Descriptor instead.
func (*ChangePasswordResponse) ProtoMessage ¶
func (*ChangePasswordResponse) ProtoMessage()
func (*ChangePasswordResponse) ProtoReflect ¶
func (x *ChangePasswordResponse) ProtoReflect() protoreflect.Message
func (*ChangePasswordResponse) Reset ¶
func (x *ChangePasswordResponse) Reset()
func (*ChangePasswordResponse) String ¶
func (x *ChangePasswordResponse) String() string
type CreateRequest ¶
type CreateRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Options *options.CreateOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` // 添加的选项字段 // contains filtered or unexported fields }
扩展CreateRequest消息以包含CreateOptions
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetOptions ¶
func (x *CreateRequest) GetOptions() *options.CreateOptions
func (*CreateRequest) GetUser ¶
func (x *CreateRequest) GetUser() *User
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetUser ¶
func (x *CreateResponse) GetUser() *User
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type DeleteRequest ¶
type DeleteRequest struct { UserId uint64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` Options *options.DeleteOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` // 添加的选项字段 // contains filtered or unexported fields }
扩展DeleteRequest消息以包含DeleteOptions
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetOptions ¶
func (x *DeleteRequest) GetOptions() *options.DeleteOptions
func (*DeleteRequest) GetUserId ¶
func (x *DeleteRequest) GetUserId() uint64
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type DeleteResponse ¶
type DeleteResponse struct {
// contains filtered or unexported fields
}
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (x *DeleteResponse) String() string
type GetByUsernameRequest ¶
type GetByUsernameRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // 用户名字段 Options *options.GetOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
func (*GetByUsernameRequest) Descriptor
deprecated
func (*GetByUsernameRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetByUsernameRequest.ProtoReflect.Descriptor instead.
func (*GetByUsernameRequest) GetOptions ¶
func (x *GetByUsernameRequest) GetOptions() *options.GetOptions
func (*GetByUsernameRequest) GetUsername ¶
func (x *GetByUsernameRequest) GetUsername() string
func (*GetByUsernameRequest) ProtoMessage ¶
func (*GetByUsernameRequest) ProtoMessage()
func (*GetByUsernameRequest) ProtoReflect ¶
func (x *GetByUsernameRequest) ProtoReflect() protoreflect.Message
func (*GetByUsernameRequest) Reset ¶
func (x *GetByUsernameRequest) Reset()
func (*GetByUsernameRequest) String ¶
func (x *GetByUsernameRequest) String() string
type GetByUsernameResponse ¶
type GetByUsernameResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // 返回的用户对象 // contains filtered or unexported fields }
func (*GetByUsernameResponse) Descriptor
deprecated
func (*GetByUsernameResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetByUsernameResponse.ProtoReflect.Descriptor instead.
func (*GetByUsernameResponse) GetUser ¶
func (x *GetByUsernameResponse) GetUser() *User
func (*GetByUsernameResponse) ProtoMessage ¶
func (*GetByUsernameResponse) ProtoMessage()
func (*GetByUsernameResponse) ProtoReflect ¶
func (x *GetByUsernameResponse) ProtoReflect() protoreflect.Message
func (*GetByUsernameResponse) Reset ¶
func (x *GetByUsernameResponse) Reset()
func (*GetByUsernameResponse) String ¶
func (x *GetByUsernameResponse) String() string
type GetRequest ¶
type GetRequest struct { UserId uint64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` Options *options.GetOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetOptions ¶
func (x *GetRequest) GetOptions() *options.GetOptions
func (*GetRequest) GetUserId ¶
func (x *GetRequest) GetUserId() uint64
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetUser ¶
func (x *GetResponse) GetUser() *User
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type ListRequest ¶
type ListRequest struct { Options *options.ListOptions `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` // 添加的选项字段 // contains filtered or unexported fields }
扩展ListRequest消息以包含ListOptions
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetOptions ¶
func (x *ListRequest) GetOptions() *options.ListOptions
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListResponse ¶
type ListResponse struct { Users *UserList `protobuf:"bytes,1,opt,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetUsers ¶
func (x *ListResponse) GetUsers() *UserList
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type ObjectMeta ¶
type ObjectMeta struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Extend *structpb.Struct `protobuf:"bytes,2,opt,name=extend,proto3" json:"extend,omitempty"` // 使用Struct来表示动态键值对 ExtendShadow string `protobuf:"bytes,3,opt,name=extendShadow,proto3" json:"extendShadow,omitempty"` // JSON字符串,可选使用 CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` // 对于DeletedAt,protobuf3不支持直接的nullable类型,可以用bool表示是否被删除,或者使用Timestamp DeletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` IsDeleted bool `protobuf:"varint,7,opt,name=isDeleted,proto3" json:"isDeleted,omitempty"` // 根据需要添加,用于表示是否已删除 Status int32 `protobuf:"varint,8,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*ObjectMeta) Descriptor
deprecated
func (*ObjectMeta) Descriptor() ([]byte, []int)
Deprecated: Use ObjectMeta.ProtoReflect.Descriptor instead.
func (*ObjectMeta) GetCreatedAt ¶
func (x *ObjectMeta) GetCreatedAt() *timestamppb.Timestamp
func (*ObjectMeta) GetDeletedAt ¶
func (x *ObjectMeta) GetDeletedAt() *timestamppb.Timestamp
func (*ObjectMeta) GetExtend ¶
func (x *ObjectMeta) GetExtend() *structpb.Struct
func (*ObjectMeta) GetExtendShadow ¶
func (x *ObjectMeta) GetExtendShadow() string
func (*ObjectMeta) GetId ¶
func (x *ObjectMeta) GetId() uint64
func (*ObjectMeta) GetIsDeleted ¶
func (x *ObjectMeta) GetIsDeleted() bool
func (*ObjectMeta) GetStatus ¶
func (x *ObjectMeta) GetStatus() int32
func (*ObjectMeta) GetUpdatedAt ¶
func (x *ObjectMeta) GetUpdatedAt() *timestamppb.Timestamp
func (*ObjectMeta) ProtoMessage ¶
func (*ObjectMeta) ProtoMessage()
func (*ObjectMeta) ProtoReflect ¶
func (x *ObjectMeta) ProtoReflect() protoreflect.Message
func (*ObjectMeta) Reset ¶
func (x *ObjectMeta) Reset()
func (*ObjectMeta) String ¶
func (x *ObjectMeta) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) ChangePassword ¶
func (UnimplementedUserServiceServer) ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error)
func (UnimplementedUserServiceServer) Create ¶
func (UnimplementedUserServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedUserServiceServer) Delete ¶
func (UnimplementedUserServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (UnimplementedUserServiceServer) Get ¶
func (UnimplementedUserServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedUserServiceServer) GetByUsername ¶
func (UnimplementedUserServiceServer) GetByUsername(context.Context, *GetByUsernameRequest) (*GetByUsernameResponse, error)
func (UnimplementedUserServiceServer) List ¶
func (UnimplementedUserServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedUserServiceServer) Update ¶
func (UnimplementedUserServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UpdateRequest ¶
type UpdateRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Options *options.UpdateOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` // 添加的选项字段 // contains filtered or unexported fields }
扩展UpdateRequest消息以包含UpdateOptions
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetOptions ¶
func (x *UpdateRequest) GetOptions() *options.UpdateOptions
func (*UpdateRequest) GetUser ¶
func (x *UpdateRequest) GetUser() *User
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
type UpdateResponse ¶
type UpdateResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UpdateResponse) Descriptor
deprecated
func (*UpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.
func (*UpdateResponse) GetUser ¶
func (x *UpdateResponse) GetUser() *User
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) ProtoReflect ¶
func (x *UpdateResponse) ProtoReflect() protoreflect.Message
func (*UpdateResponse) Reset ¶
func (x *UpdateResponse) Reset()
func (*UpdateResponse) String ¶
func (x *UpdateResponse) String() string
type User ¶
type User struct { Meta *ObjectMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` EmailVerifiedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=emailVerifiedAt,proto3" json:"emailVerifiedAt,omitempty"` RememberToken string `protobuf:"bytes,5,opt,name=rememberToken,proto3" json:"rememberToken,omitempty"` StripeId string `protobuf:"bytes,6,opt,name=stripeId,proto3" json:"stripeId,omitempty"` DiscordId uint64 `protobuf:"varint,7,opt,name=discordId,proto3" json:"discordId,omitempty"` PmType string `protobuf:"bytes,8,opt,name=pmType,proto3" json:"pmType,omitempty"` PmLastFour string `protobuf:"bytes,9,opt,name=pmLastFour,proto3" json:"pmLastFour,omitempty"` TrialEndsAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=trialEndsAt,proto3" json:"trialEndsAt,omitempty"` TotalCredits int32 `protobuf:"varint,11,opt,name=totalCredits,proto3" json:"totalCredits,omitempty"` Password string `protobuf:"bytes,13,opt,name=password,proto3" json:"password,omitempty"` // 密码字段放在最后 // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetDiscordId ¶
func (*User) GetEmailVerifiedAt ¶
func (x *User) GetEmailVerifiedAt() *timestamppb.Timestamp
func (*User) GetMeta ¶
func (x *User) GetMeta() *ObjectMeta
func (*User) GetPassword ¶
func (*User) GetPmLastFour ¶
func (*User) GetRememberToken ¶
func (*User) GetStripeId ¶
func (*User) GetTotalCredits ¶
func (*User) GetTrialEndsAt ¶
func (x *User) GetTrialEndsAt() *timestamppb.Timestamp
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserList ¶
type UserList struct { Items []*User `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` TotalCount int64 `protobuf:"varint,2,opt,name=totalCount,proto3" json:"totalCount,omitempty"` // contains filtered or unexported fields }
func (*UserList) Descriptor
deprecated
func (*UserList) GetTotalCount ¶
func (*UserList) ProtoMessage ¶
func (*UserList) ProtoMessage()
func (*UserList) ProtoReflect ¶
func (x *UserList) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface { Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) GetByUsername(ctx context.Context, in *GetByUsernameRequest, opts ...grpc.CallOption) (*GetByUsernameResponse, error) }
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { Create(context.Context, *CreateRequest) (*CreateResponse, error) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) Get(context.Context, *GetRequest) (*GetResponse, error) List(context.Context, *ListRequest) (*ListResponse, error) ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error) GetByUsername(context.Context, *GetByUsernameRequest) (*GetByUsernameResponse, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility