api

package
v0.0.0-...-56a9bdf Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientAPI

type ClientAPI struct{}

func (ClientAPI) Agents

func (capi ClientAPI) Agents(conf map[string]string, agentUUID string) ([]defs.AgentAdvert, error)

Agents will query the ToDD server for a list of currently registered agents, and will display a list of them to the user. Optionally, the user can provide a subargument containing the UUID of a registered agent, and this function will output more detailed information about that agent.

func (ClientAPI) Create

func (capi ClientAPI) Create(conf map[string]string, yamlFileName string) error

Create is responsible for pushing a ToDD object to the server for eventual storage in whatever database is being used It will send a ToddObject rendered as JSON to the "createobject" method of the ToDD API

func (ClientAPI) Delete

func (capi ClientAPI) Delete(conf map[string]string, objType, objLabel string) error

Delete will send a request to remove an existing ToDD Object

func (ClientAPI) DisplayAgents

func (capi ClientAPI) DisplayAgents(agents []defs.AgentAdvert, detail bool) error

DisplayAgents is responsible for displaying a set of Agents to the terminal

func (ClientAPI) Groups

func (capi ClientAPI) Groups(conf map[string]string) error

Groups will query ToDD for a map containing current agent-to-group mappings

func (ClientAPI) Objects

func (capi ClientAPI) Objects(conf map[string]string, objType string) error

Objects will query ToDD for all objects, with the type requested in the sub-arguments, and then display a list of those objects to the user.

func (ClientAPI) Run

func (capi ClientAPI) Run(conf map[string]string, testrunName string, displayReport, skipConfirm bool) error

Run is responsible for activating an existing testrun object

Jump to

Keyboard shortcuts

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