Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiContext ¶
type ApiContext struct { Trazability Trazability Database database.Database Request Request Response Response }
type Endpoint ¶
type Endpoint struct { Path string `json:"path"` Method HttpMethod `json:"method"` RequestMimeType MimeType `json:"requestMimeType"` ResponseMimeType MimeType `json:"responseMimeType"` Listener EndpointListener `json:"-"` Checks EndpointCheck `json:"-"` Secured bool `json:"secured"` Database bool `json:"-"` }
type EndpointCheck ¶
type EndpointCheck func(context *ApiContext) *Error
type EndpointListener ¶
type EndpointListener func(context *ApiContext) (*interface{}, *Error)
type HttpHeaders ¶ added in v0.0.14
type HttpHeaders string
const ( HeaderContentType HttpHeaders = "Content-Type" HeaderAccept HttpHeaders = "Accept" HeaderAuthorization HttpHeaders = "Authorization" HeaderUserAgent HttpHeaders = "User-Agent" HeaderContentLength HttpHeaders = "Content-Length" HeaderContentEncoding HttpHeaders = "Content-Encoding" HeaderContentDisposition HttpHeaders = "Content-Disposition" HeaderContentTransferEncoding HttpHeaders = "Content-Transfer-Encoding" HeaderContentLanguage HttpHeaders = "Content-Language" )
type HttpMethod ¶ added in v0.0.14
type HttpMethod int
const ( GetMethod HttpMethod = iota PostMethod PutMethod DeleteMethod PatchMethod OptionsMethod HeadMethod TraceMethod )
type Launcher ¶
type Launcher struct { Id string `json:"id"` LauncherType LauncherType `json:"type"` }
type MimeType ¶ added in v0.0.14
type MimeType string
const ( MimeApplicationJson MimeType = "application/json" MimeApplicationXml MimeType = "application/xml" MimeApplicationYaml MimeType = "application/yaml" MimeApplicationForm MimeType = "application/x-www-form-urlencoded" MimeApplicationOctetStream MimeType = "application/octet-stream" MimeTextPlain MimeType = "text/plain" MimeTextHtml MimeType = "text/html" )
type Trazability ¶
type Trazability struct { Endpoint Endpoint `json:"endpoint"` Timestamp *int64 `json:"timestamp"` Launcher Launcher `json:"launcher"` User *usersmodels.User `json:"user"` }
Click to show internal directories.
Click to hide internal directories.