shared

package
v1.0.144 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericAPIResponse

type GenericAPIResponse struct {
	Data  interface{} `json:"data"`
	Error string      `json:"error"`
	Code  ReturnCode  `json:"code"`
}

GenericAPIResponse defines the structure of all responses on API endpoints

type ReturnCode

type ReturnCode string

ReturnCode defines the type defines to identify return codes

const ReturnCodeInternalError ReturnCode = "internal_issue"

ReturnCodeInternalError defines a request which hasn't been executed successfully due to an internal error

const ReturnCodeRequestError ReturnCode = "bad_request"

ReturnCodeRequestError defines a request which hasn't been executed successfully due to a bad request received

const ReturnCodeSuccess ReturnCode = "successful"

ReturnCodeSuccess defines a successful request

const ReturnCodeSystemBusy ReturnCode = "system_busy"

ReturnCodeSystemBusy defines a request which hasn't been executed successfully due to too many requests

Jump to

Keyboard shortcuts

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