Documentation ¶
Index ¶
- Constants
- Variables
- func NewLivePkSrvEndpoints() []*api.Endpoint
- func RegisterLivePkSrvHandler(s server.Server, hdlr LivePkSrvHandler, opts ...server.HandlerOption) error
- type LivePk
- type LivePkMultiError
- type LivePkSrvHandler
- type LivePkSrvService
- type LivePkValidationError
- type LivePkingsRequest
- func (*LivePkingsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LivePkingsRequest) GetPage() uint32
- func (x *LivePkingsRequest) GetSize() uint32
- func (*LivePkingsRequest) ProtoMessage()
- func (x *LivePkingsRequest) ProtoReflect() protoreflect.Message
- func (x *LivePkingsRequest) Reset()
- func (x *LivePkingsRequest) String() string
- func (m *LivePkingsRequest) Validate() error
- func (m *LivePkingsRequest) ValidateAll() error
- type LivePkingsRequestMultiError
- type LivePkingsRequestValidationError
- func (e LivePkingsRequestValidationError) Cause() error
- func (e LivePkingsRequestValidationError) Error() string
- func (e LivePkingsRequestValidationError) ErrorName() string
- func (e LivePkingsRequestValidationError) Field() string
- func (e LivePkingsRequestValidationError) Key() bool
- func (e LivePkingsRequestValidationError) Reason() string
- type LivePkingsResponse
- func (*LivePkingsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LivePkingsResponse) GetPkings() []*LivePk
- func (*LivePkingsResponse) ProtoMessage()
- func (x *LivePkingsResponse) ProtoReflect() protoreflect.Message
- func (x *LivePkingsResponse) Reset()
- func (x *LivePkingsResponse) String() string
- func (m *LivePkingsResponse) Validate() error
- func (m *LivePkingsResponse) ValidateAll() error
- type LivePkingsResponseMultiError
- type LivePkingsResponseValidationError
- func (e LivePkingsResponseValidationError) Cause() error
- func (e LivePkingsResponseValidationError) Error() string
- func (e LivePkingsResponseValidationError) ErrorName() string
- func (e LivePkingsResponseValidationError) Field() string
- func (e LivePkingsResponseValidationError) Key() bool
- func (e LivePkingsResponseValidationError) Reason() string
Constants ¶
const ( // pk创建中 PkStatusCreate = "create" // pk中 PkStatusIng = "pking" // 已结束 PkStatusEnd = "end" // 邀请者 PkRoleInviter = "inviter" // 受邀者 PkRoleInvitee = "invitee" // 普通pk PkTypeNormal = "normal" // 随机pk PkTypeRandom = "random" // 一局一胜 PkRoundTypeOne = "one" // 总局数 PkOneRoundTotal = 1 // 胜利 PkResultTypeWin = "win" // 失败 PkResultTypeLose = "lose" // 平局 PkResultTypeDraw = "draw" )
Variables ¶
var File_proto_livePk_livePk_proto protoreflect.FileDescriptor
Functions ¶
func NewLivePkSrvEndpoints ¶
func RegisterLivePkSrvHandler ¶
func RegisterLivePkSrvHandler(s server.Server, hdlr LivePkSrvHandler, opts ...server.HandlerOption) error
Types ¶
type LivePk ¶
type LivePk struct {
// contains filtered or unexported fields
}
func (*LivePk) Descriptor
deprecated
func (*LivePk) ProtoMessage ¶
func (*LivePk) ProtoMessage()
func (*LivePk) ProtoReflect ¶
func (x *LivePk) ProtoReflect() protoreflect.Message
func (*LivePk) Validate ¶
Validate checks the field values on LivePk 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 (*LivePk) ValidateAll ¶
ValidateAll checks the field values on LivePk 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 LivePkMultiError, or nil if none found.
type LivePkMultiError ¶
type LivePkMultiError []error
LivePkMultiError is an error wrapping multiple validation errors returned by LivePk.ValidateAll() if the designated constraints aren't met.
func (LivePkMultiError) AllErrors ¶
func (m LivePkMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LivePkMultiError) Error ¶
func (m LivePkMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LivePkSrvHandler ¶
type LivePkSrvHandler interface { // 正在进行中的pk列表 LivePkings(context.Context, *LivePkingsRequest, *LivePkingsResponse) error }
type LivePkSrvService ¶
type LivePkSrvService interface { // 正在进行中的pk列表 LivePkings(ctx context.Context, in *LivePkingsRequest, opts ...client.CallOption) (*LivePkingsResponse, error) }
func NewLivePkSrvService ¶
func NewLivePkSrvService(name string, c client.Client) LivePkSrvService
type LivePkValidationError ¶
type LivePkValidationError struct {
// contains filtered or unexported fields
}
LivePkValidationError is the validation error returned by LivePk.Validate if the designated constraints aren't met.
func (LivePkValidationError) Cause ¶
func (e LivePkValidationError) Cause() error
Cause function returns cause value.
func (LivePkValidationError) Error ¶
func (e LivePkValidationError) Error() string
Error satisfies the builtin error interface
func (LivePkValidationError) ErrorName ¶
func (e LivePkValidationError) ErrorName() string
ErrorName returns error name.
func (LivePkValidationError) Field ¶
func (e LivePkValidationError) Field() string
Field function returns field value.
func (LivePkValidationError) Key ¶
func (e LivePkValidationError) Key() bool
Key function returns key value.
func (LivePkValidationError) Reason ¶
func (e LivePkValidationError) Reason() string
Reason function returns reason value.
type LivePkingsRequest ¶
type LivePkingsRequest struct { Page uint32 `protobuf:"varint,1,opt,name=page,proto3" json:"page"` Size uint32 `protobuf:"varint,2,opt,name=size,proto3" json:"size"` // contains filtered or unexported fields }
func (*LivePkingsRequest) Descriptor
deprecated
func (*LivePkingsRequest) Descriptor() ([]byte, []int)
Deprecated: Use LivePkingsRequest.ProtoReflect.Descriptor instead.
func (*LivePkingsRequest) GetPage ¶
func (x *LivePkingsRequest) GetPage() uint32
func (*LivePkingsRequest) GetSize ¶
func (x *LivePkingsRequest) GetSize() uint32
func (*LivePkingsRequest) ProtoMessage ¶
func (*LivePkingsRequest) ProtoMessage()
func (*LivePkingsRequest) ProtoReflect ¶
func (x *LivePkingsRequest) ProtoReflect() protoreflect.Message
func (*LivePkingsRequest) Reset ¶
func (x *LivePkingsRequest) Reset()
func (*LivePkingsRequest) String ¶
func (x *LivePkingsRequest) String() string
func (*LivePkingsRequest) Validate ¶
func (m *LivePkingsRequest) Validate() error
Validate checks the field values on LivePkingsRequest 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 (*LivePkingsRequest) ValidateAll ¶
func (m *LivePkingsRequest) ValidateAll() error
ValidateAll checks the field values on LivePkingsRequest 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 LivePkingsRequestMultiError, or nil if none found.
type LivePkingsRequestMultiError ¶
type LivePkingsRequestMultiError []error
LivePkingsRequestMultiError is an error wrapping multiple validation errors returned by LivePkingsRequest.ValidateAll() if the designated constraints aren't met.
func (LivePkingsRequestMultiError) AllErrors ¶
func (m LivePkingsRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LivePkingsRequestMultiError) Error ¶
func (m LivePkingsRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LivePkingsRequestValidationError ¶
type LivePkingsRequestValidationError struct {
// contains filtered or unexported fields
}
LivePkingsRequestValidationError is the validation error returned by LivePkingsRequest.Validate if the designated constraints aren't met.
func (LivePkingsRequestValidationError) Cause ¶
func (e LivePkingsRequestValidationError) Cause() error
Cause function returns cause value.
func (LivePkingsRequestValidationError) Error ¶
func (e LivePkingsRequestValidationError) Error() string
Error satisfies the builtin error interface
func (LivePkingsRequestValidationError) ErrorName ¶
func (e LivePkingsRequestValidationError) ErrorName() string
ErrorName returns error name.
func (LivePkingsRequestValidationError) Field ¶
func (e LivePkingsRequestValidationError) Field() string
Field function returns field value.
func (LivePkingsRequestValidationError) Key ¶
func (e LivePkingsRequestValidationError) Key() bool
Key function returns key value.
func (LivePkingsRequestValidationError) Reason ¶
func (e LivePkingsRequestValidationError) Reason() string
Reason function returns reason value.
type LivePkingsResponse ¶
type LivePkingsResponse struct { Pkings []*LivePk `protobuf:"bytes,1,rep,name=pkings,proto3" json:"pkings"` // contains filtered or unexported fields }
func (*LivePkingsResponse) Descriptor
deprecated
func (*LivePkingsResponse) Descriptor() ([]byte, []int)
Deprecated: Use LivePkingsResponse.ProtoReflect.Descriptor instead.
func (*LivePkingsResponse) GetPkings ¶
func (x *LivePkingsResponse) GetPkings() []*LivePk
func (*LivePkingsResponse) ProtoMessage ¶
func (*LivePkingsResponse) ProtoMessage()
func (*LivePkingsResponse) ProtoReflect ¶
func (x *LivePkingsResponse) ProtoReflect() protoreflect.Message
func (*LivePkingsResponse) Reset ¶
func (x *LivePkingsResponse) Reset()
func (*LivePkingsResponse) String ¶
func (x *LivePkingsResponse) String() string
func (*LivePkingsResponse) Validate ¶
func (m *LivePkingsResponse) Validate() error
Validate checks the field values on LivePkingsResponse 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 (*LivePkingsResponse) ValidateAll ¶
func (m *LivePkingsResponse) ValidateAll() error
ValidateAll checks the field values on LivePkingsResponse 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 LivePkingsResponseMultiError, or nil if none found.
type LivePkingsResponseMultiError ¶
type LivePkingsResponseMultiError []error
LivePkingsResponseMultiError is an error wrapping multiple validation errors returned by LivePkingsResponse.ValidateAll() if the designated constraints aren't met.
func (LivePkingsResponseMultiError) AllErrors ¶
func (m LivePkingsResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LivePkingsResponseMultiError) Error ¶
func (m LivePkingsResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LivePkingsResponseValidationError ¶
type LivePkingsResponseValidationError struct {
// contains filtered or unexported fields
}
LivePkingsResponseValidationError is the validation error returned by LivePkingsResponse.Validate if the designated constraints aren't met.
func (LivePkingsResponseValidationError) Cause ¶
func (e LivePkingsResponseValidationError) Cause() error
Cause function returns cause value.
func (LivePkingsResponseValidationError) Error ¶
func (e LivePkingsResponseValidationError) Error() string
Error satisfies the builtin error interface
func (LivePkingsResponseValidationError) ErrorName ¶
func (e LivePkingsResponseValidationError) ErrorName() string
ErrorName returns error name.
func (LivePkingsResponseValidationError) Field ¶
func (e LivePkingsResponseValidationError) Field() string
Field function returns field value.
func (LivePkingsResponseValidationError) Key ¶
func (e LivePkingsResponseValidationError) Key() bool
Key function returns key value.
func (LivePkingsResponseValidationError) Reason ¶
func (e LivePkingsResponseValidationError) Reason() string
Reason function returns reason value.