Documentation
¶
Overview ¶
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Package v1 provides the API for the webserver.
Index ¶
Constants ¶
const ( ActionAll = "ARGUS_ALL" ActionSkip = "ARGUS_SKIP" ActionFailed = "ARGUS_FAILED" )
Action codes.
Variables ¶
This section is empty.
Functions ¶
func ConstantTimeCompare ¶
ConstantTimeCompare returns whether the slices x and y have equal contents. The time taken depends on the length of the slices, and remains independent of the contents.
Types ¶
type API ¶
type API struct {
Config *config.Config
BaseRouter *mux.Router
Router *mux.Router
RoutePrefix string
}
API holds the configuration and routing information.
func (*API) DisableRoutes ¶
func (api *API) DisableRoutes()
DisableRoutes disables HTTP API routes marked as disabled in the config.
func (*API) SetupRoutesAPI ¶
func (api *API) SetupRoutesAPI()
SetupRoutesAPI will set up the HTTP API routes.
func (*API) SetupRoutesFavicon ¶
func (api *API) SetupRoutesFavicon()
SetupRoutesFavicon adds any favicon route overrides.
func (*API) SetupRoutesNodeJS ¶
func (api *API) SetupRoutesNodeJS()
SetupRoutesNodeJS will set up the HTTP routes to the Node.js files.
type AnnounceMSG ¶
AnnounceMSG is minimal JSON to validate the incoming message.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client connects the websocket and the hub.
type CountsResponse ¶
type CountsResponse struct {
ServiceCount int `json:"service_count"`
ServiceCountActive int `json:"service_count_active"`
ServiceCountInactive int `json:"service_count_inactive"`
UpdatesCurrentAvailable int `json:"updates_available"`
UpdatesCurrentSkipped int `json:"updates_skipped"`
UpdateDetails []UpdateDetails `json:"update_details,omitempty"`
}
type Hub ¶
type Hub struct {
// Inbound messages from the clients.
Broadcast chan []byte
// contains filtered or unexported fields
}
Hub maintains the set of active clients and broadcasts messages to those clients.
type RunActionsPayload ¶
type RunActionsPayload struct {
Target string `json:"target"`
}
RunActionsPayload holds the target actions to run for a Service.
type ServiceOrderAPI ¶
type ServiceOrderAPI struct {
Order []string `json:"order"`
}
ServiceOrderAPI is the API response for the service order.
type UpdateDetails ¶
type UpdateDetails struct {
ServiceName string `json:"service_name"`
DeployedVersion string `json:"deployed_version"`
LatestVersion string `json:"latest_version"`
LastChecked string `json:"last_checked"`
AutoApprove bool `json:"auto_approve"`
Approved bool `json:"approved"`
Skipped bool `json:"skipped"`
}