cloud

package
v0.17.0-alpha.31 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package cloud contains logic to support connecting to a steampipe cloud database

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCloudMetadata

func GetCloudMetadata(workspaceDatabaseString, token string) (*steampipeconfig.CloudMetadata, error)

func GetLoginToken added in v0.17.0

func GetLoginToken(id, code string) (string, error)

GetLoginToken uses the login id and code and retrieves an authentication token

func GetUserName added in v0.17.0

func GetUserName(token string) (string, error)

func GetUserWorkspaceHandles

func GetUserWorkspaceHandles(token string) ([]string, string, error)

GetUserWorkspaceHandles returns all user workspace handles for the user with the given token (this is expected to be 0 or 1 workspace handle)

func LoadToken added in v0.17.0

func LoadToken() (string, error)

func PublishSnapshot added in v0.17.0

func PublishSnapshot(snapshot *dashboardtypes.SteampipeSnapshot, share bool) (string, error)

func SaveToken added in v0.17.0

func SaveToken(token string) error

SaveToken writes the token to ~/.steampipe/internal/{cloud-host}.sptt

func WebLogin added in v0.17.0

func WebLogin() (string, error)

WebLogin POSTs to ${envBaseUrl}/api/latest/login/token to retrieve a login is it then opens the login webpage and returns th eid

Types

type Actor

type Actor struct {
	Id                string    `json:"id"`
	Handle            string    `json:"handle"`
	DisplayName       string    `json:"display_name"`
	AvatarUrl         string    `json:"avatar_url"`
	Status            string    `json:"status"`
	PreviewAccessMode string    `json:"preview_access_mode"`
	VersionId         float64   `json:"version_id"`
	CreatedAt         time.Time `json:"created_at"`
	UpdateAt          time.Time `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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