score

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: 24 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, bs beerService, s service, ctx context.Context) (r resource, err error)

func InitService

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

Types

type Account added in v0.16.0

type Account interface {
	Weight(id uuid.UUID) float32
}

type Store

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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