constants

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: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Time to wait to get app deployed.
	APPDEPLOYINTERVAL = 5

	// Token poll interval
	TOKENPOLLINTERVAL = 5

	// Fetch secure app endpoint.
	SECUREENDPOINT = 2

	// Maximum app deployed status code.
	MaxAppDeployStatusCode = "429"

	// HTTPS string
	HTTPS = "https"

	CLIVersion          = "appctl version: v1.3"
	UTCClusterTimeStamp = "2006-01-02T15:04:05Z"
)

Variables

View Source
var (
	APPURL        string
	TABLEFORMAT   = "NAME | URL | IMAGE | READY | AGE | REASON"
	DOMAIN        string
	CLIENTID      string
	DEVICECODEURL string

	DEVICEREQUESTPAYLOAD string
	// Grant type is urlencoded
	GrantType string
)

API Variables.

View Source
var (
	HOMEDIR, _ = os.UserHomeDir()
	//Config Dir for pf9
	CONFIGDIR      = HOMEDIR + "/.config/pf9"
	CONFIGFILE     = "config.json"
	CONFIGFILEPATH = CONFIGDIR + "/" + CONFIGFILE
)

Config directory

View Source
var (
	// Valid App Name to deploy.
	ValidAppNameRegex = fmt.Sprintf(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`)

	// Regex for matching the environment variables in .env file
	RegexEnv = fmt.Sprintf(`[[:alnum:]]+=[[:alnum:]]+`)
)

Regex for valid app name

View Source
var (
	ConnectionRefused      = "connection refused"
	NetworkUnReachable     = "Network is unreachable"
	InternetConnectivity   = "Please check your internet connectivity and try again."
	BackendServerDown      = "Backend server is down. Please try later!!"
	AccessForbidden        = "Access Forbidden."
	MaxAppDeployLimit      = "Maximum apps deploy limit reached!!"
	InvalidImage           = "Unable to fetch image"
	MaxAppDeployLimitError = "Maximum apps deploy limit reached!!"
	FailedToParseImage     = "Failed to parse image"
	InternalServerError    = "Backend server error."
	BadRequest             = "Bad request."
)

Error Messages

Functions

func RegexValidate

func RegexValidate(name string, regex string) bool

Types

type ListAppInfo

type ListAppInfo struct {
	Name         string
	URL          string
	Image        string
	Port         string
	ReadyStatus  string
	CreationTime string
	Reason       string
}

Jump to

Keyboard shortcuts

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