print

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActiveSnapLogDetails

func ActiveSnapLogDetails(response []byte, logID string, format string)

ActiveSnapLogDetails prints out the active log details response

func ActiveSnapLogsTable

func ActiveSnapLogsTable(response []byte)

ActiveSnapLogsTable prints out the active snap logs response as a table

func ActiveSnapStatusTable

func ActiveSnapStatusTable(response []byte)

ActiveSnapStatusTable prints out the active snap status response as a table

func ActiveSnapTable

func ActiveSnapTable(response []byte)

ActiveSnapTable prints the active snap response as a table

func ActiveSnapsTable

func ActiveSnapsTable(response []byte)

ActiveSnapsTable prints out the active snaps response as a table

func Config

func Config()

Config prints out the current configuration as a table

func ConnectionsTable

func ConnectionsTable(response []byte)

ConnectionsTable prints out the connected providers as a table

func CredentialsTable

func CredentialsTable(response []byte, connection string)

CredentialsTable prints out the credentials of a connection as a table

func JSON

func JSON(response []byte)

JSON pretty-prints a JSON response

func JSONString

func JSONString(response string)

JSONString pretty-prints a string that contains JSON

func RawResponse

func RawResponse(response []byte)

RawResponse prints out a raw response to the terminal

func SnapDefinitionYaml

func SnapDefinitionYaml(response []byte)

SnapDefinitionYaml processes the snap response and prints out the definition as YAML

func SnapStatusTable

func SnapStatusTable(response []byte)

SnapStatusTable prints out the snap status response as a table

func SnapsTable

func SnapsTable(response []byte)

SnapsTable prints out the snaps in the response as a table

func Status

func Status(response []byte)

Status extract the status and prints out the error message, if the status is an error

func ToolsTable

func ToolsTable(response []byte)

ToolsTable prints out the tools and their type and connection status as a table

Types

type ActiveSnap

type ActiveSnap struct {
	ActiveSnapID     string `json:"activeSnapId"`
	SnapID           string `json:"snapID"`
	State            string `json:"state"`
	Provider         string `json:"provider"`
	Activated        int64  `json:"activated"`
	ExecutionCounter int    `json:"executionCounter"`
	ErrorCounter     int    `json:"errorCounter"`
}

ActiveSnap defines the fields to unmarshal for an active snap

type ActiveSnapActionsLog

type ActiveSnapActionsLog struct {
	Provider string                     `json:"provider"`
	Action   string                     `json:"action"`
	State    string                     `json:"state"`
	Output   ActiveSnapActionsLogOutput `json:"output"`
}

ActiveSnapActionsLog defines the fields to unmarshal for action logs

type ActiveSnapActionsLogOutput

type ActiveSnapActionsLogOutput struct {
	Status  string                 `json:"status"`
	Message string                 `json:"message"`
	Data    map[string]interface{} `json:"data"`
}

ActiveSnapActionsLogOutput defines the fields to unmarshal for action logs

type ActiveSnapLog

type ActiveSnapLog struct {
	LogID        int64                  `json:"timestamp"`
	ActiveSnapID string                 `json:"activeSnapId"`
	SnapID       string                 `json:"snapID"`
	State        string                 `json:"state"`
	Trigger      string                 `json:"trigger"`
	Event        string                 `json:"event"`
	Actions      []ActiveSnapActionsLog `json:"actions"`
}

ActiveSnapLog defines the fields to unmarshal for an active snap's logs

type ActiveSnapLogsResponse

type ActiveSnapLogsResponse struct {
	Status  string          `json:"status"`
	Message string          `json:"message"`
	Data    []ActiveSnapLog `json:"data"`
}

ActiveSnapLogsResponse defines the fields to unmarshal from getting all logs for an active snap

type ActiveSnapResponse

type ActiveSnapResponse struct {
	Status  string     `json:"status"`
	Message string     `json:"message"`
	Data    ActiveSnap `json:"data"`
}

ActiveSnapResponse defines the fields to unmarshal from a delete/pause/resume operation

type ActiveSnapsResponse

type ActiveSnapsResponse struct {
	Status  string       `json:"status"`
	Message string       `json:"message"`
	Data    []ActiveSnap `json:"data"`
}

ActiveSnapsResponse defines the fields to unmarshal from getting all active snaps

type CredentialsResponse

type CredentialsResponse struct {
	Status  string              `json:"status"`
	Message string              `json:"message"`
	Data    []map[string]string `json:"data"`
}

CredentialsResponse defines the fields to unmarshal from a get credential-sets operation

type Snap

type Snap struct {
	SnapID      string `json:"snapId"`
	Description string `json:"description"`
	Provider    string `json:"provider"`
	Private     bool   `json:"private"`
}

Snap defines the fields to unmarshal for a snap

type SnapDefinition

type SnapDefinition struct {
	Text string `json:"text"`
}

SnapDefinition defines the text field to unmarshal for a snap's YAML definition

type SnapDefinitionResponse

type SnapDefinitionResponse struct {
	Status  string         `json:"status"`
	Message string         `json:"message"`
	Data    SnapDefinition `json:"data"`
}

SnapDefinitionResponse defines the fields to unmarshal for a SnapDefinition response

type SnapResponse

type SnapResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    Snap   `json:"data"`
}

SnapResponse defines the fields to unmarshal from a create/fork/publish/unpublish operation

type SnapsResponse

type SnapsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    []Snap `json:"data"`
}

SnapsResponse defines the fields to unmarshal from a gallery list / snaps list operation

type Tool

type Tool struct {
	Provider  string `json:"provider"`
	Type      string `json:"type"`
	Connected string `json:"connected"`
}

Tool defines the fields to unmarshal for a tool

type ToolsResponse

type ToolsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    []Tool `json:"data"`
}

ToolsResponse defines the fields to unmarshal from a get tools operation

Jump to

Keyboard shortcuts

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