entity

package
v0.0.0-...-ac9c1c3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID          int    `json:"id_category"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

Category defines the structure of the category entity

type Image

type Image struct {
	ID          int    `json:"id_image"`
	Description string `json:"description"`
	IDCategory  string `json:"id_category"`
	URL         string `json:"url"`
	CreatedAt   string `json:"created_at"`
	Tag         string `json:"tag"`
}

Image defines the structure of the image entity.

type Response

type Response struct {
	Status Status      `json:"status"`
	Data   interface{} `json:"data"`
}

Response defines the structure of the response entity.

func SetResponse

func SetResponse(code int, message string, data interface{}) *Response

SetResponse set the structure of the JSON response.

type Status

type Status struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

Status defines the structure of the status entity for the response.

type Tag

type Tag struct {
	ID   int    `json:"id_tag"`
	Name string `json:"name"`
}

Tag defines the structure of the tag entity.

Jump to

Keyboard shortcuts

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