Documentation
¶
Index ¶
- func ActiveSnapLogDetails(response []byte, logID string, format string)
- func ActiveSnapLogsTable(response []byte)
- func ActiveSnapStatusTable(response []byte)
- func ActiveSnapTable(response []byte)
- func ActiveSnapsTable(response []byte)
- func Config()
- func ConnectionsTable(response []byte)
- func CredentialsTable(response []byte, connection string)
- func JSON(response []byte)
- func JSONString(response string)
- func RawResponse(response []byte)
- func SnapDefinitionYaml(response []byte)
- func SnapStatusTable(response []byte)
- func SnapsTable(response []byte)
- func Status(response []byte)
- func ToolsTable(response []byte)
- type ActiveSnap
- type ActiveSnapActionsLog
- type ActiveSnapActionsLogOutput
- type ActiveSnapLog
- type ActiveSnapLogsResponse
- type ActiveSnapResponse
- type ActiveSnapsResponse
- type CredentialsResponse
- type Snap
- type SnapDefinition
- type SnapDefinitionResponse
- type SnapResponse
- type SnapsResponse
- type Tool
- type ToolsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActiveSnapLogDetails ¶
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 ConnectionsTable ¶
func ConnectionsTable(response []byte)
ConnectionsTable prints out the connected providers as a table
func CredentialsTable ¶
CredentialsTable prints out the credentials of a connection as a table
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 { Stdout string `json:"stdout"` Stderr string `json:"stderr"` Error string `json:"error"` }
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