Documentation ¶
Index ¶
- Constants
- Variables
- func Init(app *fiber.App, db *sql.DB) error
- type CreateDrinkRequest
- func (d CreateDrinkRequest) GetIngredients() []string
- func (d CreateDrinkRequest) GetInstructions() string
- func (d CreateDrinkRequest) GetName() string
- func (d CreateDrinkRequest) GetNotes() string
- func (d CreateDrinkRequest) GetPreferredGlass() string
- func (d CreateDrinkRequest) GetPrimaryAlcohol() string
- func (d CreateDrinkRequest) GetPublicity() string
- func (d *CreateDrinkRequest) SetIngredients(v []string)
- func (d *CreateDrinkRequest) SetInstructions(v string)
- func (d *CreateDrinkRequest) SetName(v string)
- func (d *CreateDrinkRequest) SetNotes(v string)
- func (d *CreateDrinkRequest) SetPreferredGlass(v string)
- func (d *CreateDrinkRequest) SetPrimaryAlcohol(v string)
- func (d *CreateDrinkRequest) SetPublicity(v string)
- type CreateDrinkResponse
- type DeleteDrinkResponse
- type Drink
- func (d Drink) GetIngredients() []string
- func (d Drink) GetInstructions() string
- func (d Drink) GetName() string
- func (d Drink) GetNotes() string
- func (d Drink) GetPreferredGlass() string
- func (d Drink) GetPrimaryAlcohol() string
- func (d Drink) GetPublicity() string
- func (d *Drink) SetIngredients(v []string)
- func (d *Drink) SetInstructions(v string)
- func (d *Drink) SetName(v string)
- func (d *Drink) SetNotes(v string)
- func (d *Drink) SetPreferredGlass(v string)
- func (d *Drink) SetPrimaryAlcohol(v string)
- func (d *Drink) SetPublicity(v string)
- type DrinkDataGetter
- type DrinkDataOperator
- type DrinkDataSetter
- type GetDrinkResponse
- type GetDrinksByUserResponse
- type Model
- type UpdateDrinkRequest
- func (d UpdateDrinkRequest) GetIngredients() []string
- func (d UpdateDrinkRequest) GetInstructions() string
- func (d UpdateDrinkRequest) GetName() string
- func (d UpdateDrinkRequest) GetNotes() string
- func (d UpdateDrinkRequest) GetPreferredGlass() string
- func (d UpdateDrinkRequest) GetPrimaryAlcohol() string
- func (d UpdateDrinkRequest) GetPublicity() string
- func (d *UpdateDrinkRequest) SetIngredients(v []string)
- func (d *UpdateDrinkRequest) SetInstructions(v string)
- func (d *UpdateDrinkRequest) SetName(v string)
- func (d *UpdateDrinkRequest) SetNotes(v string)
- func (d *UpdateDrinkRequest) SetPreferredGlass(v string)
- func (d *UpdateDrinkRequest) SetPrimaryAlcohol(v string)
- func (d *UpdateDrinkRequest) SetPublicity(v string)
- type UpdateDrinkResponse
Constants ¶
View Source
const ( DrinkPublicityPublic = "public" DrinkPublicityPrivate = "private" )
View Source
const (
TableName = "drink"
)
Variables ¶
View Source
var ModelStruct = sqlbuilder.NewStruct(new(Model))
Functions ¶
Types ¶
type CreateDrinkRequest ¶
type CreateDrinkRequest struct {
// contains filtered or unexported fields
}
func (CreateDrinkRequest) GetIngredients ¶
func (d CreateDrinkRequest) GetIngredients() []string
func (CreateDrinkRequest) GetInstructions ¶
func (d CreateDrinkRequest) GetInstructions() string
func (CreateDrinkRequest) GetPreferredGlass ¶
func (d CreateDrinkRequest) GetPreferredGlass() string
func (CreateDrinkRequest) GetPrimaryAlcohol ¶
func (d CreateDrinkRequest) GetPrimaryAlcohol() string
func (CreateDrinkRequest) GetPublicity ¶
func (d CreateDrinkRequest) GetPublicity() string
func (*CreateDrinkRequest) SetIngredients ¶
func (d *CreateDrinkRequest) SetIngredients(v []string)
func (*CreateDrinkRequest) SetInstructions ¶
func (d *CreateDrinkRequest) SetInstructions(v string)
func (*CreateDrinkRequest) SetPreferredGlass ¶
func (d *CreateDrinkRequest) SetPreferredGlass(v string)
func (*CreateDrinkRequest) SetPrimaryAlcohol ¶
func (d *CreateDrinkRequest) SetPrimaryAlcohol(v string)
func (*CreateDrinkRequest) SetPublicity ¶
func (d *CreateDrinkRequest) SetPublicity(v string)
type CreateDrinkResponse ¶
type DeleteDrinkResponse ¶
type Drink ¶
type Drink struct { ID int64 `json:"id"` Username string `json:"username" validate:"required"` // contains filtered or unexported fields }
func (Drink) GetIngredients ¶
func (d Drink) GetIngredients() []string
func (Drink) GetInstructions ¶
func (d Drink) GetInstructions() string
func (Drink) GetPreferredGlass ¶
func (d Drink) GetPreferredGlass() string
func (Drink) GetPrimaryAlcohol ¶
func (d Drink) GetPrimaryAlcohol() string
func (Drink) GetPublicity ¶
func (d Drink) GetPublicity() string
func (*Drink) SetIngredients ¶
func (d *Drink) SetIngredients(v []string)
func (*Drink) SetInstructions ¶
func (d *Drink) SetInstructions(v string)
func (*Drink) SetPreferredGlass ¶
func (d *Drink) SetPreferredGlass(v string)
func (*Drink) SetPrimaryAlcohol ¶
func (d *Drink) SetPrimaryAlcohol(v string)
func (*Drink) SetPublicity ¶
func (d *Drink) SetPublicity(v string)
type DrinkDataGetter ¶
type DrinkDataOperator ¶
type DrinkDataOperator interface { DrinkDataSetter DrinkDataGetter }
type DrinkDataSetter ¶
type GetDrinkResponse ¶
type GetDrinksByUserResponse ¶
type Model ¶
type Model struct { ID int64 `db:"id"` Name string `db:"name" fieldtag:"required_insert"` Username string `db:"username" fieldtag:"required_insert"` PrimaryAlcohol string `db:"primary_alcohol" fieldtag:"required_insert"` PreferredGlass string `db:"preferred_glass" fieldtag:"required_insert"` Ingredients string `db:"ingredients" fieldtag:"required_insert"` Instructions string `db:"instructions" fieldtag:"required_insert"` Notes string `db:"notes" fieldtag:"required_insert"` Publicity string `db:"publicity" fieldtag:"required_insert"` }
type UpdateDrinkRequest ¶
type UpdateDrinkRequest struct {
// contains filtered or unexported fields
}
func (UpdateDrinkRequest) GetIngredients ¶
func (d UpdateDrinkRequest) GetIngredients() []string
func (UpdateDrinkRequest) GetInstructions ¶
func (d UpdateDrinkRequest) GetInstructions() string
func (UpdateDrinkRequest) GetPreferredGlass ¶
func (d UpdateDrinkRequest) GetPreferredGlass() string
func (UpdateDrinkRequest) GetPrimaryAlcohol ¶
func (d UpdateDrinkRequest) GetPrimaryAlcohol() string
func (UpdateDrinkRequest) GetPublicity ¶
func (d UpdateDrinkRequest) GetPublicity() string
func (*UpdateDrinkRequest) SetIngredients ¶
func (d *UpdateDrinkRequest) SetIngredients(v []string)
func (*UpdateDrinkRequest) SetInstructions ¶
func (d *UpdateDrinkRequest) SetInstructions(v string)
func (*UpdateDrinkRequest) SetPreferredGlass ¶
func (d *UpdateDrinkRequest) SetPreferredGlass(v string)
func (*UpdateDrinkRequest) SetPrimaryAlcohol ¶
func (d *UpdateDrinkRequest) SetPrimaryAlcohol(v string)
func (*UpdateDrinkRequest) SetPublicity ¶
func (d *UpdateDrinkRequest) SetPublicity(v string)
type UpdateDrinkResponse ¶
Click to show internal directories.
Click to hide internal directories.