seckill

package
v0.0.0-...-b6fae9c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_seckill_proto protoreflect.FileDescriptor
View Source
var Seckill_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "seckill.Seckill",
	HandlerType: (*SeckillServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SecKillActions",
			Handler:    _Seckill_SecKillActions_Handler,
		},
		{
			MethodName: "SecKillGoods",
			Handler:    _Seckill_SecKillGoods_Handler,
		},
		{
			MethodName: "SecKillGoodDetail",
			Handler:    _Seckill_SecKillGoodDetail_Handler,
		},
		{
			MethodName: "DeductRedisSecKillStock",
			Handler:    _Seckill_DeductRedisSecKillStock_Handler,
		},
		{
			MethodName: "ReturnRedisSecKillStock",
			Handler:    _Seckill_ReturnRedisSecKillStock_Handler,
		},
		{
			MethodName: "DeductMysqlSecKillStock",
			Handler:    _Seckill_DeductMysqlSecKillStock_Handler,
		},
		{
			MethodName: "ReturnMysqlSecKillStock",
			Handler:    _Seckill_ReturnMysqlSecKillStock_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "seckill.proto",
}

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

Functions

func RegisterSeckillServer

func RegisterSeckillServer(s grpc.ServiceRegistrar, srv SeckillServer)

Types

type BaseRes

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

func (*BaseRes) Descriptor deprecated

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

Deprecated: Use BaseRes.ProtoReflect.Descriptor instead.

func (*BaseRes) ProtoMessage

func (*BaseRes) ProtoMessage()

func (*BaseRes) ProtoReflect

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

func (*BaseRes) Reset

func (x *BaseRes) Reset()

func (*BaseRes) String

func (x *BaseRes) String() string

type DeductMysqlSecKillStockRequest

type DeductMysqlSecKillStockRequest struct {
	SecKillGoodsID uint64 `protobuf:"varint,10,opt,name=SecKillGoodsID,proto3" json:"SecKillGoodsID,omitempty"`
	// contains filtered or unexported fields
}

func (*DeductMysqlSecKillStockRequest) Descriptor deprecated

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

Deprecated: Use DeductMysqlSecKillStockRequest.ProtoReflect.Descriptor instead.

func (*DeductMysqlSecKillStockRequest) GetSecKillGoodsID

func (x *DeductMysqlSecKillStockRequest) GetSecKillGoodsID() uint64

func (*DeductMysqlSecKillStockRequest) ProtoMessage

func (*DeductMysqlSecKillStockRequest) ProtoMessage()

func (*DeductMysqlSecKillStockRequest) ProtoReflect

func (*DeductMysqlSecKillStockRequest) Reset

func (x *DeductMysqlSecKillStockRequest) Reset()

func (*DeductMysqlSecKillStockRequest) String

type DeductRedisSecKillStockRequest

type DeductRedisSecKillStockRequest struct {
	SecKillGoodsID uint64 `protobuf:"varint,10,opt,name=SecKillGoodsID,proto3" json:"SecKillGoodsID,omitempty"`
	// contains filtered or unexported fields
}

func (*DeductRedisSecKillStockRequest) Descriptor deprecated

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

Deprecated: Use DeductRedisSecKillStockRequest.ProtoReflect.Descriptor instead.

func (*DeductRedisSecKillStockRequest) GetSecKillGoodsID

func (x *DeductRedisSecKillStockRequest) GetSecKillGoodsID() uint64

func (*DeductRedisSecKillStockRequest) ProtoMessage

func (*DeductRedisSecKillStockRequest) ProtoMessage()

func (*DeductRedisSecKillStockRequest) ProtoReflect

func (*DeductRedisSecKillStockRequest) Reset

func (x *DeductRedisSecKillStockRequest) Reset()

func (*DeductRedisSecKillStockRequest) String

type SecKillActionInfo

type SecKillActionInfo struct {
	ID        uint64 `protobuf:"varint,10,opt,name=ID,proto3" json:"ID,omitempty"`
	No        string `protobuf:"bytes,20,opt,name=No,proto3" json:"No,omitempty"`
	StartTime string `protobuf:"bytes,30,opt,name=StartTime,proto3" json:"StartTime,omitempty"`
	Duration  uint64 `protobuf:"varint,40,opt,name=Duration,proto3" json:"Duration,omitempty"`
	State     string `protobuf:"bytes,50,opt,name=State,proto3" json:"State,omitempty"`
	// contains filtered or unexported fields
}

func (*SecKillActionInfo) Descriptor deprecated

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

Deprecated: Use SecKillActionInfo.ProtoReflect.Descriptor instead.

func (*SecKillActionInfo) GetDuration

func (x *SecKillActionInfo) GetDuration() uint64

func (*SecKillActionInfo) GetID

func (x *SecKillActionInfo) GetID() uint64

func (*SecKillActionInfo) GetNo

func (x *SecKillActionInfo) GetNo() string

func (*SecKillActionInfo) GetStartTime

func (x *SecKillActionInfo) GetStartTime() string

func (*SecKillActionInfo) GetState

func (x *SecKillActionInfo) GetState() string

func (*SecKillActionInfo) ProtoMessage

func (*SecKillActionInfo) ProtoMessage()

func (*SecKillActionInfo) ProtoReflect

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

func (*SecKillActionInfo) Reset

func (x *SecKillActionInfo) Reset()

func (*SecKillActionInfo) String

func (x *SecKillActionInfo) String() string

type SecKillActionsRequest

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

func (*SecKillActionsRequest) Descriptor deprecated

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

Deprecated: Use SecKillActionsRequest.ProtoReflect.Descriptor instead.

func (*SecKillActionsRequest) ProtoMessage

func (*SecKillActionsRequest) ProtoMessage()

func (*SecKillActionsRequest) ProtoReflect

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

func (*SecKillActionsRequest) Reset

func (x *SecKillActionsRequest) Reset()

func (*SecKillActionsRequest) String

func (x *SecKillActionsRequest) String() string

type SecKillActionsResponse

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

func (*SecKillActionsResponse) Descriptor deprecated

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

Deprecated: Use SecKillActionsResponse.ProtoReflect.Descriptor instead.

func (*SecKillActionsResponse) GetList

func (x *SecKillActionsResponse) GetList() []*SecKillActionInfo

func (*SecKillActionsResponse) ProtoMessage

func (*SecKillActionsResponse) ProtoMessage()

func (*SecKillActionsResponse) ProtoReflect

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

func (*SecKillActionsResponse) Reset

func (x *SecKillActionsResponse) Reset()

func (*SecKillActionsResponse) String

func (x *SecKillActionsResponse) String() string

type SecKillGoodDetailRequest

type SecKillGoodDetailRequest struct {
	SecKillID uint64 `protobuf:"varint,10,opt,name=SecKillID,proto3" json:"SecKillID,omitempty"`
	// contains filtered or unexported fields
}

func (*SecKillGoodDetailRequest) Descriptor deprecated

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

Deprecated: Use SecKillGoodDetailRequest.ProtoReflect.Descriptor instead.

func (*SecKillGoodDetailRequest) GetSecKillID

func (x *SecKillGoodDetailRequest) GetSecKillID() uint64

func (*SecKillGoodDetailRequest) ProtoMessage

func (*SecKillGoodDetailRequest) ProtoMessage()

func (*SecKillGoodDetailRequest) ProtoReflect

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

func (*SecKillGoodDetailRequest) Reset

func (x *SecKillGoodDetailRequest) Reset()

func (*SecKillGoodDetailRequest) String

func (x *SecKillGoodDetailRequest) String() string

type SecKillGoodDetailResponse

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

func (*SecKillGoodDetailResponse) Descriptor deprecated

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

Deprecated: Use SecKillGoodDetailResponse.ProtoReflect.Descriptor instead.

func (*SecKillGoodDetailResponse) GetInfo

func (*SecKillGoodDetailResponse) ProtoMessage

func (*SecKillGoodDetailResponse) ProtoMessage()

func (*SecKillGoodDetailResponse) ProtoReflect

func (*SecKillGoodDetailResponse) Reset

func (x *SecKillGoodDetailResponse) Reset()

func (*SecKillGoodDetailResponse) String

func (x *SecKillGoodDetailResponse) String() string

type SecKillGoodInfo

type SecKillGoodInfo struct {
	ID           uint64 `protobuf:"varint,10,opt,name=ID,proto3" json:"ID,omitempty"`
	No           string `protobuf:"bytes,20,opt,name=No,proto3" json:"No,omitempty"`
	GoodID       uint64 `protobuf:"varint,30,opt,name=GoodID,proto3" json:"GoodID,omitempty"`
	SecKillStock uint64 `protobuf:"varint,40,opt,name=SecKillStock,proto3" json:"SecKillStock,omitempty"`
	SecKillPrice string `protobuf:"bytes,60,opt,name=SecKillPrice,proto3" json:"SecKillPrice,omitempty"`
	Detail       string `protobuf:"bytes,70,opt,name=Detail,proto3" json:"Detail,omitempty"`
	// contains filtered or unexported fields
}

func (*SecKillGoodInfo) Descriptor deprecated

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

Deprecated: Use SecKillGoodInfo.ProtoReflect.Descriptor instead.

func (*SecKillGoodInfo) GetDetail

func (x *SecKillGoodInfo) GetDetail() string

func (*SecKillGoodInfo) GetGoodID

func (x *SecKillGoodInfo) GetGoodID() uint64

func (*SecKillGoodInfo) GetID

func (x *SecKillGoodInfo) GetID() uint64

func (*SecKillGoodInfo) GetNo

func (x *SecKillGoodInfo) GetNo() string

func (*SecKillGoodInfo) GetSecKillPrice

func (x *SecKillGoodInfo) GetSecKillPrice() string

func (*SecKillGoodInfo) GetSecKillStock

func (x *SecKillGoodInfo) GetSecKillStock() uint64

func (*SecKillGoodInfo) ProtoMessage

func (*SecKillGoodInfo) ProtoMessage()

func (*SecKillGoodInfo) ProtoReflect

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

func (*SecKillGoodInfo) Reset

func (x *SecKillGoodInfo) Reset()

func (*SecKillGoodInfo) String

func (x *SecKillGoodInfo) String() string

type SecKillGoodsRequest

type SecKillGoodsRequest struct {
	SecKillID uint64 `protobuf:"varint,10,opt,name=SecKillID,proto3" json:"SecKillID,omitempty"`
	// contains filtered or unexported fields
}

func (*SecKillGoodsRequest) Descriptor deprecated

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

Deprecated: Use SecKillGoodsRequest.ProtoReflect.Descriptor instead.

func (*SecKillGoodsRequest) GetSecKillID

func (x *SecKillGoodsRequest) GetSecKillID() uint64

func (*SecKillGoodsRequest) ProtoMessage

func (*SecKillGoodsRequest) ProtoMessage()

func (*SecKillGoodsRequest) ProtoReflect

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

func (*SecKillGoodsRequest) Reset

func (x *SecKillGoodsRequest) Reset()

func (*SecKillGoodsRequest) String

func (x *SecKillGoodsRequest) String() string

type SecKillGoodsResponse

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

func (*SecKillGoodsResponse) Descriptor deprecated

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

Deprecated: Use SecKillGoodsResponse.ProtoReflect.Descriptor instead.

func (*SecKillGoodsResponse) GetList

func (x *SecKillGoodsResponse) GetList() []*SecKillGoodInfo

func (*SecKillGoodsResponse) ProtoMessage

func (*SecKillGoodsResponse) ProtoMessage()

func (*SecKillGoodsResponse) ProtoReflect

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

func (*SecKillGoodsResponse) Reset

func (x *SecKillGoodsResponse) Reset()

func (*SecKillGoodsResponse) String

func (x *SecKillGoodsResponse) String() string

type SeckillClient

type SeckillClient interface {
	SecKillActions(ctx context.Context, in *SecKillActionsRequest, opts ...grpc.CallOption) (*SecKillActionsResponse, error)
	SecKillGoods(ctx context.Context, in *SecKillGoodsRequest, opts ...grpc.CallOption) (*SecKillGoodsResponse, error)
	SecKillGoodDetail(ctx context.Context, in *SecKillGoodDetailRequest, opts ...grpc.CallOption) (*SecKillGoodDetailResponse, error)
	DeductRedisSecKillStock(ctx context.Context, in *DeductRedisSecKillStockRequest, opts ...grpc.CallOption) (*BaseRes, error)
	ReturnRedisSecKillStock(ctx context.Context, in *DeductRedisSecKillStockRequest, opts ...grpc.CallOption) (*BaseRes, error)
	DeductMysqlSecKillStock(ctx context.Context, in *DeductMysqlSecKillStockRequest, opts ...grpc.CallOption) (*BaseRes, error)
	ReturnMysqlSecKillStock(ctx context.Context, in *DeductMysqlSecKillStockRequest, opts ...grpc.CallOption) (*BaseRes, error)
}

SeckillClient is the client API for Seckill 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 NewSeckillClient

func NewSeckillClient(cc grpc.ClientConnInterface) SeckillClient

type SeckillServer

type SeckillServer interface {
	SecKillActions(context.Context, *SecKillActionsRequest) (*SecKillActionsResponse, error)
	SecKillGoods(context.Context, *SecKillGoodsRequest) (*SecKillGoodsResponse, error)
	SecKillGoodDetail(context.Context, *SecKillGoodDetailRequest) (*SecKillGoodDetailResponse, error)
	DeductRedisSecKillStock(context.Context, *DeductRedisSecKillStockRequest) (*BaseRes, error)
	ReturnRedisSecKillStock(context.Context, *DeductRedisSecKillStockRequest) (*BaseRes, error)
	DeductMysqlSecKillStock(context.Context, *DeductMysqlSecKillStockRequest) (*BaseRes, error)
	ReturnMysqlSecKillStock(context.Context, *DeductMysqlSecKillStockRequest) (*BaseRes, error)
	// contains filtered or unexported methods
}

SeckillServer is the server API for Seckill service. All implementations must embed UnimplementedSeckillServer for forward compatibility

type UnimplementedSeckillServer

type UnimplementedSeckillServer struct {
}

UnimplementedSeckillServer must be embedded to have forward compatible implementations.

func (UnimplementedSeckillServer) DeductMysqlSecKillStock

func (UnimplementedSeckillServer) DeductRedisSecKillStock

func (UnimplementedSeckillServer) ReturnMysqlSecKillStock

func (UnimplementedSeckillServer) ReturnRedisSecKillStock

func (UnimplementedSeckillServer) SecKillActions

func (UnimplementedSeckillServer) SecKillGoods

type UnsafeSeckillServer

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

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

Jump to

Keyboard shortcuts

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