sushi

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	CreateSushi(ctx context.Context, s *Sushi) error
	GetSushis(ctx context.Context) ([]Sushi, error)
	DeleteSushi(ctx context.Context, ID string) error
	UpdateSushi(ctx context.Context, ID string, s *Sushi) error
	GetSushiByID(ctx context.Context, ID string) (*Sushi, error)
}

Repository provides access to the sushi storage

type Sushi

type Sushi struct {
	ID          string     `json:"id"`
	ImageNumber string     `json:"imageNumber,omitempty"`
	Name        string     `json:"name,omitempty"`
	Ingredients []string   `json:"ingredients,omitempty"`
	CreatedAt   *time.Time `json:"-"`
	UpdatedAt   *time.Time `json:"-"`
}

Sushi defines the properties of a sushi to be listed

func New

func New(ID, ImageNumber, Name string, Ingredients []string) *Sushi

New creates a sushi

Directories

Path Synopsis
log
storage

Jump to

Keyboard shortcuts

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