beer

package
v0.19.15 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONTENT_TYPE      = "Content-Type"
	CONTENT_TYPE_JSON = "application/json"
	AUTHORIZATION     = "Authorization"
)

Variables

This section is empty.

Functions

func InitResource

func InitResource(router *gin.RouterGroup, path string, as accountService, s service, ctx context.Context) (r resource, err error)

func InitService

func InitService(st stream.Stream, ctx context.Context) (s service, err error)

Types

type Beer added in v0.19.7

type Beer struct {
	Id       string  `json:"id"`
	Name     string  `json:"name"`
	Brand    string  `json:"brand"`
	BrewYear int     `json:"brew_year"`
	ABV      float32 `json:"abv"`
}

type Store added in v0.13.0

type Store interface {
	Set(b store.Beer) (err error)
	Get(id string) (b store.Beer, err error)
	Stream(ctx context.Context) (out <-chan event.Event[store.Beer], err error)
	Range(f func(key string, data store.Beer) error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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