pb

package
v0.0.0-...-905bf1f Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _UserService_Login_Handler,
		},
		{
			MethodName: "Register",
			Handler:    _UserService_Register_Handler,
		},
		{
			MethodName: "GetInfo",
			Handler:    _UserService_GetInfo_Handler,
		},
		{
			MethodName: "Ban",
			Handler:    _UserService_Ban_Handler,
		},
		{
			MethodName: "ModifyInfo",
			Handler:    _UserService_ModifyInfo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user.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 Ban

type Ban struct {
	Reason  string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason" form:"reason" binding:"required"`                     // @gotags: json:"reason" form:"reason" binding:"required"
	BanAt   int64  `protobuf:"varint,2,opt,name=ban_at,json=banAt,proto3" json:"ban_at" form:"ban_at" binding:"required"`         // @gotags: json:"ban_at" form:"ban_at" binding:"required"
	UnbanAt int64  `protobuf:"varint,3,opt,name=unban_at,json=unbanAt,proto3" json:"unban_at" form:"unban_at" binding:"required"` // @gotags: json:"unban_at" form:"unban_at" binding:"required"
	// contains filtered or unexported fields
}

func (*Ban) Descriptor deprecated

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

Deprecated: Use Ban.ProtoReflect.Descriptor instead.

func (*Ban) GetBanAt

func (x *Ban) GetBanAt() int64

func (*Ban) GetReason

func (x *Ban) GetReason() string

func (*Ban) GetUnbanAt

func (x *Ban) GetUnbanAt() int64

func (*Ban) ProtoMessage

func (*Ban) ProtoMessage()

func (*Ban) ProtoReflect

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

func (*Ban) Reset

func (x *Ban) Reset()

func (*Ban) String

func (x *Ban) String() string

func (*Ban) Validate

func (m *Ban) Validate() error

Validate checks the field values on Ban 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 (*Ban) ValidateAll

func (m *Ban) ValidateAll() error

ValidateAll checks the field values on Ban 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 BanMultiError, or nil if none found.

type BanMultiError

type BanMultiError []error

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

func (BanMultiError) AllErrors

func (m BanMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BanMultiError) Error

func (m BanMultiError) Error() string

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

type BanReq

type BanReq struct {
	AdminId int64 `protobuf:"varint,1,opt,name=admin_id,json=adminId,proto3" json:"admin_id,omitempty"`
	UserId  int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id" form:"user_id" binding:"required"` // @gotags: json:"user_id" form:"user_id" binding:"required"
	Ban     *Ban  `protobuf:"bytes,3,opt,name=ban,proto3" json:"ban,omitempty"`
	// contains filtered or unexported fields
}

func (*BanReq) Descriptor deprecated

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

Deprecated: Use BanReq.ProtoReflect.Descriptor instead.

func (*BanReq) GetAdminId

func (x *BanReq) GetAdminId() int64

func (*BanReq) GetBan

func (x *BanReq) GetBan() *Ban

func (*BanReq) GetUserId

func (x *BanReq) GetUserId() int64

func (*BanReq) ProtoMessage

func (*BanReq) ProtoMessage()

func (*BanReq) ProtoReflect

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

func (*BanReq) Reset

func (x *BanReq) Reset()

func (*BanReq) String

func (x *BanReq) String() string

func (*BanReq) Validate

func (m *BanReq) Validate() error

Validate checks the field values on BanReq 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 (*BanReq) ValidateAll

func (m *BanReq) ValidateAll() error

ValidateAll checks the field values on BanReq 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 BanReqMultiError, or nil if none found.

type BanReqMultiError

type BanReqMultiError []error

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

func (BanReqMultiError) AllErrors

func (m BanReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BanReqMultiError) Error

func (m BanReqMultiError) Error() string

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

type BanReqValidationError

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

BanReqValidationError is the validation error returned by BanReq.Validate if the designated constraints aren't met.

func (BanReqValidationError) Cause

func (e BanReqValidationError) Cause() error

Cause function returns cause value.

func (BanReqValidationError) Error

func (e BanReqValidationError) Error() string

Error satisfies the builtin error interface

func (BanReqValidationError) ErrorName

func (e BanReqValidationError) ErrorName() string

ErrorName returns error name.

func (BanReqValidationError) Field

func (e BanReqValidationError) Field() string

Field function returns field value.

func (BanReqValidationError) Key

func (e BanReqValidationError) Key() bool

Key function returns key value.

func (BanReqValidationError) Reason

func (e BanReqValidationError) Reason() string

Reason function returns reason value.

type BanResp

type BanResp struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*BanResp) Descriptor deprecated

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

Deprecated: Use BanResp.ProtoReflect.Descriptor instead.

func (*BanResp) GetUser

func (x *BanResp) GetUser() *User

func (*BanResp) ProtoMessage

func (*BanResp) ProtoMessage()

func (*BanResp) ProtoReflect

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

func (*BanResp) Reset

func (x *BanResp) Reset()

func (*BanResp) String

func (x *BanResp) String() string

func (*BanResp) Validate

func (m *BanResp) Validate() error

Validate checks the field values on BanResp 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 (*BanResp) ValidateAll

func (m *BanResp) ValidateAll() error

ValidateAll checks the field values on BanResp 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 BanRespMultiError, or nil if none found.

type BanRespMultiError

type BanRespMultiError []error

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

func (BanRespMultiError) AllErrors

func (m BanRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BanRespMultiError) Error

func (m BanRespMultiError) Error() string

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

type BanRespValidationError

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

BanRespValidationError is the validation error returned by BanResp.Validate if the designated constraints aren't met.

func (BanRespValidationError) Cause

func (e BanRespValidationError) Cause() error

Cause function returns cause value.

func (BanRespValidationError) Error

func (e BanRespValidationError) Error() string

Error satisfies the builtin error interface

func (BanRespValidationError) ErrorName

func (e BanRespValidationError) ErrorName() string

ErrorName returns error name.

func (BanRespValidationError) Field

func (e BanRespValidationError) Field() string

Field function returns field value.

func (BanRespValidationError) Key

func (e BanRespValidationError) Key() bool

Key function returns key value.

func (BanRespValidationError) Reason

func (e BanRespValidationError) Reason() string

Reason function returns reason value.

type BanValidationError

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

BanValidationError is the validation error returned by Ban.Validate if the designated constraints aren't met.

func (BanValidationError) Cause

func (e BanValidationError) Cause() error

Cause function returns cause value.

func (BanValidationError) Error

func (e BanValidationError) Error() string

Error satisfies the builtin error interface

func (BanValidationError) ErrorName

func (e BanValidationError) ErrorName() string

ErrorName returns error name.

func (BanValidationError) Field

func (e BanValidationError) Field() string

Field function returns field value.

func (BanValidationError) Key

func (e BanValidationError) Key() bool

Key function returns key value.

func (BanValidationError) Reason

func (e BanValidationError) Reason() string

Reason function returns reason value.

type GetInfoReq

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

func (*GetInfoReq) Descriptor deprecated

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

Deprecated: Use GetInfoReq.ProtoReflect.Descriptor instead.

func (*GetInfoReq) GetId

func (x *GetInfoReq) GetId() int64

func (*GetInfoReq) ProtoMessage

func (*GetInfoReq) ProtoMessage()

func (*GetInfoReq) ProtoReflect

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

func (*GetInfoReq) Reset

func (x *GetInfoReq) Reset()

func (*GetInfoReq) String

func (x *GetInfoReq) String() string

func (*GetInfoReq) Validate

func (m *GetInfoReq) Validate() error

Validate checks the field values on GetInfoReq 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 (*GetInfoReq) ValidateAll

func (m *GetInfoReq) ValidateAll() error

ValidateAll checks the field values on GetInfoReq 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 GetInfoReqMultiError, or nil if none found.

type GetInfoReqMultiError

type GetInfoReqMultiError []error

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

func (GetInfoReqMultiError) AllErrors

func (m GetInfoReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetInfoReqMultiError) Error

func (m GetInfoReqMultiError) Error() string

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

type GetInfoReqValidationError

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

GetInfoReqValidationError is the validation error returned by GetInfoReq.Validate if the designated constraints aren't met.

func (GetInfoReqValidationError) Cause

func (e GetInfoReqValidationError) Cause() error

Cause function returns cause value.

func (GetInfoReqValidationError) Error

Error satisfies the builtin error interface

func (GetInfoReqValidationError) ErrorName

func (e GetInfoReqValidationError) ErrorName() string

ErrorName returns error name.

func (GetInfoReqValidationError) Field

Field function returns field value.

func (GetInfoReqValidationError) Key

Key function returns key value.

func (GetInfoReqValidationError) Reason

func (e GetInfoReqValidationError) Reason() string

Reason function returns reason value.

type GetInfoResp

type GetInfoResp struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*GetInfoResp) Descriptor deprecated

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

Deprecated: Use GetInfoResp.ProtoReflect.Descriptor instead.

func (*GetInfoResp) GetUser

func (x *GetInfoResp) GetUser() *User

func (*GetInfoResp) ProtoMessage

func (*GetInfoResp) ProtoMessage()

func (*GetInfoResp) ProtoReflect

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

func (*GetInfoResp) Reset

func (x *GetInfoResp) Reset()

func (*GetInfoResp) String

func (x *GetInfoResp) String() string

func (*GetInfoResp) Validate

func (m *GetInfoResp) Validate() error

Validate checks the field values on GetInfoResp 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 (*GetInfoResp) ValidateAll

func (m *GetInfoResp) ValidateAll() error

ValidateAll checks the field values on GetInfoResp 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 GetInfoRespMultiError, or nil if none found.

type GetInfoRespMultiError

type GetInfoRespMultiError []error

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

func (GetInfoRespMultiError) AllErrors

func (m GetInfoRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetInfoRespMultiError) Error

func (m GetInfoRespMultiError) Error() string

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

type GetInfoRespValidationError

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

GetInfoRespValidationError is the validation error returned by GetInfoResp.Validate if the designated constraints aren't met.

func (GetInfoRespValidationError) Cause

Cause function returns cause value.

func (GetInfoRespValidationError) Error

Error satisfies the builtin error interface

func (GetInfoRespValidationError) ErrorName

func (e GetInfoRespValidationError) ErrorName() string

ErrorName returns error name.

func (GetInfoRespValidationError) Field

Field function returns field value.

func (GetInfoRespValidationError) Key

Key function returns key value.

func (GetInfoRespValidationError) Reason

Reason function returns reason value.

type LoginReq

type LoginReq struct {
	Email    string `protobuf:"bytes,1,opt,name=email,proto3" json:"email" form:"email" binding:"required"`          // @gotags: json:"email" form:"email" binding:"required"
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password" form:"password" binding:"required"` // @gotags: json:"password" form:"password" binding:"required"
	// contains filtered or unexported fields
}

func (*LoginReq) Descriptor deprecated

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

Deprecated: Use LoginReq.ProtoReflect.Descriptor instead.

func (*LoginReq) GetEmail

func (x *LoginReq) GetEmail() string

func (*LoginReq) GetPassword

func (x *LoginReq) GetPassword() string

func (*LoginReq) ProtoMessage

func (*LoginReq) ProtoMessage()

func (*LoginReq) ProtoReflect

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

func (*LoginReq) Reset

func (x *LoginReq) Reset()

func (*LoginReq) String

func (x *LoginReq) String() string

func (*LoginReq) Validate

func (m *LoginReq) Validate() error

Validate checks the field values on LoginReq 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 (*LoginReq) ValidateAll

func (m *LoginReq) ValidateAll() error

ValidateAll checks the field values on LoginReq 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 LoginReqMultiError, or nil if none found.

type LoginReqMultiError

type LoginReqMultiError []error

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

func (LoginReqMultiError) AllErrors

func (m LoginReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoginReqMultiError) Error

func (m LoginReqMultiError) Error() string

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

type LoginReqValidationError

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

LoginReqValidationError is the validation error returned by LoginReq.Validate if the designated constraints aren't met.

func (LoginReqValidationError) Cause

func (e LoginReqValidationError) Cause() error

Cause function returns cause value.

func (LoginReqValidationError) Error

func (e LoginReqValidationError) Error() string

Error satisfies the builtin error interface

func (LoginReqValidationError) ErrorName

func (e LoginReqValidationError) ErrorName() string

ErrorName returns error name.

func (LoginReqValidationError) Field

func (e LoginReqValidationError) Field() string

Field function returns field value.

func (LoginReqValidationError) Key

func (e LoginReqValidationError) Key() bool

Key function returns key value.

func (LoginReqValidationError) Reason

func (e LoginReqValidationError) Reason() string

Reason function returns reason value.

type LoginResp

type LoginResp struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	User  *User  `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginResp) Descriptor deprecated

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

Deprecated: Use LoginResp.ProtoReflect.Descriptor instead.

func (*LoginResp) GetToken

func (x *LoginResp) GetToken() string

func (*LoginResp) GetUser

func (x *LoginResp) GetUser() *User

func (*LoginResp) ProtoMessage

func (*LoginResp) ProtoMessage()

func (*LoginResp) ProtoReflect

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

func (*LoginResp) Reset

func (x *LoginResp) Reset()

func (*LoginResp) String

func (x *LoginResp) String() string

func (*LoginResp) Validate

func (m *LoginResp) Validate() error

Validate checks the field values on LoginResp 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 (*LoginResp) ValidateAll

func (m *LoginResp) ValidateAll() error

ValidateAll checks the field values on LoginResp 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 LoginRespMultiError, or nil if none found.

type LoginRespMultiError

type LoginRespMultiError []error

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

func (LoginRespMultiError) AllErrors

func (m LoginRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoginRespMultiError) Error

func (m LoginRespMultiError) Error() string

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

type LoginRespValidationError

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

LoginRespValidationError is the validation error returned by LoginResp.Validate if the designated constraints aren't met.

func (LoginRespValidationError) Cause

func (e LoginRespValidationError) Cause() error

Cause function returns cause value.

func (LoginRespValidationError) Error

func (e LoginRespValidationError) Error() string

Error satisfies the builtin error interface

func (LoginRespValidationError) ErrorName

func (e LoginRespValidationError) ErrorName() string

ErrorName returns error name.

func (LoginRespValidationError) Field

func (e LoginRespValidationError) Field() string

Field function returns field value.

func (LoginRespValidationError) Key

Key function returns key value.

func (LoginRespValidationError) Reason

func (e LoginRespValidationError) Reason() string

Reason function returns reason value.

type ModifyInfoReq

type ModifyInfoReq struct {
	Id          int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description" form:"description"` // @gotags: json:"description" form:"description"
	Photo       []byte `protobuf:"bytes,3,opt,name=photo,proto3" json:"photo,omitempty"`
	PhotoType   string `protobuf:"bytes,4,opt,name=photo_type,json=photoType,proto3" json:"photo_type,omitempty"`
	// contains filtered or unexported fields
}

func (*ModifyInfoReq) Descriptor deprecated

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

Deprecated: Use ModifyInfoReq.ProtoReflect.Descriptor instead.

func (*ModifyInfoReq) GetDescription

func (x *ModifyInfoReq) GetDescription() string

func (*ModifyInfoReq) GetId

func (x *ModifyInfoReq) GetId() int64

func (*ModifyInfoReq) GetPhoto

func (x *ModifyInfoReq) GetPhoto() []byte

func (*ModifyInfoReq) GetPhotoType

func (x *ModifyInfoReq) GetPhotoType() string

func (*ModifyInfoReq) ProtoMessage

func (*ModifyInfoReq) ProtoMessage()

func (*ModifyInfoReq) ProtoReflect

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

func (*ModifyInfoReq) Reset

func (x *ModifyInfoReq) Reset()

func (*ModifyInfoReq) String

func (x *ModifyInfoReq) String() string

func (*ModifyInfoReq) Validate

func (m *ModifyInfoReq) Validate() error

Validate checks the field values on ModifyInfoReq 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 (*ModifyInfoReq) ValidateAll

func (m *ModifyInfoReq) ValidateAll() error

ValidateAll checks the field values on ModifyInfoReq 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 ModifyInfoReqMultiError, or nil if none found.

type ModifyInfoReqMultiError

type ModifyInfoReqMultiError []error

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

func (ModifyInfoReqMultiError) AllErrors

func (m ModifyInfoReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ModifyInfoReqMultiError) Error

func (m ModifyInfoReqMultiError) Error() string

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

type ModifyInfoReqValidationError

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

ModifyInfoReqValidationError is the validation error returned by ModifyInfoReq.Validate if the designated constraints aren't met.

func (ModifyInfoReqValidationError) Cause

Cause function returns cause value.

func (ModifyInfoReqValidationError) Error

Error satisfies the builtin error interface

func (ModifyInfoReqValidationError) ErrorName

func (e ModifyInfoReqValidationError) ErrorName() string

ErrorName returns error name.

func (ModifyInfoReqValidationError) Field

Field function returns field value.

func (ModifyInfoReqValidationError) Key

Key function returns key value.

func (ModifyInfoReqValidationError) Reason

Reason function returns reason value.

type ModifyInfoResp

type ModifyInfoResp struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*ModifyInfoResp) Descriptor deprecated

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

Deprecated: Use ModifyInfoResp.ProtoReflect.Descriptor instead.

func (*ModifyInfoResp) GetUser

func (x *ModifyInfoResp) GetUser() *User

func (*ModifyInfoResp) ProtoMessage

func (*ModifyInfoResp) ProtoMessage()

func (*ModifyInfoResp) ProtoReflect

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

func (*ModifyInfoResp) Reset

func (x *ModifyInfoResp) Reset()

func (*ModifyInfoResp) String

func (x *ModifyInfoResp) String() string

func (*ModifyInfoResp) Validate

func (m *ModifyInfoResp) Validate() error

Validate checks the field values on ModifyInfoResp 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 (*ModifyInfoResp) ValidateAll

func (m *ModifyInfoResp) ValidateAll() error

ValidateAll checks the field values on ModifyInfoResp 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 ModifyInfoRespMultiError, or nil if none found.

type ModifyInfoRespMultiError

type ModifyInfoRespMultiError []error

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

func (ModifyInfoRespMultiError) AllErrors

func (m ModifyInfoRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ModifyInfoRespMultiError) Error

func (m ModifyInfoRespMultiError) Error() string

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

type ModifyInfoRespValidationError

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

ModifyInfoRespValidationError is the validation error returned by ModifyInfoResp.Validate if the designated constraints aren't met.

func (ModifyInfoRespValidationError) Cause

Cause function returns cause value.

func (ModifyInfoRespValidationError) Error

Error satisfies the builtin error interface

func (ModifyInfoRespValidationError) ErrorName

func (e ModifyInfoRespValidationError) ErrorName() string

ErrorName returns error name.

func (ModifyInfoRespValidationError) Field

Field function returns field value.

func (ModifyInfoRespValidationError) Key

Key function returns key value.

func (ModifyInfoRespValidationError) Reason

Reason function returns reason value.

type RegisterReq

type RegisterReq struct {

	// @gotags: json:"name" form:"name" binding:"required"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" form:"name" binding:"required"`
	// @gotags: json:"email" form:"email" binding:"required"
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email" form:"email" binding:"required"`
	// @gotags: json:"password" form:"password" binding:"required"
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password" form:"password" binding:"required"`
	// contains filtered or unexported fields
}

func (*RegisterReq) Descriptor deprecated

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

Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.

func (*RegisterReq) GetEmail

func (x *RegisterReq) GetEmail() string

func (*RegisterReq) GetName

func (x *RegisterReq) GetName() string

func (*RegisterReq) GetPassword

func (x *RegisterReq) GetPassword() string

func (*RegisterReq) ProtoMessage

func (*RegisterReq) ProtoMessage()

func (*RegisterReq) ProtoReflect

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

func (*RegisterReq) Reset

func (x *RegisterReq) Reset()

func (*RegisterReq) String

func (x *RegisterReq) String() string

func (*RegisterReq) Validate

func (m *RegisterReq) Validate() error

Validate checks the field values on RegisterReq 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 (*RegisterReq) ValidateAll

func (m *RegisterReq) ValidateAll() error

ValidateAll checks the field values on RegisterReq 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 RegisterReqMultiError, or nil if none found.

type RegisterReqMultiError

type RegisterReqMultiError []error

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

func (RegisterReqMultiError) AllErrors

func (m RegisterReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RegisterReqMultiError) Error

func (m RegisterReqMultiError) Error() string

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

type RegisterReqValidationError

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

RegisterReqValidationError is the validation error returned by RegisterReq.Validate if the designated constraints aren't met.

func (RegisterReqValidationError) Cause

Cause function returns cause value.

func (RegisterReqValidationError) Error

Error satisfies the builtin error interface

func (RegisterReqValidationError) ErrorName

func (e RegisterReqValidationError) ErrorName() string

ErrorName returns error name.

func (RegisterReqValidationError) Field

Field function returns field value.

func (RegisterReqValidationError) Key

Key function returns key value.

func (RegisterReqValidationError) Reason

Reason function returns reason value.

type RegisterResp

type RegisterResp struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	User  *User  `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterResp) Descriptor deprecated

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

Deprecated: Use RegisterResp.ProtoReflect.Descriptor instead.

func (*RegisterResp) GetToken

func (x *RegisterResp) GetToken() string

func (*RegisterResp) GetUser

func (x *RegisterResp) GetUser() *User

func (*RegisterResp) ProtoMessage

func (*RegisterResp) ProtoMessage()

func (*RegisterResp) ProtoReflect

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

func (*RegisterResp) Reset

func (x *RegisterResp) Reset()

func (*RegisterResp) String

func (x *RegisterResp) String() string

func (*RegisterResp) Validate

func (m *RegisterResp) Validate() error

Validate checks the field values on RegisterResp 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 (*RegisterResp) ValidateAll

func (m *RegisterResp) ValidateAll() error

ValidateAll checks the field values on RegisterResp 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 RegisterRespMultiError, or nil if none found.

type RegisterRespMultiError

type RegisterRespMultiError []error

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

func (RegisterRespMultiError) AllErrors

func (m RegisterRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RegisterRespMultiError) Error

func (m RegisterRespMultiError) Error() string

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

type RegisterRespValidationError

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

RegisterRespValidationError is the validation error returned by RegisterResp.Validate if the designated constraints aren't met.

func (RegisterRespValidationError) Cause

Cause function returns cause value.

func (RegisterRespValidationError) Error

Error satisfies the builtin error interface

func (RegisterRespValidationError) ErrorName

func (e RegisterRespValidationError) ErrorName() string

ErrorName returns error name.

func (RegisterRespValidationError) Field

Field function returns field value.

func (RegisterRespValidationError) Key

Key function returns key value.

func (RegisterRespValidationError) Reason

Reason function returns reason value.

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) Ban

func (UnimplementedUserServiceServer) GetInfo

func (UnimplementedUserServiceServer) Login

func (UnimplementedUserServiceServer) ModifyInfo

func (UnimplementedUserServiceServer) Register

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 User

type User struct {
	Id          int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,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"`
	PhotoUrl    string   `protobuf:"bytes,4,opt,name=photo_url,json=photoUrl,proto3" json:"photo_url,omitempty"`
	Description string   `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	Ban         *Ban     `protobuf:"bytes,6,opt,name=ban,proto3" json:"ban,omitempty"`
	Roles       []string `protobuf:"bytes,7,rep,name=roles,proto3" json:"roles,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetBan

func (x *User) GetBan() *Ban

func (*User) GetDescription

func (x *User) GetDescription() string

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetName

func (x *User) GetName() string

func (*User) GetPhotoUrl

func (x *User) GetPhotoUrl() string

func (*User) GetRoles

func (x *User) GetRoles() []string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

func (*User) Validate

func (m *User) Validate() error

Validate checks the field values on User 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 (*User) ValidateAll

func (m *User) ValidateAll() error

ValidateAll checks the field values on User 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 UserMultiError, or nil if none found.

type UserMultiError

type UserMultiError []error

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

func (UserMultiError) AllErrors

func (m UserMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserMultiError) Error

func (m UserMultiError) Error() string

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

type UserServiceClient

type UserServiceClient interface {
	Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error)
	Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterResp, error)
	GetInfo(ctx context.Context, in *GetInfoReq, opts ...grpc.CallOption) (*GetInfoResp, error)
	Ban(ctx context.Context, in *BanReq, opts ...grpc.CallOption) (*BanResp, error)
	ModifyInfo(ctx context.Context, in *ModifyInfoReq, opts ...grpc.CallOption) (*ModifyInfoResp, 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.

type UserServiceServer

type UserServiceServer interface {
	Login(context.Context, *LoginReq) (*LoginResp, error)
	Register(context.Context, *RegisterReq) (*RegisterResp, error)
	GetInfo(context.Context, *GetInfoReq) (*GetInfoResp, error)
	Ban(context.Context, *BanReq) (*BanResp, error)
	ModifyInfo(context.Context, *ModifyInfoReq) (*ModifyInfoResp, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

type UserValidationError

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

UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.

func (UserValidationError) Cause

func (e UserValidationError) Cause() error

Cause function returns cause value.

func (UserValidationError) Error

func (e UserValidationError) Error() string

Error satisfies the builtin error interface

func (UserValidationError) ErrorName

func (e UserValidationError) ErrorName() string

ErrorName returns error name.

func (UserValidationError) Field

func (e UserValidationError) Field() string

Field function returns field value.

func (UserValidationError) Key

func (e UserValidationError) Key() bool

Key function returns key value.

func (UserValidationError) Reason

func (e UserValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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