cloud

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServer

func WithServer(server string) func(opts *Options)

func WithToken

func WithToken(token string) func(opts *Options)

Types

type Client

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

func NewClient

func NewClient(options ...func(*Options)) (*Client, error)

func (*Client) GetExtension

func (c *Client) GetExtension(extensionName string) (*Extension, error)

func (*Client) ListExtensionSnapshots

func (c *Client) ListExtensionSnapshots(extensionName string) ([]Snapshot, error)

func (*Client) ListExtensions

func (c *Client) ListExtensions() (*ListExtensionsResponse, error)

func (*Client) SubmitExtension

func (c *Client) SubmitExtension(snapshotID string) error

func (*Client) UploadExtension

func (c *Client) UploadExtension(extensionName, path string) (*UploadExtensionResponse, error)

func (*Client) UploadFiles

func (c *Client) UploadFiles(extensionName, extensionVersion, sourceDir string, paths ...string) (*UploadFilesResponse, error)

type Extension

type Extension struct {
	ExtensionID   string `json:"extension_id"`
	Name          string `json:"name"`
	Status        string `json:"status"`
	LatestVersion struct {
		Version string `json:"version"`
	} `json:"latest_version"`
}

type ListExtensionsResponse

type ListExtensionsResponse struct {
	Extensions []Extension `json:"extensions"`
}

type Options

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

type Snapshot

type Snapshot struct {
	SnapshotID string `json:"snapshot_id"`
	Metadata   struct {
		Version string `json:"version"`
	} `json:"metadata"`
	Status    string    `json:"status"`
	UpdatedAt time.Time `json:"updated_at"`
}

type UploadExtensionResponse

type UploadExtensionResponse struct {
	Snapshot struct {
		SnapshotID string `json:"snapshot_id"`
	} `json:"snapshot"`
}

type UploadFilesResponse

type UploadFilesResponse struct {
	Files []struct {
		URL string `json:"url"`
	} `json:"files"`
}

Jump to

Keyboard shortcuts

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