responses

package
v0.0.0-...-b76b2b2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2021 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 Address

type Address struct {
	AddressLine1 string `` /* 128-byte string literal not displayed */
	AddressLine2 string `param:"address_line_2" query:"address_line_2" form:"address_line_2" json:"address_line_2" xml:"address_line_2" validate:""`
	City         string `param:"city" query:"city" form:"city" json:"city" xml:"city" validate:"required"`
	PostCode     string `param:"post_code" query:"post_code" form:"post_code" json:"post_code" xml:"post_code" validate:"required"`
}

type FoodResponse

type FoodResponse struct {
	FoodId      string  `json:"food_id"`
	FoodType    string  `json:"food_type"`
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Price       float64 `json:"price"`
}

func NewFoodResponse

func NewFoodResponse(f *model.Food) (*FoodResponse, error)
type MenuResponse struct {
	MenuId uuid.UUID      `json:"menuId"`
	Foods  []FoodResponse `json:"foods"`
}

func NewMenuRestaurantResponse

func NewMenuRestaurantResponse(m *model.Menu) (*MenuResponse, error)

type RestaurantAddressResponse

type RestaurantAddressResponse struct {
	RestaurantID string
	AddressID    string
}

func NewRestaurantAddressResponse

func NewRestaurantAddressResponse(restaurantId, addressId string) (*RestaurantAddressResponse, error)

type RestaurantResponse

type RestaurantResponse struct {
	Restaurant struct {
		Name        string       `param:"name" query:"name" form:"name" json:"name" xml:"name" validate:"required"`
		Description string       `param:"description" query:"description" form:"description" json:"description" xml:"description" validate:""`
		Menu        MenuResponse `json:"menu"`
	} `json:"restaurant"`
}

func NewRestaurantResponse

func NewRestaurantResponse(r *model.Restaurant) (*RestaurantResponse, error)

type RestaurantsResponse

type RestaurantsResponse struct {
	Restaurants []RestaurantResponse `json:"restaurants"`
}

func NewRestaurantsResponse

func NewRestaurantsResponse(rs []model.Restaurant) (*RestaurantsResponse, error)

type TokenResponse

type TokenResponse struct {
	Token string `param:"token" query:"token" form:"token" json:"token" xml:"token"`
}

func NewTokenResponse

func NewTokenResponse(token string) (*TokenResponse, error)

type UserResponse

type UserResponse struct {
	User struct {
		Username string         `param:"username" query:"username" form:"username" json:"username" xml:"username"`
		Email    string         `param:"email" query:"email" form:"email" json:"email" xml:"email"`
		Role     model.RoleName `param:"role" query:"role" form:"role" json:"role" xml:"role"`
	} `json:"user"`
}

func NewUserResponse

func NewUserResponse(u *model.User) (*UserResponse, error)

type UserRestaurantResponse

type UserRestaurantResponse struct {
	RestaurantID string
	UserID       string
}

func NewUserRestaurantResponse

func NewUserRestaurantResponse(userId, restaurantId string) (*UserRestaurantResponse, error)

Jump to

Keyboard shortcuts

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