controllers

package
v0.0.0-...-b6ba550 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteContentByID

func DeleteContentByID(ctx echo.Context) error

DeleteContentByID to getting content

func DeleteProductByID

func DeleteProductByID(ctx echo.Context) error

DeleteProductByID to getting products

func GetContentByID

func GetContentByID(ctx echo.Context) error

GetContentByID to getting content

func GetContents

func GetContents(ctx echo.Context) error

GetContents to getting Content

func GetProductByID

func GetProductByID(ctx echo.Context) error

GetProductByID to getting products

func GetProducts

func GetProducts(ctx echo.Context) error

GetProducts to getting products

func PostContent

func PostContent(ctx echo.Context) error

PostContent to getting content

func PostProduct

func PostProduct(ctx echo.Context) error

PostProduct to getting products

func PutContentByID

func PutContentByID(ctx echo.Context) error

PutContentByID to getting content

func PutProductByID

func PutProductByID(ctx echo.Context) error

PutProductByID to getting products

func SetIAPManager

func SetIAPManager(nk *echokit.EchoKit, cnf helpers.Config)

SetIAPManager to pass echokit and configs

Types

type AddContentPayload

type AddContentPayload struct {
	ContentName  string `validate:"required" json:"content_name"`
	ContentDesc  string `validate:"required" json:"content_desc"`
	ContentTags  string `validate:"required" json:"content_tags"`
	ContentImage string `validate:"required" json:"content_image"`
}

AddContentPayload add content payload

type AddProductPayload

type AddProductPayload struct {
	ProductID    string  `validate:"required" json:"product_id"`
	ProductName  string  `validate:"required" json:"product_name"`
	ProductDesc  string  `validate:"required" json:"product_desc"`
	ProductImage string  `validate:"required" json:"product_image"`
	ProductPrice float64 `validate:"required" json:"product_price"`
}

AddProductPayload add product payload

type DownloadLog

type DownloadLog struct {
	RevNum     string `validate:"required" json:"rev_num"`
	LastDate   string `validate:"required" json:"last_date"`
	LastEdit   string `validate:"required" json:"last_edit"`
	LastTime   string `validate:"required" json:"last_time"`
	MacAddress string `validate:"required" json:"mac_address"`
}

DownloadLog to post metadata after download

type FilterContentPayload

type FilterContentPayload struct {
	Page       int      `validate:"required" json:"page" query:"page"`
	RowPerPage int      `validate:"required" json:"row_per_page" query:"row_per_page"`
	Tag        []string `validate:"required" json:"tag" query:"tag"`
}

FilterContentPayload to filter content list

type LoginRequest

type LoginRequest struct {
	Email      string `validate:"required,email" json:"email"`
	Password   string `validate:"required" json:"password"`
	MacAddress string `validate:"required" json:"mac_address"`
}

LoginRequest for login request

type MessageResponse

type MessageResponse struct {
	Title   string `json:"title"`
	Message string `json:"message"`
}

MessageResponse for response message

type MessageWithPayloadResponse

type MessageWithPayloadResponse struct {
	Title   string      `json:"title"`
	Message string      `json:"message"`
	Payload interface{} `json:"payload"`
}

MessageWithPayloadResponse for response message with payload

type UpdateProductPayload

type UpdateProductPayload struct {
	ProductName  string  `validate:"required" json:"product_name"`
	ProductDesc  string  `validate:"required" json:"product_desc"`
	ProductImage string  `validate:"required" json:"product_image"`
	ProductPrice float64 `validate:"required" json:"product_price"`
}

UpdateProductPayload add product payload

Jump to

Keyboard shortcuts

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