api

package
v0.0.0-...-232a396 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddReading

func AddReading(c echo.Context) error

func ArchiveBatch

func ArchiveBatch(c echo.Context) error

func ArchiveHydrometer

func ArchiveHydrometer(c echo.Context) error

func EditBatch

func EditBatch(c echo.Context) error

func EditHydrometer

func EditHydrometer(c echo.Context) error

func FinishBatch

func FinishBatch(c echo.Context) error

func GetBatch

func GetBatch(c echo.Context) error

func GetHydrometer

func GetHydrometer(c echo.Context) error

func NewBatch

func NewBatch(c echo.Context) error

func NewHydrometer

func NewHydrometer(c echo.Context) error

func QueryAvailableHydrometers

func QueryAvailableHydrometers(c echo.Context) error

func QueryBatches

func QueryBatches(c echo.Context) error

func QueryHydrometers

func QueryHydrometers(c echo.Context) error

Types

type Batch

type Batch struct {
	ID              bson.ObjectId          `json:"id"`
	RecipeName      string                 `json:"recipe"`
	UniqueID        string                 `json:"stringId"`
	Hydrometer      Hydrometer             `json:"hydrometer"`
	GravityReadings *[]data.GravityReading `json:"readings"`
	LatestReading   data.GravityReading    `json:"latestReading"`
	Attenuation     float64                `json:"attenuation"`
	ABV             float64                `json:"abv"`
	StartDate       time.Time              `json:"startDate"`
	LastUpdate      time.Time              `json:"lastUpdate"`
	Active          bool                   `json:"active"`
	Archived        bool                   `json:"archived"`
}

type BatchParam

type BatchParam struct {
	ID         bson.ObjectId `json:"id"`
	RecipeName string        `json:"recipe"`
	UniqueID   string        `json:"stringId"`
	Hydrometer Hydrometer    `json:"hydrometer"`
	StartDate  time.Time     `json:"startDate"`
	Active     bool          `json:"active"`
	Archived   bool          `json:"archived"`
}

type Hydrometer

type Hydrometer struct {
	ID             bson.ObjectId `json:"id,omitempty"`
	Name           string        `json:"name"`
	Description    string        `json:"description"`
	Archived       bool          `json:"archived"`
	CurrentBatchID bson.ObjectId `json:"batch"`
}

type HydrometerParam

type HydrometerParam struct {
	ID          bson.ObjectId `json:"id,omitempty" bson:"id,omitempty"`
	Name        string        `bson:"name" json:"name"`
	Description string        `bson:"description" json:"description"`
	Archived    bool          `bson:"archived" json:"archived"`
}

type HydrometerReading

type HydrometerReading struct {
	HydrometerName string  `json:"name"`
	Gravity        float64 `json:"gravity"`
	Temperature    float64 `json:"temperature"`
	Battery        float64 `json:"battery"`
}

type LightweightBatch

type LightweightBatch struct {
}

Jump to

Keyboard shortcuts

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