backend

package
v0.0.0-...-4b954a8 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2018 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnauthorized         = errors.New("unauthorized")
	ErrInvalidQueueMovement = errors.New("invalid queue movement")
)

Functions

This section is empty.

Types

type Backend

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

func New

func New(l log.Logger, boltDB *bolt.DB) (*Backend, error)

func (*Backend) Advance

func (b *Backend) Advance() error

func (*Backend) Close

func (b *Backend) Close() error

func (*Backend) CreateTicket

func (b *Backend) CreateTicket() (model.Ticket, model.PIN, error)

func (*Backend) GetQueue

func (b *Backend) GetQueue() (model.Queue, error)

func (*Backend) GetState

func (b *Backend) GetState() (model.State, error)

func (*Backend) GetTicket

func (b *Backend) GetTicket(ticketID model.ID) (model.Ticket, error)

func (*Backend) GetTickets

func (b *Backend) GetTickets() (map[model.ID]model.Ticket, error)

func (*Backend) GoBack

func (b *Backend) GoBack() error

func (*Backend) Pause

func (b *Backend) Pause() error

func (*Backend) SetNames

func (b *Backend) SetNames(ticketID model.ID, names []string) error

func (*Backend) SetNamesWithPIN

func (b *Backend) SetNamesWithPIN(ticketID model.ID, names []string, p model.PIN) error

func (*Backend) UpdateState

func (b *Backend) UpdateState(s model.State) error

type ErrTicketDoesNotExist

type ErrTicketDoesNotExist struct {
	ID model.ID
}

func (ErrTicketDoesNotExist) Error

func (e ErrTicketDoesNotExist) Error() string

Jump to

Keyboard shortcuts

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