topgenerator

package
v0.0.0-...-4515e61 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeHTTPGetEndpoint

func MakeHTTPGetEndpoint(l *zap.Logger, e encode.Encoder, m *Manager) http.HandlerFunc

MakeHTTPGetEndpoint for tops

func MakeHTTPUpsertEndpoint

func MakeHTTPUpsertEndpoint(l *zap.Logger, e encode.Encoder, m *Manager) http.HandlerFunc

MakeHTTPUpsertEndpoint for top objects

Types

type Complete

type Complete interface {
	Identifier
	Incomplete
}

Complete top object

type Identifier

type Identifier interface {
	Sex() bool
	UndershirtID() uint64
	TopID() uint64
}

Identifier of a top

type Incomplete

type Incomplete interface {
	Provider
}

Incomplete top object

func NewIncomplete

func NewIncomplete(status, clothingType, valencyType uint8, torsoID, polyester, cotton, leather, silk, relativeAmount uint) Incomplete

NewIncomplete top object

type Manager

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

Manager for tops

func NewManager

func NewManager(r Repository) *Manager

NewManager for top objects

func (*Manager) Get

func (m *Manager) Get(ctx context.Context, id Identifier) (Complete, error)

Get top information

func (*Manager) Upsert

func (m *Manager) Upsert(ctx context.Context, c Complete) error

Upsert a top into a repository

type Provider

type Provider interface {
	Data() *data
}

Provider of top data

type Repository

type Repository interface {
	Get(context.Context, Identifier) (Complete, error)
	Upsert(context.Context, Complete) error
}

Repository for top storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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