cmdb

package
v3.0.5-2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Endpoints = api.Endpoints{

	api.Endpoint{
		Name:        `CMDB Authenticator`,
		Path:        `/v2/cmdb/authenticate/{host}`,
		Method:      `GET`,
		HandlerFunc: SetAuthToken,
		Protected:   false,
	},

	api.Endpoint{
		Name:        `CMDB Event Logger`,
		Path:        `/v2/cmdb/event/create/{host}`,
		Method:      `POST`,
		HandlerFunc: CreateEvent,
		Protected:   false,
	},
}

Endpoints is a collection of URL path-to-handler-function mappings.

Functions

func CreateEvent

func CreateEvent(w http.ResponseWriter, r *http.Request)

CreateEvent writes an event to the datastore event log.

func Init

func Init(as service.AuthSvc, ls service.LoggerSvc)

Init initializes the package variables required for operation.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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