catalog

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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