appAPIs

package
v0.0.0-...-62a8273 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateApp

func CreateApp(name string, image string, username string, password string,
	env []string, envFilePath string, port string, token string) error

To get all the apps information.

func DeleteAppByName

func DeleteAppByName(appName string, token string) error

To delete a particular app information.

func GetAppByName

func GetAppByName(appName string, token string) (map[string]interface{}, error)

To get a particular app information.

func GetSliceFromEnvFile

func GetSliceFromEnvFile(envFilePath string) ([]string, map[string]string, error)

Generate environemnt slice from env File. [{ "key":"ENV1", "value":"val1"}, { "key":"ENV2", "value":"val2"}]

func ListApps

func ListApps(token string) (map[string]interface{}, error)

To get all the apps information.

func Login

func Login(token string) error

Login app

Types

type AppAPI

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

Type definition for struct encapsulating app manager APIs.

type DeviceInfo

type DeviceInfo struct {
	DeviceCode              string `json:"device_code"`
	UserCode                string `json:"user_code"`
	Verification_URL        string `json:"verification_uri"`
	ExpiresIn               int    `json:"expires_in"`
	Interval                int    `json:"interval"`
	VerificationUrlComplete string `json:"verification_uri_complete"`
}

To store device information fetched during device authorization.

func GetDeviceCode

func GetDeviceCode() (*DeviceInfo, error)

type TokenInfo

type TokenInfo struct {
	AccessToken      string `json:"access_token"`
	RefreshToken     string `json:"refresh_token"`
	IdToken          string `json:"id_token"`
	Scope            string `json:"scope"`
	ExpiresIn        int    `json:"expires_in"`
	TokenType        string `json:"token_type"`
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description"`
}

To store token information fetched during retrive token.

func RequestToken

func RequestToken(deviceCode string) (*TokenInfo, error)

Request for an auth token

Jump to

Keyboard shortcuts

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