Documentation ¶
Index ¶
- Variables
- func AddImageToBalPath(cellImage *CellImage) error
- func CleanOrCreateDir(dirPath string) error
- func ConvertStringToTime(timeString string) time.Time
- func CopyDir(src string, dst string) error
- func CopyFile(src, dst string) error
- func CreateDir(dirPath string) error
- func DownloadFile(filepath string, url string) (*http.Response, error)
- func DownloadFromS3Bucket(bucket, item, path string)
- func ExecuteCommand(cmd *exec.Cmd, errorMessage string) error
- func ExitWithErrorMessage(message string, err error)
- func ExtractTarGzFile(extractTo, archive_name string) error
- func FileExists(path string) (bool, error)
- func FileUploadRequest(uri string, params map[string]string, paramName, path string, secure bool) (*http.Request, error)
- func FindInDirectory(directory, suffix string) []string
- func GetDuration(startTime time.Time) string
- func GetFileSize(path string) (int64, error)
- func GetSourceFileName(filePath string) (string, error)
- func GetSubDirectoryNames(path string) ([]string, error)
- func PrintSuccessMessage(message string)
- func PrintWhatsNextMessage(action string, cmd string)
- func RecursiveZip(files []string, folders []string, destinationPath string) error
- func RenameFile(oldName, newName string) error
- func ReplaceFile(fileToBeReplaced, fileToReplace string) error
- func ReplaceInFile(srcFile, oldString, newString string, replaceCount int) error
- func RequestCredentials() (string, string, error)
- func RunMethodExists(sourceFile string) (bool, error)
- func Trim(stream string) string
- func Unzip(zipFolderName string, destinationFolderName string) error
- func UserHomeDir() string
- func ValidateImageTag(imageTag string) error
- func ValidateImageTagWithRegistry(imageTag string) error
- func ZipFiles(filename string, files []string) error
- type Cell
- type CellImage
- type CellMetaData
- type CellPods
- type CellStatus
- type Gateway
- type GatewayDefinition
- type GatewayHttpApi
- type GatewaySpec
- type Gcp
- type GcpCompute
- type GcpCore
- type Pod
- type PodCondition
- type PodMetaData
- type PodStatus
- type Service
- type ServiceItem
- type ServiceMetaData
- type ServicePort
- type ServiceSpec
- type Spinner
Constants ¶
This section is empty.
Variables ¶
var Bold = color.New(color.Bold).SprintFunc()
var Faint = color.New(color.Faint).SprintFunc()
var Green = color.New(color.FgGreen).SprintfFunc()
Functions ¶
func AddImageToBalPath ¶
AddImageToBalPath extracts the cell image in a temporary location and copies the relevant ballerina files to the ballerina repo directory. This expects the BALLERINA_HOME environment variable to be set in th developer machine.
func CleanOrCreateDir ¶
func ConvertStringToTime ¶
func DownloadFromS3Bucket ¶
func DownloadFromS3Bucket(bucket, item, path string)
func ExitWithErrorMessage ¶
ExitWithErrorMessage prints an error message and exits the command
func ExtractTarGzFile ¶
func FileExists ¶
func FileUploadRequest ¶
func FileUploadRequest(uri string, params map[string]string, paramName, path string, secure bool) (*http.Request, error)
Creates a new file upload http request with optional extra params
func FindInDirectory ¶
func GetDuration ¶
func GetFileSize ¶
func GetSourceFileName ¶
func GetSubDirectoryNames ¶
func PrintSuccessMessage ¶
func PrintSuccessMessage(message string)
PrintSuccessMessage prints the standard command success message
func PrintWhatsNextMessage ¶
func RecursiveZip ¶
func RenameFile ¶
func ReplaceFile ¶
func ReplaceInFile ¶
func RequestCredentials ¶
RequestCredentials requests the credentials form the user and returns them
func RunMethodExists ¶
func UserHomeDir ¶
func UserHomeDir() string
func ValidateImageTag ¶
ValidateImageTag validates the image tag (without the registry in it). This checks the version to be in the format of semantic versioning
func ValidateImageTagWithRegistry ¶
ValidateImageTag validates the image tag (with the registry in it). The registry is an option element in this validation. This checks the version to be in the format of semantic versioning
Types ¶
type Cell ¶
type Cell struct { CellMetaData CellMetaData `json:"metadata"` CellStatus CellStatus `json:"status"` }
type CellImage ¶
func ParseImageTag ¶
ParseImageTag parses the given image name string and returns a CellImage struct with the relevant information.
type CellMetaData ¶
type CellMetaData struct {
CreationTimestamp string `json:"creationTimestamp"`
}
type CellStatus ¶
type CellStatus struct {
Status string `json:"status"`
}
type Gateway ¶
type Gateway struct {
GatewaySpec GatewaySpec `json:"spec"`
}
type GatewayDefinition ¶
type GatewayHttpApi ¶
type GatewayHttpApi struct { Backend string `json:"backend"` Context string `json:"context"` Definitions []GatewayDefinition `json:"definitions"` }
type GatewaySpec ¶
type GatewaySpec struct {
HttpApis []GatewayHttpApi `json:"http"`
}
type Gcp ¶
type Gcp struct { Compute GcpCompute `json:"compute"` Core GcpCore `json:"core"` }
type GcpCompute ¶
type Pod ¶
type Pod struct { MetaData PodMetaData `json:"metadata"` PodStatus PodStatus `json:"status"` }
type PodCondition ¶
type PodMetaData ¶
type PodMetaData struct {
Name string `json:"name"`
}
type PodStatus ¶
type PodStatus struct { Phase string `json:"phase"` StartTime string `json:"startTime"` Conditions []PodCondition `json:"conditions"` }
type Service ¶
type Service struct {
Items []ServiceItem `json:"items"`
}
type ServiceItem ¶
type ServiceItem struct { Metadata ServiceMetaData `json:"metadata"` Spec ServiceSpec `json:"spec"` }
type ServiceMetaData ¶
type ServiceMetaData struct {
Name string `json:"name"`
}
type ServicePort ¶
type ServicePort struct {
Port int `json:"port"`
}
type ServiceSpec ¶
type ServiceSpec struct {
Ports []ServicePort `json:"ports"`
}
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
func StartNewSpinner ¶
StartNewSpinner starts a new spinner with the provided message
func (*Spinner) SetNewAction ¶
SetNewAction sets the current action of a spinner