Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeerType ¶
type BeerType int
BeerType describes the beer type.
const ( // Unspecified beer type Unspecified BeerType = iota + 1 // Unspecified beer type // Ale is a beer type, see https://en.wikipedia.org/wiki/Ale Ale // Bitter is a beer type, see https://en.wikipedia.org/wiki/Bitter_(beer) Bitter // Lager is a beer type, see https://en.wikipedia.org/wiki/Lager Lager // IndiaPaleAle (IPA) is a beer type, see https://en.wikipedia.org/wiki/India_pale_ale IndiaPaleAle // Stout is a beer type, see https://en.wikipedia.org/wiki/Stout Stout // Pilsner is a beer type, see https://en.wikipedia.org/wiki/Pilsner Pilsner // Porter is a beer type, see https://en.wikipedia.org/wiki/Porter_(beer) Porter // PaleAle is a beer type, see https://en.wikipedia.org/wiki/Pale_ale PaleAle )
type CreateBeerParams ¶
CreateBeerParams describes parameters for creating a beer.
func (*CreateBeerParams) Validate ¶
func (b *CreateBeerParams) Validate() error
Validate validates the CreateBeerParams.
type DeleteBeerParams ¶
type DeleteBeerParams struct {
ID string
}
DeleteBeerParams describes parameters for deleting a beer.
func (*DeleteBeerParams) Validate ¶
func (b *DeleteBeerParams) Validate() error
Validate validates the DeleteBeerParams.
type GetBeerParams ¶
type GetBeerParams struct {
ID string
}
GetBeerParams describes parameters for getting a beer.
func (*GetBeerParams) Validate ¶
func (b *GetBeerParams) Validate() error
Validate validates the GetBeerParams.
type ListBeersParams ¶
type ListBeersParams struct { // Page is the page number of the beers. Page int }
ListBeersParams describes parameters for listing beers.
func (*ListBeersParams) Validate ¶
func (b *ListBeersParams) Validate() error
Validate validates the ListBeersParams.
type UpdateBeerParams ¶
type UpdateBeerParams struct { ID string Name *string Type *BeerType Brewer *string Country *string }
UpdateBeerParams describes parameters for updating a beer.
func (*UpdateBeerParams) Validate ¶
func (b *UpdateBeerParams) Validate() error
Validate validates the UpdateBeerParams.
type ValidationError ¶
type ValidationError struct {
// contains filtered or unexported fields
}
ValidationError is a validation error.
func NewValidationError ¶
func NewValidationError(msg string) ValidationError
NewValidationError returns a new ValidationError.
func (ValidationError) Error ¶
func (e ValidationError) Error() string
Error returns the validation error string.