stack

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientConfig client.Config

ClientConfig holds the configuration for the HTTP Client.

Functions

This section is empty.

Types

type ListItem

type ListItem struct {
	Name                     string `json:"name"`
	Slug                     string `json:"slug"`
	GrafanaURL               string `json:"url"`
	PrometheusID             int    `json:"hmInstancePromId"`
	PrometheusURL            string `json:"hmInstancePromUrl"`
	GraphiteID               int    `json:"hmInstanceGraphiteId"`
	GraphiteURL              string `json:"hmInstanceGraphiteUrl"`
	LogsID                   int    `json:"hlInstanceId"`
	LogsURL                  string `json:"hlInstanceUrl"`
	TracesID                 int    `json:"htInstanceId"`
	TracesURL                string `json:"htInstanceUrl"`
	AlertManagerID           int    `json:"amInstanceId"`
	AlertManagerGeneratorURL string `json:"amInstanceGeneratorUrl"`
}

ListItem described properties of individual List item returned by the API.

type Stack

type Stack struct {
	// URL parameters
	OrgSlug   string
	StackSlug string
	Name      string

	// Relative path to the api-keys endpoint
	Endpoint string

	// HTTP client configuration
	ClientConfig client.Config
}

Stack holds information about the stack.

func New

func New() *Stack

New returns new Stack.

func (*Stack) Create

func (s *Stack) Create() (*ListItem, string, error)

Create creates a new Stack and returns values of the newly created Stack and the raw API response.

func (*Stack) Delete

func (s *Stack) Delete() (string, int, error)

Delete deletes the Stack.

func (*Stack) List

func (s *Stack) List() (*[]ListItem, string, int, error)

List returns the list of API keys and raw API response.

func (*Stack) SetName

func (s *Stack) SetName(value string) error

SetName makes sure the Name is not an empty string.

func (*Stack) SetOrgSlug

func (s *Stack) SetOrgSlug(value string) error

SetOrgSlug makes sure the Org Slug is not an empty string.

func (*Stack) SetStackSlug

func (s *Stack) SetStackSlug(value string) error

SetStackSlug makes sure the Stack Slug is not an empty string.

func (*Stack) SetToken

func (s *Stack) SetToken(value string) error

SetToken sets the authorization token used to communicate with the API.

Jump to

Keyboard shortcuts

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