api

package
v0.0.0-...-e212f3b Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SuccessfulResponse = Response{
	Data: g.Map{"success": true},
}

SuccessfulResponse - the response incidcating the action is successful.

Functions

This section is empty.

Types

type Error

type Error struct {
	ErrorCode    interface{} `json:"error_code,omitempty"`
	ErrorMessage interface{} `json:"error_message,omitempty"`
}

Error - the common API error object used for UI error displaying.

type Page

type Page struct {
	CurrentPage   int         `json:"current_page"`
	PageSize      int         `json:"page_size"`
	TotalPages    int         `json:"total_pages"`
	TotalElements int         `json:"total_elements"`
	Elements      interface{} `json:"elements"`
}

Page - the common API entity for pagination cases.

type RequestPage

type RequestPage struct {
	Page int `json:"page"`
	Size int `json:"size"`
}

RequestPage - the page informatin passed from UI side.

type Response

type Response struct {
	Error *Error      `json:"error,omitempty"`
	Data  interface{} `json:"data,omitempty"`
}

Response - the common API response for the system.

Jump to

Keyboard shortcuts

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