order

package
v0.0.0-...-1bf90d9 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCApi

type GRPCApi struct {
	loms.UnimplementedOrdersServer
	// contains filtered or unexported fields
}

func NewOrderGRPCApi

func NewOrderGRPCApi(
	orderService Service,
) *GRPCApi

func (*GRPCApi) OrderCancel

func (g *GRPCApi) OrderCancel(
	ctx context.Context,
	in *grpcmodels.OrderCancelRequest,
) (resp *emptypb.Empty, err error)

func (*GRPCApi) OrderCreate

func (g *GRPCApi) OrderCreate(
	ctx context.Context,
	in *grpcmodels.OrderCreateRequest,
) (resp *grpcmodels.OrderCreateResponse, err error)

func (*GRPCApi) OrderInfo

func (g *GRPCApi) OrderInfo(
	ctx context.Context,
	in *grpcmodels.OrderInfoRequest,
) (resp *grpcmodels.OrderInfoResponse, err error)

func (*GRPCApi) OrderPay

func (g *GRPCApi) OrderPay(
	ctx context.Context,
	in *grpcmodels.OrderPayRequest,
) (resp *emptypb.Empty, err error)

type Service

type Service interface {
	OrderCreate(ctx context.Context, create *requests.OrderCreate) (orderID int64, err error)
	OrderInfo(ctx context.Context, orderID int64) (responses.OrderInfo, error)
	OrderPay(ctx context.Context, orderID int64) error
	OrderCancel(ctx context.Context, orderID int64) error
}

Jump to

Keyboard shortcuts

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