Documentation ¶
Index ¶
- Constants
- func CreateDowntimePayload(message, author string, downConfig Downtime) (string, error)
- func CreateHostPayload(server, path, role string) (string, error)
- func CreateRequest(command, url, payload string, verbose, skipTls bool, config Configuration)
- func ExecuteRequest(client *http.Client, req *http.Request)
- func SendCommand(command, server, objecttype string, config Configuration, payload string, ...)
- func ShowConfig(config Configuration)
- type Configuration
- type Downtime
- type PayloadObject
Constants ¶
View Source
const DowntimeEndpoint string = "/v1/objects/downtimes"
View Source
const HostEndpoint string = "/v1/objects/hosts"
View Source
const RemoveDowntimeEndpoint string = "/v1/actions/remove-downtime"
View Source
const ScheduleDowntimeEndpoint string = "/v1/actions/schedule-downtime"
View Source
const ServiceEndpoint string = "/v1/objects/services"
Variables ¶
This section is empty.
Functions ¶
func CreateDowntimePayload ¶
func CreateHostPayload ¶
func CreateRequest ¶
func CreateRequest(command, url, payload string, verbose, skipTls bool, config Configuration)
func SendCommand ¶
func SendCommand(command, server, objecttype string, config Configuration, payload string, skipTls, verbose, dryrun bool)
func ShowConfig ¶
func ShowConfig(config Configuration)
Types ¶
type Configuration ¶
type Configuration struct { Access string `yaml:"access"` Api string `yaml:"api"` Author string `yaml:"author"` Port string Host string Name string User string Password string }
func BuildConfig ¶
func BuildConfig(apiFlag, userFlag, passwordFlag, authorFlag string, verbose, save bool) Configuration
type Downtime ¶
func BuildDowntime ¶
type PayloadObject ¶
Click to show internal directories.
Click to hide internal directories.