types

package
v0.0.0-...-78845b4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: GPL-3.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Name        string     `json:"name"`
	Description string     `json:"description"`
	Method      string     `json:"method"`
	Route       string     `json:"route"`
	Params      []Param    `json:"params,omitempty"`
	Responses   []Response `json:"responses"`
	Payload     Payload    `json:"payload,omitempty"`
}

type Api

type Api struct {
	Name        string  `json:"name, omitempty"`
	Title       string  `json:"title, omitempty"`
	Description string  `json:"description,omitempty"`
	Contact     Contact `json:"contact"`
	Host        string  `json:"host, omitempty"`
	Port        int     `json:"port"`
	BasePath    string  `json:"basePath, omitempty"`
}

type Attribute

type Attribute struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Description string `json:"description,omitempty"`
	Required    bool   `json:"required"`
}

type Column

type Column struct {
	Name     string `json:"name"`
	DataType string `json:"data_type"`
}

type Contact

type Contact struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

type DataBase

type DataBase struct {
	Host     string `json:"host"`
	User     string `json:"user"`
	Password string `json:"password"`
	Type     string `json:"type"`
	Name     string `json:"name"`
	Port     int    `json:"port"`
}

type DatabaseSchema

type DatabaseSchema struct {
	Tables []Table `json:"tables"`
}

type Error

type Error struct {
	Message string `json:"message"`
}

type JsonArray

type JsonArray []JsonObject

type JsonObject

type JsonObject map[string]interface{}

type MediaType

type MediaType struct {
	Name        string      `json:"name"`
	Type        string      `json:"type"`
	Description string      `json:"description"`
	Attributes  []Attribute `json:"attributes"`
	Views       []View      `json:"views"`
}

type Param

type Param struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Description string `json:"description,omitempty"`
}

type Payload

type Payload struct {
	Name       string      `json:"name"`
	Attributes []Attribute `json:"attributes"`
}

type Resource

type Resource struct {
	Namegroup string    `json:"namegroup"`
	Basepath  string    `json:"basepath"`
	MediaType MediaType `json:"mediatype"`
	Actions   []Action  `json:"actions"`
}

type Response

type Response struct {
	Name string `json:"name"`
}

type ResponseAPI

type ResponseAPI struct {
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
	Errors  interface{} `json:"errors"`
}

type ResultSQLJson

type ResultSQLJson struct {
	ResultJson string
}

func (*ResultSQLJson) GetResultInBytes

func (this *ResultSQLJson) GetResultInBytes() []byte

type Table

type Table struct {
	Name    string   `json:"name"`
	Columns []Column `json:"columns"`
}

type Template

type Template struct {
	Api       Api        `json:"api"`
	Resources []Resource `json:"resources"`
}

type Timestamps

type Timestamps struct {
	CreatedAt time.Time `json:"created_at" on_create:"set,auto_now"`
	UpdatedAt time.Time `json:"updated_at"`
}

type View

type View struct {
	Name       string      `json:"name"`
	Attributes []Attribute `json:"attributes"`
}

Jump to

Keyboard shortcuts

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