Documentation ¶
Index ¶
- Variables
- func NewSommelier(logger *log.Logger) sommelier.Service
- func NewStorage(db *bolt.DB, logger *log.Logger) (storage.Service, error)
- func NewSwagger(logger *log.Logger) swagger.Service
- func StorageMultiAddDecoderFunc(mr *multipart.Reader, p *[]*storage.Bottle) error
- func StorageMultiAddEncoderFunc(mw *multipart.Writer, p []*storage.Bottle) error
- func StorageMultiUpdateDecoderFunc(mr *multipart.Reader, p **storage.MultiUpdatePayload) error
- func StorageMultiUpdateEncoderFunc(mw *multipart.Writer, p *storage.MultiUpdatePayload) error
- type Bolt
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = fmt.Errorf("missing record")
ErrNotFound is the error returned when attempting to load a record that does not exist.
Functions ¶
func NewSommelier ¶
NewSommelier returns the sommelier service implementation.
func NewStorage ¶
NewStorage returns the storage service implementation.
func NewSwagger ¶
NewSwagger returns the swagger service implementation.
func StorageMultiAddDecoderFunc ¶
StorageMultiAddDecoderFunc implements the multipart decoder for service "storage" endpoint "multi_add". The decoder must populate the argument p after encoding.
func StorageMultiAddEncoderFunc ¶
StorageMultiAddEncoderFunc implements the multipart encoder for service "storage" endpoint "multi_add".
func StorageMultiUpdateDecoderFunc ¶
func StorageMultiUpdateDecoderFunc(mr *multipart.Reader, p **storage.MultiUpdatePayload) error
StorageMultiUpdateDecoderFunc implements the multipart decoder for service "storage" endpoint "multi_update". The decoder must populate the argument p after encoding.
func StorageMultiUpdateEncoderFunc ¶
func StorageMultiUpdateEncoderFunc(mw *multipart.Writer, p *storage.MultiUpdatePayload) error
StorageMultiUpdateEncoderFunc implements the multipart encoder for service "storage" endpoint "multi_update".
Types ¶
type Bolt ¶
type Bolt struct {
// contains filtered or unexported fields
}
Bolt is the database driver.
func (*Bolt) LoadAll ¶
LoadAll returns all the records in the given bucket. data should be a pointer to a slice. Don't do this in a real service :-)