shared

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Drink

type Drink struct {
	// The name of the drink.
	Name string `json:"name"`
	// The price of one unit of the drink in US cents.
	Price float64 `json:"price"`
	// The product code of the drink, only available when authenticated.
	ProductCode *string `json:"productCode,omitempty"`
	// The number of units of the drink in stock, only available when authenticated.
	Stock *int64 `json:"stock,omitempty"`
	// The type of drink.
	Type *DrinkType `json:"type,omitempty"`
}

func (*Drink) GetName

func (o *Drink) GetName() string

func (*Drink) GetPrice

func (o *Drink) GetPrice() float64

func (*Drink) GetProductCode

func (o *Drink) GetProductCode() *string

func (*Drink) GetStock

func (o *Drink) GetStock() *int64

func (*Drink) GetType

func (o *Drink) GetType() *DrinkType

type DrinkInput

type DrinkInput struct {
	// The name of the drink.
	Name string `json:"name"`
	// The price of one unit of the drink in US cents.
	Price float64 `json:"price"`
	// The product code of the drink, only available when authenticated.
	ProductCode *string `json:"productCode,omitempty"`
	// The type of drink.
	Type *DrinkType `json:"type,omitempty"`
}

func (*DrinkInput) GetName

func (o *DrinkInput) GetName() string

func (*DrinkInput) GetPrice

func (o *DrinkInput) GetPrice() float64

func (*DrinkInput) GetProductCode

func (o *DrinkInput) GetProductCode() *string

func (*DrinkInput) GetType

func (o *DrinkInput) GetType() *DrinkType

type DrinkType

type DrinkType string

DrinkType - The type of drink.

const (
	DrinkTypeCocktail     DrinkType = "cocktail"
	DrinkTypeNonAlcoholic DrinkType = "non-alcoholic"
	DrinkTypeBeer         DrinkType = "beer"
	DrinkTypeWine         DrinkType = "wine"
	DrinkTypeSpirit       DrinkType = "spirit"
	DrinkTypeOther        DrinkType = "other"
)

func (DrinkType) ToPointer

func (e DrinkType) ToPointer() *DrinkType

func (*DrinkType) UnmarshalJSON

func (e *DrinkType) UnmarshalJSON(data []byte) error

type Error

type Error struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
}

func (*Error) GetCode

func (o *Error) GetCode() *string

func (*Error) GetMessage

func (o *Error) GetMessage() *string

type Ingredient

type Ingredient struct {
	// The name of the ingredient.
	Name string `json:"name"`
	// The product code of the ingredient, only available when authenticated.
	ProductCode *string `json:"productCode,omitempty"`
	// The number of units of the ingredient in stock, only available when authenticated.
	Stock *int64 `json:"stock,omitempty"`
	// The type of ingredient.
	Type IngredientType `json:"type"`
}

func (*Ingredient) GetName

func (o *Ingredient) GetName() string

func (*Ingredient) GetProductCode

func (o *Ingredient) GetProductCode() *string

func (*Ingredient) GetStock

func (o *Ingredient) GetStock() *int64

func (*Ingredient) GetType

func (o *Ingredient) GetType() IngredientType

type IngredientInput

type IngredientInput struct {
	// The name of the ingredient.
	Name string `json:"name"`
	// The product code of the ingredient, only available when authenticated.
	ProductCode *string `json:"productCode,omitempty"`
	// The type of ingredient.
	Type IngredientType `json:"type"`
}

func (*IngredientInput) GetName

func (o *IngredientInput) GetName() string

func (*IngredientInput) GetProductCode

func (o *IngredientInput) GetProductCode() *string

func (*IngredientInput) GetType

func (o *IngredientInput) GetType() IngredientType

type IngredientType

type IngredientType string

IngredientType - The type of ingredient.

const (
	IngredientTypeFresh    IngredientType = "fresh"
	IngredientTypeLongLife IngredientType = "long-life"
	IngredientTypePackaged IngredientType = "packaged"
)

func (IngredientType) ToPointer

func (e IngredientType) ToPointer() *IngredientType

func (*IngredientType) UnmarshalJSON

func (e *IngredientType) UnmarshalJSON(data []byte) error

type Order

type Order struct {
	// The product code of the drink or ingredient.
	ProductCode string `json:"productCode"`
	// The number of units of the drink or ingredient to order.
	Quantity int64 `json:"quantity"`
	// The status of the order.
	Status OrderStatus `json:"status"`
	// The type of order.
	Type OrderType `json:"type"`
}

Order - An order for a drink or ingredient.

func (*Order) GetProductCode

func (o *Order) GetProductCode() string

func (*Order) GetQuantity

func (o *Order) GetQuantity() int64

func (*Order) GetStatus

func (o *Order) GetStatus() OrderStatus

func (*Order) GetType

func (o *Order) GetType() OrderType

type OrderInput

type OrderInput struct {
	// The product code of the drink or ingredient.
	ProductCode string `json:"productCode"`
	// The number of units of the drink or ingredient to order.
	Quantity int64 `json:"quantity"`
	// The type of order.
	Type OrderType `json:"type"`
}

OrderInput - An order for a drink or ingredient.

func (*OrderInput) GetProductCode

func (o *OrderInput) GetProductCode() string

func (*OrderInput) GetQuantity

func (o *OrderInput) GetQuantity() int64

func (*OrderInput) GetType

func (o *OrderInput) GetType() OrderType

type OrderStatus added in v0.5.0

type OrderStatus string

OrderStatus - The status of the order.

const (
	OrderStatusPending    OrderStatus = "pending"
	OrderStatusProcessing OrderStatus = "processing"
	OrderStatusComplete   OrderStatus = "complete"
)

func (OrderStatus) ToPointer added in v0.5.0

func (e OrderStatus) ToPointer() *OrderStatus

func (*OrderStatus) UnmarshalJSON added in v0.5.0

func (e *OrderStatus) UnmarshalJSON(data []byte) error

type OrderType

type OrderType string

OrderType - The type of order.

const (
	OrderTypeDrink      OrderType = "drink"
	OrderTypeIngredient OrderType = "ingredient"
)

func (OrderType) ToPointer

func (e OrderType) ToPointer() *OrderType

func (*OrderType) UnmarshalJSON

func (e *OrderType) UnmarshalJSON(data []byte) error

type Security

type Security struct {
	APIKey string `security:"scheme,type=apiKey,subtype=header,name=Authorization"`
}

func (*Security) GetAPIKey

func (o *Security) GetAPIKey() string

Jump to

Keyboard shortcuts

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