Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Routes = api.Routes{ api.Route{ Name: `CMDB Authenticator`, Path: `/v2/cmdb/authenticate/{host}`, Method: `GET`, HandlerFunc: SetAuthToken, Protected: false, }, api.Route{ Name: `CMDB Event Logger`, Path: `/v2/cmdb/event/create/{host}`, Method: `POST`, HandlerFunc: CreateEvent, Protected: false, }, api.Route{ Name: `CMDB Health Check`, Path: `/v2/cmdb/health/check`, Method: `GET`, HandlerFunc: CheckHealth, Protected: false, }, }
Routes is a collection of HTTP verb/path-to-handler-function mappings.
Functions ¶
func CheckHealth ¶
func CheckHealth(w http.ResponseWriter, r *http.Request)
CheckHealth returns the health of the server.
func CreateEvent ¶
func CreateEvent(w http.ResponseWriter, r *http.Request)
CreateEvent writes an event to the datastore event log.
func SetAuthToken ¶
func SetAuthToken(w http.ResponseWriter, r *http.Request)
SetauthToken authenticates client using basic authentication and issues a token for API authentication if successful.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.