storage

package
v0.0.0-...-f8894ad Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateItemRequest

type CreateItemRequest struct {
	Name string
}

type Item

type Item struct {
	ID   string
	Name string
}

func ScanItem

func ScanItem(s Scanner) (*Item, error)

type Scanner

type Scanner interface {
	Scan(dest ...interface{}) error
}

type Storage

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

func NewStorage

func NewStorage(databaseURL string) (*Storage, error)

func (*Storage) CreateItem

func (s *Storage) CreateItem(ctx context.Context, i CreateItemRequest) (*Item, error)

func (*Storage) ListItems

func (s *Storage) ListItems(ctx context.Context) ([]*Item, error)

Jump to

Keyboard shortcuts

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