client

package
v0.0.0-...-483b314 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	// contains filtered or unexported fields
}

func NewAPIClient

func NewAPIClient(server, username, apiKey string) *APIClient

func (*APIClient) ApplyAlertChannel

func (c *APIClient) ApplyAlertChannel(fileLocation string, outputformat string) error

func (*APIClient) ApplyMonitor

func (c *APIClient) ApplyMonitor(fileLocation string, outputformat string) error

func (*APIClient) ApplySink

func (c *APIClient) ApplySink(fileLocation string, outputformat string) error

func (*APIClient) ChangeUserRole

func (c *APIClient) ChangeUserRole(username string, newRole string, outputformat string) error

func (*APIClient) CreateSecret

func (c *APIClient) CreateSecret(name string, value string) error

func (*APIClient) CreateUser

func (c *APIClient) CreateUser(username string, role string, outputformat string) error

func (*APIClient) DeleteAlertChannel

func (c *APIClient) DeleteAlertChannel(name string, outputformat string) error

func (*APIClient) DeleteMonitor

func (c *APIClient) DeleteMonitor(name string, outputformat string) error

func (*APIClient) DeleteSecret

func (c *APIClient) DeleteSecret(name string, output string) error

func (*APIClient) DeleteSink

func (c *APIClient) DeleteSink(name string, outputformat string) error

func (*APIClient) DeleteUser

func (c *APIClient) DeleteUser(username string, outputformat string) error

func (*APIClient) EditAlertChannel

func (c *APIClient) EditAlertChannel(name string) error

func (*APIClient) EditMonitor

func (c *APIClient) EditMonitor(name string) error

func (*APIClient) EditSecret

func (c *APIClient) EditSecret(name string, newValue string) error

func (*APIClient) EditSink

func (c *APIClient) EditSink(name string) error

func (*APIClient) GetAlertChannel

func (c *APIClient) GetAlertChannel(name string, outputformat string) error

func (*APIClient) GetMonitor

func (c *APIClient) GetMonitor(name string, outputformat string) error

func (*APIClient) GetSecret

func (c *APIClient) GetSecret(name string, output string) error

func (*APIClient) GetSink

func (c *APIClient) GetSink(name string, outputformat string) error

func (*APIClient) GetUser

func (c *APIClient) GetUser(username string, outputformat string) error

func (*APIClient) ListAlertChannels

func (c *APIClient) ListAlertChannels(outputFormat string) error

func (*APIClient) ListMonitors

func (c *APIClient) ListMonitors(options ListMonitorOptions, outputFormat string) error

func (*APIClient) ListSecrets

func (c *APIClient) ListSecrets(output string) error

func (*APIClient) ListSinks

func (c *APIClient) ListSinks(outputFormat string) error

func (*APIClient) ListUsers

func (c *APIClient) ListUsers(outputFormat string) error

func (*APIClient) LoadAlertChannelCLICommands

func (c *APIClient) LoadAlertChannelCLICommands() *cli.Command

func (*APIClient) LoadMonitorCLICommands

func (c *APIClient) LoadMonitorCLICommands() *cli.Command

func (*APIClient) LoadSecretCLICommands

func (c *APIClient) LoadSecretCLICommands() *cli.Command

func (*APIClient) LoadSinkCLICommands

func (c *APIClient) LoadSinkCLICommands() *cli.Command

func (*APIClient) LoadUserCLICommands

func (c *APIClient) LoadUserCLICommands() *cli.Command

func (*APIClient) PauseMonitor

func (c *APIClient) PauseMonitor(name string, outputformat string) error

func (*APIClient) SilenceMonitor

func (c *APIClient) SilenceMonitor(name string, outputformat string) error

func (*APIClient) UnPauseMonitor

func (c *APIClient) UnPauseMonitor(name string, outputformat string) error

func (*APIClient) UnSilenceMonitor

func (c *APIClient) UnSilenceMonitor(name string, outputformat string) error

type Config

type Config struct {
	ServerURL string `json:"server_url"`
	Username  string `json:"username"`
	APIKey    string `json:"api_key"`
}

func ReadConfig

func ReadConfig() (*Config, error)

type ListMonitorOptions

type ListMonitorOptions struct {
	Limit    *int
	Offset   *int
	Type     *string
	Status   *string
	Tag      *string
	Silenced *bool
}

Jump to

Keyboard shortcuts

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