v1

package
v0.0.0-...-b2a1d49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Service_Create_FullMethodName         = "/rpc.v1.Service/Create"
	Service_Update_FullMethodName         = "/rpc.v1.Service/Update"
	Service_UpdateNickname_FullMethodName = "/rpc.v1.Service/UpdateNickname"
	Service_Delete_FullMethodName         = "/rpc.v1.Service/Delete"
	Service_Info_FullMethodName           = "/rpc.v1.Service/Info"
	Service_List_FullMethodName           = "/rpc.v1.Service/List"
)

Variables

View Source
var File_rpc_v1_user_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rpc.v1.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Service_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _Service_Update_Handler,
		},
		{
			MethodName: "UpdateNickname",
			Handler:    _Service_UpdateNickname_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Service_Delete_Handler,
		},
		{
			MethodName: "Info",
			Handler:    _Service_Info_Handler,
		},
		{
			MethodName: "List",
			Handler:    _Service_List_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "rpc/v1/user.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type CreateRequest

type CreateRequest struct {
	Username string    `protobuf:"bytes,1,opt,name=username,proto3" json:"username" form:"username"`                                 // 用户名
	Nickname string    `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname" form:"nickname"`                                 // 昵称
	Phone    string    `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone" form:"phone"`                                          // 手机号码
	Email    string    `protobuf:"bytes,4,opt,name=email,proto3" json:"email" form:"email"`                                          // 邮箱
	Password string    `protobuf:"bytes,5,opt,name=password,proto3" json:"password" form:"password"`                                 // 密码
	Gender   v1.Gender `protobuf:"varint,6,opt,name=gender,proto3,enum=repo.v1.Gender" json:"gender" form:"gender" gorm:"default:0"` // 性别
	Avatar   string    `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar" form:"avatar" gorm:"type:char(60);default:''"`       // 头像
	Status   v1.Status `protobuf:"varint,8,opt,name=status,proto3,enum=repo.v1.Status" json:"status" form:"status" gorm:"default:0"` // 状态
	// contains filtered or unexported fields
}

Service | 创建用户请求参数

func (*CreateRequest) Descriptor deprecated

func (*CreateRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetAvatar

func (x *CreateRequest) GetAvatar() string

func (*CreateRequest) GetEmail

func (x *CreateRequest) GetEmail() string

func (*CreateRequest) GetGender

func (x *CreateRequest) GetGender() v1.Gender

func (*CreateRequest) GetNickname

func (x *CreateRequest) GetNickname() string

func (*CreateRequest) GetPassword

func (x *CreateRequest) GetPassword() string

func (*CreateRequest) GetPhone

func (x *CreateRequest) GetPhone() string

func (*CreateRequest) GetStatus

func (x *CreateRequest) GetStatus() v1.Status

func (*CreateRequest) GetUsername

func (x *CreateRequest) GetUsername() string

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

func (*CreateRequest) Validate

func (m *CreateRequest) Validate() error

Validate checks the field values on CreateRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CreateRequest) ValidateAll

func (m *CreateRequest) ValidateAll() error

ValidateAll checks the field values on CreateRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CreateRequestMultiError, or nil if none found.

type CreateRequestMultiError

type CreateRequestMultiError []error

CreateRequestMultiError is an error wrapping multiple validation errors returned by CreateRequest.ValidateAll() if the designated constraints aren't met.

func (CreateRequestMultiError) AllErrors

func (m CreateRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateRequestMultiError) Error

func (m CreateRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CreateRequestValidationError

type CreateRequestValidationError struct {
	// contains filtered or unexported fields
}

CreateRequestValidationError is the validation error returned by CreateRequest.Validate if the designated constraints aren't met.

func (CreateRequestValidationError) Cause

Cause function returns cause value.

func (CreateRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateRequestValidationError) ErrorName

func (e CreateRequestValidationError) ErrorName() string

ErrorName returns error name.

func (CreateRequestValidationError) Field

Field function returns field value.

func (CreateRequestValidationError) Key

Key function returns key value.

func (CreateRequestValidationError) Reason

Reason function returns reason value.

type CreateResponse

type CreateResponse struct {
	Info *v1.User `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
	// contains filtered or unexported fields
}

Service | 创建用户返回数据

func (*CreateResponse) Descriptor deprecated

func (*CreateResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetInfo

func (x *CreateResponse) GetInfo() *v1.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

func (*CreateResponse) Validate

func (m *CreateResponse) Validate() error

Validate checks the field values on CreateResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CreateResponse) ValidateAll

func (m *CreateResponse) ValidateAll() error

ValidateAll checks the field values on CreateResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CreateResponseMultiError, or nil if none found.

type CreateResponseMultiError

type CreateResponseMultiError []error

CreateResponseMultiError is an error wrapping multiple validation errors returned by CreateResponse.ValidateAll() if the designated constraints aren't met.

func (CreateResponseMultiError) AllErrors

func (m CreateResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateResponseMultiError) Error

func (m CreateResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CreateResponseValidationError

type CreateResponseValidationError struct {
	// contains filtered or unexported fields
}

CreateResponseValidationError is the validation error returned by CreateResponse.Validate if the designated constraints aren't met.

func (CreateResponseValidationError) Cause

Cause function returns cause value.

func (CreateResponseValidationError) Error

Error satisfies the builtin error interface

func (CreateResponseValidationError) ErrorName

func (e CreateResponseValidationError) ErrorName() string

ErrorName returns error name.

func (CreateResponseValidationError) Field

Field function returns field value.

func (CreateResponseValidationError) Key

Key function returns key value.

func (CreateResponseValidationError) Reason

Reason function returns reason value.

type DeleteRequest

type DeleteRequest struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Service | 删除用户请求参数

func (*DeleteRequest) Descriptor deprecated

func (*DeleteRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() int64

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

func (*DeleteRequest) Validate

func (m *DeleteRequest) Validate() error

Validate checks the field values on DeleteRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*DeleteRequest) ValidateAll

func (m *DeleteRequest) ValidateAll() error

ValidateAll checks the field values on DeleteRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeleteRequestMultiError, or nil if none found.

type DeleteRequestMultiError

type DeleteRequestMultiError []error

DeleteRequestMultiError is an error wrapping multiple validation errors returned by DeleteRequest.ValidateAll() if the designated constraints aren't met.

func (DeleteRequestMultiError) AllErrors

func (m DeleteRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeleteRequestMultiError) Error

func (m DeleteRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DeleteRequestValidationError

type DeleteRequestValidationError struct {
	// contains filtered or unexported fields
}

DeleteRequestValidationError is the validation error returned by DeleteRequest.Validate if the designated constraints aren't met.

func (DeleteRequestValidationError) Cause

Cause function returns cause value.

func (DeleteRequestValidationError) Error

Error satisfies the builtin error interface

func (DeleteRequestValidationError) ErrorName

func (e DeleteRequestValidationError) ErrorName() string

ErrorName returns error name.

func (DeleteRequestValidationError) Field

Field function returns field value.

func (DeleteRequestValidationError) Key

Key function returns key value.

func (DeleteRequestValidationError) Reason

Reason function returns reason value.

type DeleteResponse

type DeleteResponse struct {
	// contains filtered or unexported fields
}

Service | 删除用户返回数据

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

func (*DeleteResponse) Validate

func (m *DeleteResponse) Validate() error

Validate checks the field values on DeleteResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*DeleteResponse) ValidateAll

func (m *DeleteResponse) ValidateAll() error

ValidateAll checks the field values on DeleteResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeleteResponseMultiError, or nil if none found.

type DeleteResponseMultiError

type DeleteResponseMultiError []error

DeleteResponseMultiError is an error wrapping multiple validation errors returned by DeleteResponse.ValidateAll() if the designated constraints aren't met.

func (DeleteResponseMultiError) AllErrors

func (m DeleteResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeleteResponseMultiError) Error

func (m DeleteResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DeleteResponseValidationError

type DeleteResponseValidationError struct {
	// contains filtered or unexported fields
}

DeleteResponseValidationError is the validation error returned by DeleteResponse.Validate if the designated constraints aren't met.

func (DeleteResponseValidationError) Cause

Cause function returns cause value.

func (DeleteResponseValidationError) Error

Error satisfies the builtin error interface

func (DeleteResponseValidationError) ErrorName

func (e DeleteResponseValidationError) ErrorName() string

ErrorName returns error name.

func (DeleteResponseValidationError) Field

Field function returns field value.

func (DeleteResponseValidationError) Key

Key function returns key value.

func (DeleteResponseValidationError) Reason

Reason function returns reason value.

type InfoRequest

type InfoRequest struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Service | 用户详情请求参数

func (*InfoRequest) Descriptor deprecated

func (*InfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.

func (*InfoRequest) GetId

func (x *InfoRequest) GetId() int64

func (*InfoRequest) ProtoMessage

func (*InfoRequest) ProtoMessage()

func (*InfoRequest) ProtoReflect

func (x *InfoRequest) ProtoReflect() protoreflect.Message

func (*InfoRequest) Reset

func (x *InfoRequest) Reset()

func (*InfoRequest) String

func (x *InfoRequest) String() string

func (*InfoRequest) Validate

func (m *InfoRequest) Validate() error

Validate checks the field values on InfoRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*InfoRequest) ValidateAll

func (m *InfoRequest) ValidateAll() error

ValidateAll checks the field values on InfoRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in InfoRequestMultiError, or nil if none found.

type InfoRequestMultiError

type InfoRequestMultiError []error

InfoRequestMultiError is an error wrapping multiple validation errors returned by InfoRequest.ValidateAll() if the designated constraints aren't met.

func (InfoRequestMultiError) AllErrors

func (m InfoRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (InfoRequestMultiError) Error

func (m InfoRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type InfoRequestValidationError

type InfoRequestValidationError struct {
	// contains filtered or unexported fields
}

InfoRequestValidationError is the validation error returned by InfoRequest.Validate if the designated constraints aren't met.

func (InfoRequestValidationError) Cause

Cause function returns cause value.

func (InfoRequestValidationError) Error

Error satisfies the builtin error interface

func (InfoRequestValidationError) ErrorName

func (e InfoRequestValidationError) ErrorName() string

ErrorName returns error name.

func (InfoRequestValidationError) Field

Field function returns field value.

func (InfoRequestValidationError) Key

Key function returns key value.

func (InfoRequestValidationError) Reason

Reason function returns reason value.

type InfoResponse

type InfoResponse struct {
	Info *v1.User `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
	// contains filtered or unexported fields
}

Service | 用户详情返回数据

func (*InfoResponse) Descriptor deprecated

func (*InfoResponse) Descriptor() ([]byte, []int)

Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.

func (*InfoResponse) GetInfo

func (x *InfoResponse) GetInfo() *v1.User

func (*InfoResponse) ProtoMessage

func (*InfoResponse) ProtoMessage()

func (*InfoResponse) ProtoReflect

func (x *InfoResponse) ProtoReflect() protoreflect.Message

func (*InfoResponse) Reset

func (x *InfoResponse) Reset()

func (*InfoResponse) String

func (x *InfoResponse) String() string

func (*InfoResponse) Validate

func (m *InfoResponse) Validate() error

Validate checks the field values on InfoResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*InfoResponse) ValidateAll

func (m *InfoResponse) ValidateAll() error

ValidateAll checks the field values on InfoResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in InfoResponseMultiError, or nil if none found.

type InfoResponseMultiError

type InfoResponseMultiError []error

InfoResponseMultiError is an error wrapping multiple validation errors returned by InfoResponse.ValidateAll() if the designated constraints aren't met.

func (InfoResponseMultiError) AllErrors

func (m InfoResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (InfoResponseMultiError) Error

func (m InfoResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type InfoResponseValidationError

type InfoResponseValidationError struct {
	// contains filtered or unexported fields
}

InfoResponseValidationError is the validation error returned by InfoResponse.Validate if the designated constraints aren't met.

func (InfoResponseValidationError) Cause

Cause function returns cause value.

func (InfoResponseValidationError) Error

Error satisfies the builtin error interface

func (InfoResponseValidationError) ErrorName

func (e InfoResponseValidationError) ErrorName() string

ErrorName returns error name.

func (InfoResponseValidationError) Field

Field function returns field value.

func (InfoResponseValidationError) Key

Key function returns key value.

func (InfoResponseValidationError) Reason

Reason function returns reason value.

type ListRequest

type ListRequest struct {
	Page     int64     `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` // page
	Limit    int64     `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	Username string    `protobuf:"bytes,3,opt,name=username,proto3" json:"username" form:"username"`                                 // 用户名
	Nickname string    `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname" form:"nickname"`                                 // 昵称
	Phone    string    `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone" form:"phone"`                                          // 手机号码
	Email    string    `protobuf:"bytes,6,opt,name=email,proto3" json:"email" form:"email"`                                          // 邮箱
	Gender   v1.Gender `protobuf:"varint,7,opt,name=gender,proto3,enum=repo.v1.Gender" json:"gender" form:"gender" gorm:"default:0"` // 性别
	Status   v1.Status `protobuf:"varint,8,opt,name=status,proto3,enum=repo.v1.Status" json:"status" form:"status" gorm:"default:0"` // 状态
	// contains filtered or unexported fields
}

Service | 用户列表请求参数

func (*ListRequest) Descriptor deprecated

func (*ListRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetEmail

func (x *ListRequest) GetEmail() string

func (*ListRequest) GetGender

func (x *ListRequest) GetGender() v1.Gender

func (*ListRequest) GetLimit

func (x *ListRequest) GetLimit() int64

func (*ListRequest) GetNickname

func (x *ListRequest) GetNickname() string

func (*ListRequest) GetPage

func (x *ListRequest) GetPage() int64

func (*ListRequest) GetPhone

func (x *ListRequest) GetPhone() string

func (*ListRequest) GetStatus

func (x *ListRequest) GetStatus() v1.Status

func (*ListRequest) GetUsername

func (x *ListRequest) GetUsername() string

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

func (*ListRequest) Validate

func (m *ListRequest) Validate() error

Validate checks the field values on ListRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListRequest) ValidateAll

func (m *ListRequest) ValidateAll() error

ValidateAll checks the field values on ListRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListRequestMultiError, or nil if none found.

type ListRequestMultiError

type ListRequestMultiError []error

ListRequestMultiError is an error wrapping multiple validation errors returned by ListRequest.ValidateAll() if the designated constraints aren't met.

func (ListRequestMultiError) AllErrors

func (m ListRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListRequestMultiError) Error

func (m ListRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ListRequestValidationError

type ListRequestValidationError struct {
	// contains filtered or unexported fields
}

ListRequestValidationError is the validation error returned by ListRequest.Validate if the designated constraints aren't met.

func (ListRequestValidationError) Cause

Cause function returns cause value.

func (ListRequestValidationError) Error

Error satisfies the builtin error interface

func (ListRequestValidationError) ErrorName

func (e ListRequestValidationError) ErrorName() string

ErrorName returns error name.

func (ListRequestValidationError) Field

Field function returns field value.

func (ListRequestValidationError) Key

Key function returns key value.

func (ListRequestValidationError) Reason

Reason function returns reason value.

type ListResponse

type ListResponse struct {
	List  []*v1.User `protobuf:"bytes,1,rep,name=list,proto3" json:"list"`
	Total int64      `protobuf:"varint,2,opt,name=total,proto3" json:"total"`
	// contains filtered or unexported fields
}

Service | 用户列表返回数据

func (*ListResponse) Descriptor deprecated

func (*ListResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetList

func (x *ListResponse) GetList() []*v1.User

func (*ListResponse) GetTotal

func (x *ListResponse) GetTotal() int64

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

func (*ListResponse) Validate

func (m *ListResponse) Validate() error

Validate checks the field values on ListResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListResponse) ValidateAll

func (m *ListResponse) ValidateAll() error

ValidateAll checks the field values on ListResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListResponseMultiError, or nil if none found.

type ListResponseMultiError

type ListResponseMultiError []error

ListResponseMultiError is an error wrapping multiple validation errors returned by ListResponse.ValidateAll() if the designated constraints aren't met.

func (ListResponseMultiError) AllErrors

func (m ListResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListResponseMultiError) Error

func (m ListResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ListResponseValidationError

type ListResponseValidationError struct {
	// contains filtered or unexported fields
}

ListResponseValidationError is the validation error returned by ListResponse.Validate if the designated constraints aren't met.

func (ListResponseValidationError) Cause

Cause function returns cause value.

func (ListResponseValidationError) Error

Error satisfies the builtin error interface

func (ListResponseValidationError) ErrorName

func (e ListResponseValidationError) ErrorName() string

ErrorName returns error name.

func (ListResponseValidationError) Field

Field function returns field value.

func (ListResponseValidationError) Key

Key function returns key value.

func (ListResponseValidationError) Reason

Reason function returns reason value.

type ServiceClient

type ServiceClient interface {
	// 创建用户
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	// 更新用户
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
	// 更新用户昵称
	UpdateNickname(ctx context.Context, in *UpdateNicknameRequest, opts ...grpc.CallOption) (*UpdateNicknameResponse, error)
	// 删除用户
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	// 用户详情
	Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
	// 用户列表
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	// 创建用户
	Create(context.Context, *CreateRequest) (*CreateResponse, error)
	// 更新用户
	Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
	// 更新用户昵称
	UpdateNickname(context.Context, *UpdateNicknameRequest) (*UpdateNicknameResponse, error)
	// 删除用户
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	// 用户详情
	Info(context.Context, *InfoRequest) (*InfoResponse, error)
	// 用户列表
	List(context.Context, *ListRequest) (*ListResponse, error)
}

ServiceServer is the server API for Service service. All implementations should embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) Create

func (UnimplementedServiceServer) Delete

func (UnimplementedServiceServer) Info

func (UnimplementedServiceServer) List

func (UnimplementedServiceServer) Update

func (UnimplementedServiceServer) UpdateNickname

type UnsafeServiceServer

type UnsafeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

type UpdateNicknameRequest

type UpdateNicknameRequest struct {
	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                  // id
	Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname" form:"nickname"` // 昵称
	// contains filtered or unexported fields
}

Service | 更新用户昵称请求参数

func (*UpdateNicknameRequest) Descriptor deprecated

func (*UpdateNicknameRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateNicknameRequest.ProtoReflect.Descriptor instead.

func (*UpdateNicknameRequest) GetId

func (x *UpdateNicknameRequest) GetId() int64

func (*UpdateNicknameRequest) GetNickname

func (x *UpdateNicknameRequest) GetNickname() string

func (*UpdateNicknameRequest) ProtoMessage

func (*UpdateNicknameRequest) ProtoMessage()

func (*UpdateNicknameRequest) ProtoReflect

func (x *UpdateNicknameRequest) ProtoReflect() protoreflect.Message

func (*UpdateNicknameRequest) Reset

func (x *UpdateNicknameRequest) Reset()

func (*UpdateNicknameRequest) String

func (x *UpdateNicknameRequest) String() string

func (*UpdateNicknameRequest) Validate

func (m *UpdateNicknameRequest) Validate() error

Validate checks the field values on UpdateNicknameRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UpdateNicknameRequest) ValidateAll

func (m *UpdateNicknameRequest) ValidateAll() error

ValidateAll checks the field values on UpdateNicknameRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateNicknameRequestMultiError, or nil if none found.

type UpdateNicknameRequestMultiError

type UpdateNicknameRequestMultiError []error

UpdateNicknameRequestMultiError is an error wrapping multiple validation errors returned by UpdateNicknameRequest.ValidateAll() if the designated constraints aren't met.

func (UpdateNicknameRequestMultiError) AllErrors

func (m UpdateNicknameRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateNicknameRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UpdateNicknameRequestValidationError

type UpdateNicknameRequestValidationError struct {
	// contains filtered or unexported fields
}

UpdateNicknameRequestValidationError is the validation error returned by UpdateNicknameRequest.Validate if the designated constraints aren't met.

func (UpdateNicknameRequestValidationError) Cause

Cause function returns cause value.

func (UpdateNicknameRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateNicknameRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdateNicknameRequestValidationError) Field

Field function returns field value.

func (UpdateNicknameRequestValidationError) Key

Key function returns key value.

func (UpdateNicknameRequestValidationError) Reason

Reason function returns reason value.

type UpdateNicknameResponse

type UpdateNicknameResponse struct {
	// contains filtered or unexported fields
}

Service | 更新用户昵称返回数据

func (*UpdateNicknameResponse) Descriptor deprecated

func (*UpdateNicknameResponse) Descriptor() ([]byte, []int)

Deprecated: Use UpdateNicknameResponse.ProtoReflect.Descriptor instead.

func (*UpdateNicknameResponse) ProtoMessage

func (*UpdateNicknameResponse) ProtoMessage()

func (*UpdateNicknameResponse) ProtoReflect

func (x *UpdateNicknameResponse) ProtoReflect() protoreflect.Message

func (*UpdateNicknameResponse) Reset

func (x *UpdateNicknameResponse) Reset()

func (*UpdateNicknameResponse) String

func (x *UpdateNicknameResponse) String() string

func (*UpdateNicknameResponse) Validate

func (m *UpdateNicknameResponse) Validate() error

Validate checks the field values on UpdateNicknameResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UpdateNicknameResponse) ValidateAll

func (m *UpdateNicknameResponse) ValidateAll() error

ValidateAll checks the field values on UpdateNicknameResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateNicknameResponseMultiError, or nil if none found.

type UpdateNicknameResponseMultiError

type UpdateNicknameResponseMultiError []error

UpdateNicknameResponseMultiError is an error wrapping multiple validation errors returned by UpdateNicknameResponse.ValidateAll() if the designated constraints aren't met.

func (UpdateNicknameResponseMultiError) AllErrors

func (m UpdateNicknameResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateNicknameResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UpdateNicknameResponseValidationError

type UpdateNicknameResponseValidationError struct {
	// contains filtered or unexported fields
}

UpdateNicknameResponseValidationError is the validation error returned by UpdateNicknameResponse.Validate if the designated constraints aren't met.

func (UpdateNicknameResponseValidationError) Cause

Cause function returns cause value.

func (UpdateNicknameResponseValidationError) Error

Error satisfies the builtin error interface

func (UpdateNicknameResponseValidationError) ErrorName

ErrorName returns error name.

func (UpdateNicknameResponseValidationError) Field

Field function returns field value.

func (UpdateNicknameResponseValidationError) Key

Key function returns key value.

func (UpdateNicknameResponseValidationError) Reason

Reason function returns reason value.

type UpdateRequest

type UpdateRequest struct {
	Id       int64     `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                                  // id
	Username string    `protobuf:"bytes,2,opt,name=username,proto3" json:"username" form:"username"`                                 // 用户名
	Nickname string    `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname" form:"nickname"`                                 // 昵称
	Phone    string    `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone" form:"phone"`                                          // 手机号码
	Email    string    `protobuf:"bytes,5,opt,name=email,proto3" json:"email" form:"email"`                                          // 邮箱
	Password string    `protobuf:"bytes,6,opt,name=password,proto3" json:"password" form:"password"`                                 // 密码
	Gender   v1.Gender `protobuf:"varint,7,opt,name=gender,proto3,enum=repo.v1.Gender" json:"gender" form:"gender" gorm:"default:0"` // 性别
	Avatar   string    `protobuf:"bytes,8,opt,name=avatar,proto3" json:"avatar" form:"avatar" gorm:"type:char(60);default:''"`       // 头像
	Status   v1.Status `protobuf:"varint,9,opt,name=status,proto3,enum=repo.v1.Status" json:"status" form:"status" gorm:"default:0"` // 状态
	// contains filtered or unexported fields
}

Service | 更新用户请求参数

func (*UpdateRequest) Descriptor deprecated

func (*UpdateRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetAvatar

func (x *UpdateRequest) GetAvatar() string

func (*UpdateRequest) GetEmail

func (x *UpdateRequest) GetEmail() string

func (*UpdateRequest) GetGender

func (x *UpdateRequest) GetGender() v1.Gender

func (*UpdateRequest) GetId

func (x *UpdateRequest) GetId() int64

func (*UpdateRequest) GetNickname

func (x *UpdateRequest) GetNickname() string

func (*UpdateRequest) GetPassword

func (x *UpdateRequest) GetPassword() string

func (*UpdateRequest) GetPhone

func (x *UpdateRequest) GetPhone() string

func (*UpdateRequest) GetStatus

func (x *UpdateRequest) GetStatus() v1.Status

func (*UpdateRequest) GetUsername

func (x *UpdateRequest) GetUsername() string

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

func (*UpdateRequest) Validate

func (m *UpdateRequest) Validate() error

Validate checks the field values on UpdateRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UpdateRequest) ValidateAll

func (m *UpdateRequest) ValidateAll() error

ValidateAll checks the field values on UpdateRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateRequestMultiError, or nil if none found.

type UpdateRequestMultiError

type UpdateRequestMultiError []error

UpdateRequestMultiError is an error wrapping multiple validation errors returned by UpdateRequest.ValidateAll() if the designated constraints aren't met.

func (UpdateRequestMultiError) AllErrors

func (m UpdateRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateRequestMultiError) Error

func (m UpdateRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type UpdateRequestValidationError

type UpdateRequestValidationError struct {
	// contains filtered or unexported fields
}

UpdateRequestValidationError is the validation error returned by UpdateRequest.Validate if the designated constraints aren't met.

func (UpdateRequestValidationError) Cause

Cause function returns cause value.

func (UpdateRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateRequestValidationError) ErrorName

func (e UpdateRequestValidationError) ErrorName() string

ErrorName returns error name.

func (UpdateRequestValidationError) Field

Field function returns field value.

func (UpdateRequestValidationError) Key

Key function returns key value.

func (UpdateRequestValidationError) Reason

Reason function returns reason value.

type UpdateResponse

type UpdateResponse struct {
	Info *v1.User `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
	// contains filtered or unexported fields
}

Service | 更新用户返回数据

func (*UpdateResponse) Descriptor deprecated

func (*UpdateResponse) Descriptor() ([]byte, []int)

Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.

func (*UpdateResponse) GetInfo

func (x *UpdateResponse) GetInfo() *v1.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

func (*UpdateResponse) Validate

func (m *UpdateResponse) Validate() error

Validate checks the field values on UpdateResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UpdateResponse) ValidateAll

func (m *UpdateResponse) ValidateAll() error

ValidateAll checks the field values on UpdateResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateResponseMultiError, or nil if none found.

type UpdateResponseMultiError

type UpdateResponseMultiError []error

UpdateResponseMultiError is an error wrapping multiple validation errors returned by UpdateResponse.ValidateAll() if the designated constraints aren't met.

func (UpdateResponseMultiError) AllErrors

func (m UpdateResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateResponseMultiError) Error

func (m UpdateResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type UpdateResponseValidationError

type UpdateResponseValidationError struct {
	// contains filtered or unexported fields
}

UpdateResponseValidationError is the validation error returned by UpdateResponse.Validate if the designated constraints aren't met.

func (UpdateResponseValidationError) Cause

Cause function returns cause value.

func (UpdateResponseValidationError) Error

Error satisfies the builtin error interface

func (UpdateResponseValidationError) ErrorName

func (e UpdateResponseValidationError) ErrorName() string

ErrorName returns error name.

func (UpdateResponseValidationError) Field

Field function returns field value.

func (UpdateResponseValidationError) Key

Key function returns key value.

func (UpdateResponseValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL