pack

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

This section is empty.

Variables

View Source
var File_proto_gift_pack_gift_pack_proto protoreflect.FileDescriptor

Functions

func NewGiftPackEndpoints

func NewGiftPackEndpoints() []*api.Endpoint

func RegisterGiftPackHandler

func RegisterGiftPackHandler(s server.Server, hdlr GiftPackHandler, opts ...server.HandlerOption) error

Types

type AddGiftReq

type AddGiftReq struct {
	UserId  int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id"`
	GiftId  int64 `protobuf:"varint,2,opt,name=gift_id,json=giftId,proto3" json:"gift_id"`
	GiftNum int64 `protobuf:"varint,3,opt,name=gift_num,json=giftNum,proto3" json:"gift_num"`
	// contains filtered or unexported fields
}

func (*AddGiftReq) Descriptor deprecated

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

Deprecated: Use AddGiftReq.ProtoReflect.Descriptor instead.

func (*AddGiftReq) GetGiftId

func (x *AddGiftReq) GetGiftId() int64

func (*AddGiftReq) GetGiftNum

func (x *AddGiftReq) GetGiftNum() int64

func (*AddGiftReq) GetUserId

func (x *AddGiftReq) GetUserId() int64

func (*AddGiftReq) ProtoMessage

func (*AddGiftReq) ProtoMessage()

func (*AddGiftReq) ProtoReflect

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

func (*AddGiftReq) Reset

func (x *AddGiftReq) Reset()

func (*AddGiftReq) String

func (x *AddGiftReq) String() string

func (*AddGiftReq) Validate

func (m *AddGiftReq) Validate() error

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

func (m *AddGiftReq) ValidateAll() error

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

type AddGiftReqMultiError

type AddGiftReqMultiError []error

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

func (AddGiftReqMultiError) AllErrors

func (m AddGiftReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AddGiftReqMultiError) Error

func (m AddGiftReqMultiError) Error() string

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

type AddGiftReqValidationError

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

AddGiftReqValidationError is the validation error returned by AddGiftReq.Validate if the designated constraints aren't met.

func (AddGiftReqValidationError) Cause

func (e AddGiftReqValidationError) Cause() error

Cause function returns cause value.

func (AddGiftReqValidationError) Error

Error satisfies the builtin error interface

func (AddGiftReqValidationError) ErrorName

func (e AddGiftReqValidationError) ErrorName() string

ErrorName returns error name.

func (AddGiftReqValidationError) Field

Field function returns field value.

func (AddGiftReqValidationError) Key

Key function returns key value.

func (AddGiftReqValidationError) Reason

func (e AddGiftReqValidationError) Reason() string

Reason function returns reason value.

type AddGiftRes

type AddGiftRes struct {
	UserId  int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id"`
	GiftId  int64 `protobuf:"varint,2,opt,name=gift_id,json=giftId,proto3" json:"gift_id"`
	GiftNum int64 `protobuf:"varint,3,opt,name=gift_num,json=giftNum,proto3" json:"gift_num"`
	// contains filtered or unexported fields
}

func (*AddGiftRes) Descriptor deprecated

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

Deprecated: Use AddGiftRes.ProtoReflect.Descriptor instead.

func (*AddGiftRes) GetGiftId

func (x *AddGiftRes) GetGiftId() int64

func (*AddGiftRes) GetGiftNum

func (x *AddGiftRes) GetGiftNum() int64

func (*AddGiftRes) GetUserId

func (x *AddGiftRes) GetUserId() int64

func (*AddGiftRes) ProtoMessage

func (*AddGiftRes) ProtoMessage()

func (*AddGiftRes) ProtoReflect

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

func (*AddGiftRes) Reset

func (x *AddGiftRes) Reset()

func (*AddGiftRes) String

func (x *AddGiftRes) String() string

func (*AddGiftRes) Validate

func (m *AddGiftRes) Validate() error

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

func (m *AddGiftRes) ValidateAll() error

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

type AddGiftResMultiError

type AddGiftResMultiError []error

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

func (AddGiftResMultiError) AllErrors

func (m AddGiftResMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AddGiftResMultiError) Error

func (m AddGiftResMultiError) Error() string

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

type AddGiftResValidationError

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

AddGiftResValidationError is the validation error returned by AddGiftRes.Validate if the designated constraints aren't met.

func (AddGiftResValidationError) Cause

func (e AddGiftResValidationError) Cause() error

Cause function returns cause value.

func (AddGiftResValidationError) Error

Error satisfies the builtin error interface

func (AddGiftResValidationError) ErrorName

func (e AddGiftResValidationError) ErrorName() string

ErrorName returns error name.

func (AddGiftResValidationError) Field

Field function returns field value.

func (AddGiftResValidationError) Key

Key function returns key value.

func (AddGiftResValidationError) Reason

func (e AddGiftResValidationError) Reason() string

Reason function returns reason value.

type GetAllGiftReq

type GetAllGiftReq struct {
	UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id"`
	// contains filtered or unexported fields
}

func (*GetAllGiftReq) Descriptor deprecated

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

Deprecated: Use GetAllGiftReq.ProtoReflect.Descriptor instead.

func (*GetAllGiftReq) GetUserId

func (x *GetAllGiftReq) GetUserId() int64

func (*GetAllGiftReq) ProtoMessage

func (*GetAllGiftReq) ProtoMessage()

func (*GetAllGiftReq) ProtoReflect

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

func (*GetAllGiftReq) Reset

func (x *GetAllGiftReq) Reset()

func (*GetAllGiftReq) String

func (x *GetAllGiftReq) String() string

func (*GetAllGiftReq) Validate

func (m *GetAllGiftReq) Validate() error

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

func (m *GetAllGiftReq) ValidateAll() error

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

type GetAllGiftReqMultiError

type GetAllGiftReqMultiError []error

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

func (GetAllGiftReqMultiError) AllErrors

func (m GetAllGiftReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetAllGiftReqMultiError) Error

func (m GetAllGiftReqMultiError) Error() string

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

type GetAllGiftReqValidationError

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

GetAllGiftReqValidationError is the validation error returned by GetAllGiftReq.Validate if the designated constraints aren't met.

func (GetAllGiftReqValidationError) Cause

Cause function returns cause value.

func (GetAllGiftReqValidationError) Error

Error satisfies the builtin error interface

func (GetAllGiftReqValidationError) ErrorName

func (e GetAllGiftReqValidationError) ErrorName() string

ErrorName returns error name.

func (GetAllGiftReqValidationError) Field

Field function returns field value.

func (GetAllGiftReqValidationError) Key

Key function returns key value.

func (GetAllGiftReqValidationError) Reason

Reason function returns reason value.

type GetAllGiftRes

type GetAllGiftRes struct {
	GiftMap map[int64]int64 `` /* 162-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetAllGiftRes) Descriptor deprecated

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

Deprecated: Use GetAllGiftRes.ProtoReflect.Descriptor instead.

func (*GetAllGiftRes) GetGiftMap

func (x *GetAllGiftRes) GetGiftMap() map[int64]int64

func (*GetAllGiftRes) GetGiftNum

func (x *GetAllGiftRes) GetGiftNum(giftId int64) int64

func (*GetAllGiftRes) ProtoMessage

func (*GetAllGiftRes) ProtoMessage()

func (*GetAllGiftRes) ProtoReflect

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

func (*GetAllGiftRes) Reset

func (x *GetAllGiftRes) Reset()

func (*GetAllGiftRes) String

func (x *GetAllGiftRes) String() string

func (*GetAllGiftRes) Validate

func (m *GetAllGiftRes) Validate() error

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

func (m *GetAllGiftRes) ValidateAll() error

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

type GetAllGiftResMultiError

type GetAllGiftResMultiError []error

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

func (GetAllGiftResMultiError) AllErrors

func (m GetAllGiftResMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetAllGiftResMultiError) Error

func (m GetAllGiftResMultiError) Error() string

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

type GetAllGiftResValidationError

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

GetAllGiftResValidationError is the validation error returned by GetAllGiftRes.Validate if the designated constraints aren't met.

func (GetAllGiftResValidationError) Cause

Cause function returns cause value.

func (GetAllGiftResValidationError) Error

Error satisfies the builtin error interface

func (GetAllGiftResValidationError) ErrorName

func (e GetAllGiftResValidationError) ErrorName() string

ErrorName returns error name.

func (GetAllGiftResValidationError) Field

Field function returns field value.

func (GetAllGiftResValidationError) Key

Key function returns key value.

func (GetAllGiftResValidationError) Reason

Reason function returns reason value.

type GiftPackHandler

type GiftPackHandler interface {
	AddGift(context.Context, *AddGiftReq, *AddGiftRes) error
	ReduceGift(context.Context, *ReduceGiftReq, *ReduceGiftRes) error
	GetAllGift(context.Context, *GetAllGiftReq, *GetAllGiftRes) error
}

type GiftPackService

type GiftPackService interface {
	AddGift(ctx context.Context, in *AddGiftReq, opts ...client.CallOption) (*AddGiftRes, error)
	ReduceGift(ctx context.Context, in *ReduceGiftReq, opts ...client.CallOption) (*ReduceGiftRes, error)
	GetAllGift(ctx context.Context, in *GetAllGiftReq, opts ...client.CallOption) (*GetAllGiftRes, error)
}

func NewGiftPackService

func NewGiftPackService(name string, c client.Client) GiftPackService

type ReduceGiftReq

type ReduceGiftReq struct {
	UserId  int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id"`
	GiftId  int64 `protobuf:"varint,2,opt,name=gift_id,json=giftId,proto3" json:"gift_id"`
	GiftNum int64 `protobuf:"varint,3,opt,name=gift_num,json=giftNum,proto3" json:"gift_num"`
	// contains filtered or unexported fields
}

func (*ReduceGiftReq) Descriptor deprecated

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

Deprecated: Use ReduceGiftReq.ProtoReflect.Descriptor instead.

func (*ReduceGiftReq) GetGiftId

func (x *ReduceGiftReq) GetGiftId() int64

func (*ReduceGiftReq) GetGiftNum

func (x *ReduceGiftReq) GetGiftNum() int64

func (*ReduceGiftReq) GetUserId

func (x *ReduceGiftReq) GetUserId() int64

func (*ReduceGiftReq) ProtoMessage

func (*ReduceGiftReq) ProtoMessage()

func (*ReduceGiftReq) ProtoReflect

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

func (*ReduceGiftReq) Reset

func (x *ReduceGiftReq) Reset()

func (*ReduceGiftReq) String

func (x *ReduceGiftReq) String() string

func (*ReduceGiftReq) Validate

func (m *ReduceGiftReq) Validate() error

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

func (m *ReduceGiftReq) ValidateAll() error

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

type ReduceGiftReqMultiError

type ReduceGiftReqMultiError []error

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

func (ReduceGiftReqMultiError) AllErrors

func (m ReduceGiftReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ReduceGiftReqMultiError) Error

func (m ReduceGiftReqMultiError) Error() string

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

type ReduceGiftReqValidationError

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

ReduceGiftReqValidationError is the validation error returned by ReduceGiftReq.Validate if the designated constraints aren't met.

func (ReduceGiftReqValidationError) Cause

Cause function returns cause value.

func (ReduceGiftReqValidationError) Error

Error satisfies the builtin error interface

func (ReduceGiftReqValidationError) ErrorName

func (e ReduceGiftReqValidationError) ErrorName() string

ErrorName returns error name.

func (ReduceGiftReqValidationError) Field

Field function returns field value.

func (ReduceGiftReqValidationError) Key

Key function returns key value.

func (ReduceGiftReqValidationError) Reason

Reason function returns reason value.

type ReduceGiftRes

type ReduceGiftRes struct {
	UserId  int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id"`
	GiftId  int64 `protobuf:"varint,2,opt,name=gift_id,json=giftId,proto3" json:"gift_id"`
	GiftNum int64 `protobuf:"varint,3,opt,name=gift_num,json=giftNum,proto3" json:"gift_num"`
	// contains filtered or unexported fields
}

func (*ReduceGiftRes) Descriptor deprecated

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

Deprecated: Use ReduceGiftRes.ProtoReflect.Descriptor instead.

func (*ReduceGiftRes) GetGiftId

func (x *ReduceGiftRes) GetGiftId() int64

func (*ReduceGiftRes) GetGiftNum

func (x *ReduceGiftRes) GetGiftNum() int64

func (*ReduceGiftRes) GetUserId

func (x *ReduceGiftRes) GetUserId() int64

func (*ReduceGiftRes) ProtoMessage

func (*ReduceGiftRes) ProtoMessage()

func (*ReduceGiftRes) ProtoReflect

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

func (*ReduceGiftRes) Reset

func (x *ReduceGiftRes) Reset()

func (*ReduceGiftRes) String

func (x *ReduceGiftRes) String() string

func (*ReduceGiftRes) Validate

func (m *ReduceGiftRes) Validate() error

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

func (m *ReduceGiftRes) ValidateAll() error

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

type ReduceGiftResMultiError

type ReduceGiftResMultiError []error

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

func (ReduceGiftResMultiError) AllErrors

func (m ReduceGiftResMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ReduceGiftResMultiError) Error

func (m ReduceGiftResMultiError) Error() string

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

type ReduceGiftResValidationError

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

ReduceGiftResValidationError is the validation error returned by ReduceGiftRes.Validate if the designated constraints aren't met.

func (ReduceGiftResValidationError) Cause

Cause function returns cause value.

func (ReduceGiftResValidationError) Error

Error satisfies the builtin error interface

func (ReduceGiftResValidationError) ErrorName

func (e ReduceGiftResValidationError) ErrorName() string

ErrorName returns error name.

func (ReduceGiftResValidationError) Field

Field function returns field value.

func (ReduceGiftResValidationError) Key

Key function returns key value.

func (ReduceGiftResValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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