compose

package
v0.0.0-...-6a85265 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivateCompose

func ActivateCompose(composeFilePath, token, orgID string) error

func AddComposeFile

func AddComposeFile()

func DownloadFile

func DownloadFile(url, filePath string) error

DownloadFile downloads a file from a URL and saves it to a local path.

func GetProjectName

func GetProjectName(filePath string) string

getProjectName takes a file path and returns the final directory name

func ReconcileCompose

func ReconcileCompose(osInfo OsInfo, enableMonitoring string) error

func SetCrontabCompose

func SetCrontabCompose() error

Types

type AppAPIInfo

type AppAPIInfo struct {
	AppUUID string `json:"app_uuid,omitempty"`
	OsUUID  string `json:"os_uuid,omitempty"`
	EmailID string `json:"email_id,omitempty"`
}

AppAPIInfo contains basic information about the application API.

type AppInfo

type AppInfo struct {
	ComposeFile    string           `json:"compose_file,omitempty"`
	DockerInstance []dockerInstance `json:"container_info,omitempty"`
}

type AppRequest

type AppRequest struct {
	AppAPIInfo AppAPIInfo `json:"app_api_info"`
	AppInfo    AppInfo    `json:"app_info"`
}

type ContainerInfo

type ContainerInfo struct {
	Name       string      `json:"names,omitempty"`
	Status     string      `json:"status,omitempty"`
	AppVersion string      `json:"app_version,omitempty"`
	Image      string      `json:"image,omitempty"`
	ImageID    string      `json:"image_id,omitempty"`
	Ports      interface{} `json:"ports,omitempty"`
	Size       int64       `json:"size,omitempty"`
	Networks   string      `json:"networks,omitempty"`
	Mounts     string      `json:"mounts,omitempty"`
	DockerID   string      `json:"docker_id,omitempty"`
}

type OsInfo

type OsInfo struct {
	OsUUID               string `yaml:"osUUID,omitempty"`
	EmailID              string `yaml:"emailId,omitempty"`
	ClusterRegisteration bool   `yaml:"clusterRegisteration,omitempty"`
	OrgID                string `yaml:"orgID,omitempty"`
	Token                string `yaml:"token,omitempty"`
	ProjectName          string `yaml:"projectName,omitempty"`
	HosstedApiUrl        string `yaml:"hosstedAPIUrl,omitempty"`
	MimirUsername        string `yaml:"MIMIR_USERNAME,omitempty"`
	MimirPassword        string `yaml:"MIMIR_PASSWORD,omitempty"`
	MimirUrl             string `yaml:"MIMIR_URL,omitempty"`
	LokiUsername         string `yaml:"LOKI_USERNAME,omitempty"`
	LokiPassword         string `yaml:"LOKI_PASSWORD,omitempty"`
	LokiUrl              string `yaml:"LOKI_URL,omitempty"`
}

func GetClusterInfo

func GetClusterInfo() (OsInfo, error)

Jump to

Keyboard shortcuts

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