api

package
v0.0.0-...-3b9963d Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgHelp

func ArgHelp(a []string, p []string)

func Start

func Start(gc *config.GlobalConfig)

func TestNFFrontend

func TestNFFrontend()

Types

type API

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

func (*API) Grafana

func (a *API) Grafana(w http.ResponseWriter, r *http.Request)

Grafana Add a datasource (based on config.yml config) then import the dashboards.

func (*API) Test

func (a *API) Test(w http.ResponseWriter, r *http.Request)

type Commands

type Commands struct {
	Paths      map[string]Path
	HelpString string
}

func (*Commands) Get

func (c *Commands) Get()

func (*Commands) Help

func (c *Commands) Help() string

func (*Commands) Parse

func (c *Commands) Parse()

type GenericPath

type GenericPath struct {
	Url        string
	Data       []byte
	HelpString string
	Body       []byte

	Args []string
}

HTTP Path do a call to the API to present their results

No POST data, just a generic HTTP get.

func (*GenericPath) Get

func (p *GenericPath) Get()

func (*GenericPath) Help

func (p *GenericPath) Help() string

type GrafanaPath

type GrafanaPath struct {
	Url        string
	Data       []byte
	HelpString string
	Body       []byte

	Args []string
}

Post constructs Grafana

func (*GrafanaPath) Get

func (p *GrafanaPath) Get()

func (*GrafanaPath) Help

func (p *GrafanaPath) Help() string

type JsonGrafana

type JsonGrafana struct {
	Server    string
	ApiKey    string
	Directory string
}

type JsonMessage

type JsonMessage struct {
	Msg string
}

type Path

type Path interface {
	Get()
	Help() string
}

Jump to

Keyboard shortcuts

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