livePk

package
v0.0.0-...-b08fcc5 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var File_proto_livePk_livePk_proto protoreflect.FileDescriptor

Functions

func NewLivePkSrvEndpoints

func NewLivePkSrvEndpoints() []*api.Endpoint

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) Descriptor() ([]byte, []int)

Deprecated: Use LivePk.ProtoReflect.Descriptor instead.

func (*LivePk) ProtoMessage

func (*LivePk) ProtoMessage()

func (*LivePk) ProtoReflect

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

func (*LivePk) Reset

func (x *LivePk) Reset()

func (*LivePk) String

func (x *LivePk) String() string

func (*LivePk) Validate

func (m *LivePk) Validate() error

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

func (m *LivePk) ValidateAll() error

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

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

Cause function returns cause value.

func (LivePkingsRequestValidationError) Error

Error satisfies the builtin error interface

func (LivePkingsRequestValidationError) ErrorName

ErrorName returns error name.

func (LivePkingsRequestValidationError) Field

Field function returns field value.

func (LivePkingsRequestValidationError) Key

Key function returns key value.

func (LivePkingsRequestValidationError) Reason

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

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

Cause function returns cause value.

func (LivePkingsResponseValidationError) Error

Error satisfies the builtin error interface

func (LivePkingsResponseValidationError) ErrorName

ErrorName returns error name.

func (LivePkingsResponseValidationError) Field

Field function returns field value.

func (LivePkingsResponseValidationError) Key

Key function returns key value.

func (LivePkingsResponseValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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