Help us shape the future of Go! Take the 2026 Go Developer Survey

common

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Localhost = "127.0.0.1"

	InstallerVersion     = "0.4.5"
	InstallerServiceName = "installer"

	ReleaseYAMLFileName   = "release.yaml"
	MigrationListFileName = "migration.list"
	ChecksumsTXTFileName  = "checksums.txt"

	LegacyWithoutVersion = "LEGACY_WITHOUT_VERSION"

	MirrorPlaceHolder = "${MIRROR}"
	ArchPlaceHolder   = "${ARCH}"

	MainTag = "dev-test"
)

Variables

View Source
var (
	EventTypeCheckUpdateBegin = message_bus.EventType{
		SourceID:         InstallerServiceName,
		Name:             "installer:check-update-begin",
		PropertyTypeList: []message_bus.PropertyType{},
	}
	EventTypeCheckUpdateEnd = message_bus.EventType{
		SourceID:         InstallerServiceName,
		Name:             "installer:check-update-end",
		PropertyTypeList: []message_bus.PropertyType{},
	}
	EventTypeCheckUpdateError = message_bus.EventType{
		SourceID: InstallerServiceName,
		Name:     "installer:check-update-error",
		PropertyTypeList: []message_bus.PropertyType{
			PropertyTypeAppName,
			PropertyTypeMessage,
		},
	}

	EventTypeDownloadUpdateBegin = message_bus.EventType{
		SourceID:         InstallerServiceName,
		Name:             "installer:download-update-begin",
		PropertyTypeList: []message_bus.PropertyType{},
	}
	EventTypeDownloadUpdateEnd = message_bus.EventType{
		SourceID:         InstallerServiceName,
		Name:             "installer:download-update-end",
		PropertyTypeList: []message_bus.PropertyType{},
	}
	EventTypeDownloadUpdateError = message_bus.EventType{
		SourceID: InstallerServiceName,
		Name:     "installer:download-update-error",
		PropertyTypeList: []message_bus.PropertyType{
			PropertyTypeAppName,
			PropertyTypeMessage,
		},
	}

	EventTypeInstallUpdateBegin = message_bus.EventType{
		SourceID:         InstallerServiceName,
		Name:             "installer:install-update-begin",
		PropertyTypeList: []message_bus.PropertyType{},
	}
	EventTypeInstallUpdateEnd = message_bus.EventType{
		SourceID:         InstallerServiceName,
		Name:             "installer:install-update-end",
		PropertyTypeList: []message_bus.PropertyType{},
	}
	EventTypeInstallUpdateError = message_bus.EventType{
		SourceID: InstallerServiceName,
		Name:     "installer:install-update-error",
		PropertyTypeList: []message_bus.PropertyType{
			PropertyTypeAppName,
			PropertyTypeMessage,
		},
	}
)
View Source
var (
	PropertyTypeAppName = message_bus.PropertyType{
		Name:        "app:name",
		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"),
	}
)
View Source
var (
	PropertyTypeMessage = message_bus.PropertyType{
		Name:        "message",
		Description: utils.Ptr("message at different levels, typically for error"),
	}
)
View Source
var SampleReleaseYAML string

Functions

func PropertiesFromContext

func PropertiesFromContext(ctx context.Context) map[string]string

Returns the properties from the context for events

func WithProperties

func WithProperties(ctx context.Context, properties map[string]string) context.Context

Returns a new context with the given properties for events.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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