restapi

package
v0.0.0-...-f67effe Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ContextUser contextkey = iota

Variables

View Source
var (
	ErrorLoginIncorrect = errors.New("Incorrect login details")
	ErrorAPI            = errors.New("could not generate api")
)
View Source
var (
	ErrorNotAuthorized = errors.New("Not authorized")
)

Functions

func AddApiKeys

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

func CreateScript

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

func CreateUser

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

func CreateWebsite

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

func DeleteAgent

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

func DeleteScript

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

func DeleteUser

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

func DeleteWebsite

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

func GetAgent

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

func GetAgentRouter

func GetAgentRouter(b *broker.Broker) *mux.Router

func GetAgentStatus

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

{offset}/{noentries}

func GetAgents

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

func GetAlerts

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

func GetApiKeys

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

func GetMainRouter

func GetMainRouter(b *broker.Broker) *mux.Router

Main Router

func GetScript

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

func GetScripts

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

func GetUser

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

func GetUsers

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

func GetWebsite

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

func GetWebsites

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

func Logger

func Logger(h http.Handler) http.Handler

func MiddlewareJson

func MiddlewareJson(next http.Handler) http.Handler

func MiddlewareSession

func MiddlewareSession(next http.Handler) http.Handler

MiddlewareSession checks the session for request and tags username to request context

func RegisterAgent

func RegisterAgent(h http.ResponseWriter, r *http.Request)

func RemoveApiKeys

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

func RunScript

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

func SignIn

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

func UpdateSystemInfo

func UpdateSystemInfo(h http.ResponseWriter, r *http.Request)

func UpdateUser

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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