stores

package
v0.0.0-...-21e8389 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	UserID     string
	OrderID    string
	Amount     int64
	CommitedAt time.Time
}

func (*Order) ToInsertMap

func (o *Order) ToInsertMap() map[string]interface{}

type OrderDetail

type OrderDetail struct {
	UserID        string
	OrderID       string
	OrderDetailID int64
	ItemID        string
	Price         int64
	Quantity      int64
	CommitedAt    time.Time
}

func (*OrderDetail) ToInsertMap

func (od *OrderDetail) ToInsertMap() map[string]interface{}

type OrdersStore

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

func NewOrdersStore

func NewOrdersStore(sc *spanner.Client) (*OrdersStore, error)

func (*OrdersStore) Insert

func (s *OrdersStore) Insert(ctx context.Context, userID string, orderID string, details []*OrderDetail) (time.Time, error)

func (*OrdersStore) OrderDetailsTableName

func (s *OrdersStore) OrderDetailsTableName() string

func (*OrdersStore) OrderTableName

func (s *OrdersStore) OrderTableName() string

Jump to

Keyboard shortcuts

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