coupons

package
v0.0.0-...-0a16eaf Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Coupons_GetCouponsList_FullMethodName             = "/coupons.Coupons/GetCouponsList"
	Coupons_GetCouponByCouponUserId_FullMethodName    = "/coupons.Coupons/GetCouponByCouponUserId"
	Coupons_UpdateCouponByCouponUserId_FullMethodName = "/coupons.Coupons/UpdateCouponByCouponUserId"
)

Variables

View Source
var Coupons_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "coupons.Coupons",
	HandlerType: (*CouponsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCouponsList",
			Handler:    _Coupons_GetCouponsList_Handler,
		},
		{
			MethodName: "GetCouponByCouponUserId",
			Handler:    _Coupons_GetCouponByCouponUserId_Handler,
		},
		{
			MethodName: "UpdateCouponByCouponUserId",
			Handler:    _Coupons_UpdateCouponByCouponUserId_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "coupons.proto",
}

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

View Source
var File_coupons_proto protoreflect.FileDescriptor

Functions

func RegisterCouponsServer

func RegisterCouponsServer(s grpc.ServiceRegistrar, srv CouponsServer)

Types

type Coupon

type Coupon struct {
	CouponID        int64  `protobuf:"varint,10,opt,name=CouponID,proto3" json:"CouponID,omitempty"`
	CouponType      int32  `protobuf:"varint,20,opt,name=CouponType,proto3" json:"CouponType,omitempty"`
	CouponName      string `protobuf:"bytes,30,opt,name=CouponName,proto3" json:"CouponName,omitempty"`
	DiscountAmount  int64  `protobuf:"varint,40,opt,name=DiscountAmount,proto3" json:"DiscountAmount,omitempty"`
	UsageConditions int64  `protobuf:"varint,50,opt,name=UsageConditions,proto3" json:"UsageConditions,omitempty"`
	StartDate       string `protobuf:"bytes,60,opt,name=StartDate,proto3" json:"StartDate,omitempty"`
	EndDate         string `protobuf:"bytes,70,opt,name=EndDate,proto3" json:"EndDate,omitempty"`
	// contains filtered or unexported fields
}

func (*Coupon) Descriptor deprecated

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

Deprecated: Use Coupon.ProtoReflect.Descriptor instead.

func (*Coupon) GetCouponID

func (x *Coupon) GetCouponID() int64

func (*Coupon) GetCouponName

func (x *Coupon) GetCouponName() string

func (*Coupon) GetCouponType

func (x *Coupon) GetCouponType() int32

func (*Coupon) GetDiscountAmount

func (x *Coupon) GetDiscountAmount() int64

func (*Coupon) GetEndDate

func (x *Coupon) GetEndDate() string

func (*Coupon) GetStartDate

func (x *Coupon) GetStartDate() string

func (*Coupon) GetUsageConditions

func (x *Coupon) GetUsageConditions() int64

func (*Coupon) ProtoMessage

func (*Coupon) ProtoMessage()

func (*Coupon) ProtoReflect

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

func (*Coupon) Reset

func (x *Coupon) Reset()

func (*Coupon) String

func (x *Coupon) String() string

type CouponUser

type CouponUser struct {
	CouponUserID int64   `protobuf:"varint,10,opt,name=CouponUserID,proto3" json:"CouponUserID,omitempty"`
	CouponID     int64   `protobuf:"varint,20,opt,name=CouponID,proto3" json:"CouponID,omitempty"`
	UserID       int64   `protobuf:"varint,30,opt,name=UserID,proto3" json:"UserID,omitempty"`
	Status       int32   `protobuf:"varint,40,opt,name=Status,proto3" json:"Status,omitempty"`
	AccessTime   string  `protobuf:"bytes,50,opt,name=AccessTime,proto3" json:"AccessTime,omitempty"`
	CouponInfo   *Coupon `protobuf:"bytes,60,opt,name=CouponInfo,proto3" json:"CouponInfo,omitempty"`
	// contains filtered or unexported fields
}

func (*CouponUser) Descriptor deprecated

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

Deprecated: Use CouponUser.ProtoReflect.Descriptor instead.

func (*CouponUser) GetAccessTime

func (x *CouponUser) GetAccessTime() string

func (*CouponUser) GetCouponID

func (x *CouponUser) GetCouponID() int64

func (*CouponUser) GetCouponInfo

func (x *CouponUser) GetCouponInfo() *Coupon

func (*CouponUser) GetCouponUserID

func (x *CouponUser) GetCouponUserID() int64

func (*CouponUser) GetStatus

func (x *CouponUser) GetStatus() int32

func (*CouponUser) GetUserID

func (x *CouponUser) GetUserID() int64

func (*CouponUser) ProtoMessage

func (*CouponUser) ProtoMessage()

func (*CouponUser) ProtoReflect

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

func (*CouponUser) Reset

func (x *CouponUser) Reset()

func (*CouponUser) String

func (x *CouponUser) String() string

type CouponsClient

type CouponsClient interface {
	GetCouponsList(ctx context.Context, in *GetCouponsListRequest, opts ...grpc.CallOption) (*GetCouponsListResponse, error)
	GetCouponByCouponUserId(ctx context.Context, in *GetCouponByCouponUserIdRequest, opts ...grpc.CallOption) (*GetCouponByCouponUserIdResponse, error)
	UpdateCouponByCouponUserId(ctx context.Context, in *UpdateCouponByCouponUserIdRequest, opts ...grpc.CallOption) (*UpdateCouponByCouponUserIdResponse, error)
}

CouponsClient is the client API for Coupons 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 NewCouponsClient

func NewCouponsClient(cc grpc.ClientConnInterface) CouponsClient

type CouponsServer

type CouponsServer interface {
	GetCouponsList(context.Context, *GetCouponsListRequest) (*GetCouponsListResponse, error)
	GetCouponByCouponUserId(context.Context, *GetCouponByCouponUserIdRequest) (*GetCouponByCouponUserIdResponse, error)
	UpdateCouponByCouponUserId(context.Context, *UpdateCouponByCouponUserIdRequest) (*UpdateCouponByCouponUserIdResponse, error)
	// contains filtered or unexported methods
}

CouponsServer is the server API for Coupons service. All implementations must embed UnimplementedCouponsServer for forward compatibility.

type GetCouponByCouponUserIdRequest

type GetCouponByCouponUserIdRequest struct {
	UserID       int64 `protobuf:"varint,10,opt,name=UserID,proto3" json:"UserID,omitempty"`
	CouponUserId int64 `protobuf:"varint,20,opt,name=CouponUserId,proto3" json:"CouponUserId,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCouponByCouponUserIdRequest) Descriptor deprecated

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

Deprecated: Use GetCouponByCouponUserIdRequest.ProtoReflect.Descriptor instead.

func (*GetCouponByCouponUserIdRequest) GetCouponUserId

func (x *GetCouponByCouponUserIdRequest) GetCouponUserId() int64

func (*GetCouponByCouponUserIdRequest) GetUserID

func (x *GetCouponByCouponUserIdRequest) GetUserID() int64

func (*GetCouponByCouponUserIdRequest) ProtoMessage

func (*GetCouponByCouponUserIdRequest) ProtoMessage()

func (*GetCouponByCouponUserIdRequest) ProtoReflect

func (*GetCouponByCouponUserIdRequest) Reset

func (x *GetCouponByCouponUserIdRequest) Reset()

func (*GetCouponByCouponUserIdRequest) String

type GetCouponByCouponUserIdResponse

type GetCouponByCouponUserIdResponse struct {
	CouponsInfo *CouponUser `protobuf:"bytes,10,opt,name=CouponsInfo,proto3" json:"CouponsInfo,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCouponByCouponUserIdResponse) Descriptor deprecated

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

Deprecated: Use GetCouponByCouponUserIdResponse.ProtoReflect.Descriptor instead.

func (*GetCouponByCouponUserIdResponse) GetCouponsInfo

func (x *GetCouponByCouponUserIdResponse) GetCouponsInfo() *CouponUser

func (*GetCouponByCouponUserIdResponse) ProtoMessage

func (*GetCouponByCouponUserIdResponse) ProtoMessage()

func (*GetCouponByCouponUserIdResponse) ProtoReflect

func (*GetCouponByCouponUserIdResponse) Reset

func (*GetCouponByCouponUserIdResponse) String

type GetCouponsListRequest

type GetCouponsListRequest struct {
	UserID int64 `protobuf:"varint,10,opt,name=UserID,proto3" json:"UserID,omitempty"`
	Status int32 `protobuf:"varint,20,opt,name=Status,proto3" json:"Status,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCouponsListRequest) Descriptor deprecated

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

Deprecated: Use GetCouponsListRequest.ProtoReflect.Descriptor instead.

func (*GetCouponsListRequest) GetStatus

func (x *GetCouponsListRequest) GetStatus() int32

func (*GetCouponsListRequest) GetUserID

func (x *GetCouponsListRequest) GetUserID() int64

func (*GetCouponsListRequest) ProtoMessage

func (*GetCouponsListRequest) ProtoMessage()

func (*GetCouponsListRequest) ProtoReflect

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

func (*GetCouponsListRequest) Reset

func (x *GetCouponsListRequest) Reset()

func (*GetCouponsListRequest) String

func (x *GetCouponsListRequest) String() string

type GetCouponsListResponse

type GetCouponsListResponse struct {
	CouponUserList []*CouponUser `protobuf:"bytes,10,rep,name=CouponUserList,proto3" json:"CouponUserList,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCouponsListResponse) Descriptor deprecated

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

Deprecated: Use GetCouponsListResponse.ProtoReflect.Descriptor instead.

func (*GetCouponsListResponse) GetCouponUserList

func (x *GetCouponsListResponse) GetCouponUserList() []*CouponUser

func (*GetCouponsListResponse) ProtoMessage

func (*GetCouponsListResponse) ProtoMessage()

func (*GetCouponsListResponse) ProtoReflect

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

func (*GetCouponsListResponse) Reset

func (x *GetCouponsListResponse) Reset()

func (*GetCouponsListResponse) String

func (x *GetCouponsListResponse) String() string

type UnimplementedCouponsServer

type UnimplementedCouponsServer struct{}

UnimplementedCouponsServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedCouponsServer) GetCouponsList

type UnsafeCouponsServer

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

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

type UpdateCouponByCouponUserIdRequest

type UpdateCouponByCouponUserIdRequest struct {
	CouponUserID int64 `protobuf:"varint,10,opt,name=CouponUserID,proto3" json:"CouponUserID,omitempty"`
	Status       int32 `protobuf:"varint,20,opt,name=Status,proto3" json:"Status,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateCouponByCouponUserIdRequest) Descriptor deprecated

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

Deprecated: Use UpdateCouponByCouponUserIdRequest.ProtoReflect.Descriptor instead.

func (*UpdateCouponByCouponUserIdRequest) GetCouponUserID

func (x *UpdateCouponByCouponUserIdRequest) GetCouponUserID() int64

func (*UpdateCouponByCouponUserIdRequest) GetStatus

func (*UpdateCouponByCouponUserIdRequest) ProtoMessage

func (*UpdateCouponByCouponUserIdRequest) ProtoMessage()

func (*UpdateCouponByCouponUserIdRequest) ProtoReflect

func (*UpdateCouponByCouponUserIdRequest) Reset

func (*UpdateCouponByCouponUserIdRequest) String

type UpdateCouponByCouponUserIdResponse

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

func (*UpdateCouponByCouponUserIdResponse) Descriptor deprecated

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

Deprecated: Use UpdateCouponByCouponUserIdResponse.ProtoReflect.Descriptor instead.

func (*UpdateCouponByCouponUserIdResponse) ProtoMessage

func (*UpdateCouponByCouponUserIdResponse) ProtoMessage()

func (*UpdateCouponByCouponUserIdResponse) ProtoReflect

func (*UpdateCouponByCouponUserIdResponse) Reset

func (*UpdateCouponByCouponUserIdResponse) String

Jump to

Keyboard shortcuts

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