books

package
v0.0.0-...-ae68c3b Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = o11y.NewWarning("no update or results")
)

Functions

This section is empty.

Types

type Book

type Book struct {
	ID    uuid.UUID `db:"id"`
	Name  string    `db:"name"`
	Price string    `db:"price"`
}

type Store

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

func NewStore

func NewStore(txm *db.TxManager) *Store

func (*Store) Add

func (s *Store) Add(ctx context.Context, toAdd ToAdd) (id uuid.UUID, err error)

func (*Store) ByID

func (s *Store) ByID(ctx context.Context, id uuid.UUID) (book *Book, err error)

type ToAdd

type ToAdd struct {
	Name  string `db:"name"`
	Price string `db:"price"`
}

Jump to

Keyboard shortcuts

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