Documentation ¶
Overview ¶
Copyright 2017 karma.run AG. All rights reserved. Use of this source code is governed by an AGPL license that can be found in the LICENSE file.
Index ¶
- Constants
- Variables
- func AuthHttpHandler(rw http.ResponseWriter, rq *http.Request)
- func ExportHttpHandler(rw http.ResponseWriter, rq *http.Request)
- func HttpHandler(rw http.ResponseWriter, rq *http.Request)
- func ImportHttpHandler(rw http.ResponseWriter, rq *http.Request)
- func RandIv(ln int) []byte
- func ResetHttpHandler(rw http.ResponseWriter, rq *http.Request)
- func RestApiDeleteHttpHandler(rw http.ResponseWriter, rq *http.Request)
- func RestApiDeleteResourceHttpHandler(resource string, rw http.ResponseWriter, rq *http.Request)
- func RestApiDeleteResourceIdHttpHandler(resource, id string, rw http.ResponseWriter, rq *http.Request)
- func RestApiGetHttpHandler(rw http.ResponseWriter, rq *http.Request)
- func RestApiGetResourceHttpHandler(resource string, rw http.ResponseWriter, rq *http.Request)
- func RestApiGetResourceIdHttpHandler(resource, id string, rw http.ResponseWriter, rq *http.Request)
- func RestApiHttpHandler(rw http.ResponseWriter, rq *http.Request)
- func RestApiPostHttpHandler(rw http.ResponseWriter, rq *http.Request)
- func RestApiPostResourceHttpHandler(resource string, rw http.ResponseWriter, rq *http.Request)
- func RestApiPutHttpHandler(rw http.ResponseWriter, rq *http.Request)
- func RestApiPutResourceIdHttpHandler(resource, id string, rw http.ResponseWriter, rq *http.Request)
- func RotateInstanceSecretHttpHandler(rw http.ResponseWriter, rq *http.Request)
- type Payload
- type TxType
Constants ¶
View Source
const ( DocsPrefix = `docs` AuthPrefix = `auth` RestApiPrefix = `rest` ExportPrefix = `admin/export` ImportPrefix = `admin/import` ResetPrefix = `admin/reset` RotateInstanceSecretPrefix = `admin/rotate_instance_secret` )
View Source
const ( SignatureHeader = `X-Karma-Signature` CodecHeader = `X-Karma-Codec` SecretHeader = `X-Karma-Secret` )
View Source
const MaxPayloadBytes = 8 * 1024 * 1024 // 8MB
View Source
const (
MinDatabaseSecretLength = 512
)
Variables ¶
View Source
var ( ContextKeyCodec = contextKeyCodecT{} ContextKeyDatabase = contextKeyDatabaseT{} ContextKeyUserId = contextKeyUserIdT{} )
View Source
var AuthRequestModel = mdl.StructFromMap(map[string]mdl.Model{ "username": mdl.String{}, "password": mdl.String{}, })
Functions ¶
func AuthHttpHandler ¶
func AuthHttpHandler(rw http.ResponseWriter, rq *http.Request)
func ExportHttpHandler ¶
func ExportHttpHandler(rw http.ResponseWriter, rq *http.Request)
func HttpHandler ¶
func HttpHandler(rw http.ResponseWriter, rq *http.Request)
func ImportHttpHandler ¶
func ImportHttpHandler(rw http.ResponseWriter, rq *http.Request)
func ResetHttpHandler ¶
func ResetHttpHandler(rw http.ResponseWriter, rq *http.Request)
func RestApiDeleteHttpHandler ¶
func RestApiDeleteHttpHandler(rw http.ResponseWriter, rq *http.Request)
func RestApiDeleteResourceHttpHandler ¶
func RestApiDeleteResourceHttpHandler(resource string, rw http.ResponseWriter, rq *http.Request)
DELETE /{resource}
func RestApiDeleteResourceIdHttpHandler ¶
func RestApiDeleteResourceIdHttpHandler(resource, id string, rw http.ResponseWriter, rq *http.Request)
DELETE /{resource}/{id}
func RestApiGetHttpHandler ¶
func RestApiGetHttpHandler(rw http.ResponseWriter, rq *http.Request)
func RestApiGetResourceHttpHandler ¶
func RestApiGetResourceHttpHandler(resource string, rw http.ResponseWriter, rq *http.Request)
GET /{resource} query arguments: - length int amount of results - offset int amount to skip - metadata bool whether to metarialize TODO: sort
func RestApiGetResourceIdHttpHandler ¶
func RestApiGetResourceIdHttpHandler(resource, id string, rw http.ResponseWriter, rq *http.Request)
GET /{resource}/{id}
func RestApiHttpHandler ¶
func RestApiHttpHandler(rw http.ResponseWriter, rq *http.Request)
func RestApiPostHttpHandler ¶
func RestApiPostHttpHandler(rw http.ResponseWriter, rq *http.Request)
func RestApiPostResourceHttpHandler ¶
func RestApiPostResourceHttpHandler(resource string, rw http.ResponseWriter, rq *http.Request)
POST /{resource}
func RestApiPutHttpHandler ¶
func RestApiPutHttpHandler(rw http.ResponseWriter, rq *http.Request)
func RestApiPutResourceIdHttpHandler ¶
func RestApiPutResourceIdHttpHandler(resource, id string, rw http.ResponseWriter, rq *http.Request)
PUT /{resource}/{id}
func RotateInstanceSecretHttpHandler ¶
func RotateInstanceSecretHttpHandler(rw http.ResponseWriter, rq *http.Request)
Types ¶
Click to show internal directories.
Click to hide internal directories.