cloud

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductionCloudLink = "https://cloud.fermyon.com"
	TokenBaseDir        = "/home/runner/.config/fermyon"
)

Variables

This section is empty.

Functions

func GetAppNameFromSpinToml

func GetAppNameFromSpinToml() (string, error)

Types

type App

type App struct {
	ID          string    `json:"id"`
	Name        string    `json:"name"`
	StorageID   string    `json:"storageId"`
	Description string    `json:"description"`
	Channels    []Channel `json:"channels"`
}

type Channel

type Channel struct {
	ID                   string    `json:"id"`
	Name                 string    `json:"name"`
	ActiveRevisionNumber string    `json:"activeRevisionNumber"`
	Domain               string    `json:"domain"`
	Created              time.Time `json:"created"`
}

type Client

type Client struct {
	Base  string
	Token string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(base string) (*Client, error)

func (*Client) DeleteAppByName

func (c *Client) DeleteAppByName(appName string) error

func (*Client) Deploy

func (c *Client) Deploy(appname string) (*Metadata, error)

func (*Client) GetAllApps

func (c *Client) GetAllApps() ([]App, error)

type GetAppsResponse

type GetAppsResponse struct {
	Apps       []App `json:"items"`
	TotalItems int   `json:"totalItems"`
	PageIndex  int   `json:"pageIndex"`
	PageSize   int   `json:"pageSize"`
	IsLastPage bool  `json:"isLastPage"`
}

type Metadata

type Metadata struct {
	RawLogs   string  `json:"rawLogs"`
	AppName   string  `json:"appName"`
	Base      string  `json:"base"`
	AppRoutes []Route `json:"appRoutes,omitempty"`
	Version   string  `json:"version"`
}

func ExtractMetadataFromLogs

func ExtractMetadataFromLogs(appname, logs string) (*Metadata, error)

fetches app url from deploy logs

func (*Metadata) GetRouteWithName

func (m *Metadata) GetRouteWithName(name string) Route

type Route

type Route struct {
	Name     string `json:"name"`
	RouteURL string `json:"routeURL"`
	Wildcard bool   `json:"wildcard"`
}

type SpinToml

type SpinToml struct {
	Name string
}

type TokenInfo

type TokenInfo struct {
	Token string `json:"token"`
}

Jump to

Keyboard shortcuts

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