controller

package
Version: v0.0.0-...-8cd3cf9 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2017 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTag

func AddTag(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func FormResponse

func FormResponse(message string, code int, results interface{}) []byte

func Index

func ProductCreate

func ProductCreate(w http.ResponseWriter, r *http.Request, _ httprouter.Param)

func ProductDetail

func ProductDetail(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func ShopCreate

func ShopCreate(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func ShopDetail

func ShopDetail(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func ShopTags

func ShopTags(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Types

type ResponseStruct

type ResponseStruct struct {
	Message string      `json:"message"`
	Code    int         `json:"status_code"`
	Results interface{} `json:"results"`
}

type Shop

type Shop struct {
	ID         int     `json:"id"`
	Name       string  `json:"name"`
	Phone      string  `json:"phone"`
	Latitude   float64 `json:"latitude"`
	Longitude  float64 `json:"longitude"`
	Address    string  `json:"address"`
	CategoryID int     `json:"category_id"`
}

type Tag

type Tag struct {
	ID         int    `json:"id"`
	Name       string `json:"name"`
	CategoryID int    `json:"category_id"`
}

type Trend

type Trend struct {
	TagName string `json:"tag_name"`
	Count   int    `json:"count"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL