catalog

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package catalog stores the prices of the catalog in Bigtable through the "catalog" client.

Index

Constants

View Source
const (
	// Table holds one row per SKU.
	Table = "prices"
	// Family is the column family of the price.
	Family = "p"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Prices

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

Prices reads and writes prices.

func NewPrices

func NewPrices(client *bigtable.Client) *Prices

NewPrices provides the prices on the catalog client, which inject builds with the log plugin. @Provide(index=0) @Inject(index=0, name=catalog, plugins=[log])

func (*Prices) Get

func (p *Prices) Get(ctx context.Context, sku string) (string, error)

Get reads the price of sku, empty when it has none.

func (*Prices) Set

func (p *Prices) Set(ctx context.Context, sku, price string) error

Set writes the price of sku.

Jump to

Keyboard shortcuts

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