common

package
v0.4.1-alpha2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Localhost = "127.0.0.1"

	AppManagementVersion     = "0.4.1"
	AppManagementServiceName = "app-management"

	ContainerLabelV1AppStoreID = "io.casaos.v1.app.store.id"
)

Variables

View Source
var (
	// common properties
	PropertyTypeAppID = message_bus.PropertyType{
		Name:        fmt.Sprintf("%s:app:id", AppManagementServiceName),
		Description: utils.Ptr("id of the app which could be a container id, a snap id or the id of any other forms of app"),
		Example:     utils.Ptr("855084f79fc89bea4de5111c69621b3329ecf0a1106863a7a83bbdef01d33b9e (this is a container id)"),
	}

	PropertyTypeAppName = message_bus.PropertyType{
		Name:        fmt.Sprintf("%s:app:name", AppManagementServiceName),
		Description: utils.Ptr("name of the app which could be a container image name including version, a snap name or the name of any other forms of app"),
		Example:     utils.Ptr("hello-world:latest (this is the name of a container image"),
	}

	PropertyTypeMessage = message_bus.PropertyType{
		Name:        fmt.Sprintf("%s:message", AppManagementServiceName),
		Description: utils.Ptr("message at different levels, typically for error"),
	}

	// event types for container app
	EventTypeContainerAppInstalling = message_bus.EventType{
		SourceID: AppManagementServiceName,
		Name:     fmt.Sprintf("%s:container:installing", AppManagementServiceName),
		PropertyTypeList: []message_bus.PropertyType{
			PropertyTypeAppName,
		},
	}

	EventTypeContainerAppInstalled = message_bus.EventType{
		SourceID: AppManagementServiceName,
		Name:     fmt.Sprintf("%s:container:installed", AppManagementServiceName),
		PropertyTypeList: []message_bus.PropertyType{
			PropertyTypeAppID,
			PropertyTypeAppName,
		},
	}

	EventTypeContainerAppInstallFailed = message_bus.EventType{
		SourceID: AppManagementServiceName,
		Name:     fmt.Sprintf("%s:container:install-failed", AppManagementServiceName),
		PropertyTypeList: []message_bus.PropertyType{
			PropertyTypeAppName,
			PropertyTypeMessage,
		},
	}

	EventTypeContainerAppUninstalling = message_bus.EventType{
		SourceID: AppManagementServiceName,
		Name:     fmt.Sprintf("%s:container:uninstalling", AppManagementServiceName),
		PropertyTypeList: []message_bus.PropertyType{
			PropertyTypeAppID,
			PropertyTypeAppName,
		},
	}

	EventTypeContainerAppUninstalled = message_bus.EventType{
		SourceID: AppManagementServiceName,
		Name:     fmt.Sprintf("%s:container:uninstalled", AppManagementServiceName),
		PropertyTypeList: []message_bus.PropertyType{
			PropertyTypeAppID,
			PropertyTypeAppName,
		},
	}

	EventTypeContainerAppUninstallFailed = message_bus.EventType{
		SourceID: AppManagementServiceName,
		Name:     fmt.Sprintf("%s:container:uninstall-failed", AppManagementServiceName),
		PropertyTypeList: []message_bus.PropertyType{
			PropertyTypeAppID,
			PropertyTypeAppName,
			PropertyTypeMessage,
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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