grafana

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKey

type APIKey struct {
	ID         int
	Name       string
	Key        string
	Expiration string
	Role       string
}

func (*APIKey) IsExpired

func (k *APIKey) IsExpired() (bool, error)

type Client

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

func NewClient

func NewClient(baseURL, apiKey string, opts ...ClientOpt) (*Client, error)

func (*Client) DeleteAPIKey

func (c *Client) DeleteAPIKey(ctx context.Context, id int) error

func (*Client) ListAPIKeys

func (c *Client) ListAPIKeys(ctx context.Context, includeExpired bool) (*ListAPIKeysOutput, error)

type ClientOpt

type ClientOpt func(*Client)

func WithUserAgent

func WithUserAgent(userAgent string) ClientOpt

type ListAPIKeysOutput

type ListAPIKeysOutput struct {
	Keys []*APIKey
}

func (*ListAPIKeysOutput) AddKey

func (l *ListAPIKeysOutput) AddKey(k *APIKey)

func (*ListAPIKeysOutput) DeleteByID

func (l *ListAPIKeysOutput) DeleteByID(id int)

func (*ListAPIKeysOutput) FindByID

func (l *ListAPIKeysOutput) FindByID(id int) *APIKey

Jump to

Keyboard shortcuts

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