valueObject

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: EPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const FileContentMaxSizeInMb = 5
View Source
const ServiceNameRegex string = `^[a-z0-9\.\_\-]{1,64}$`

Variables

View Source
var AvailableDatabasePrivileges = []string{
	"ALTER", "ALTER ROUTINE", "CREATE", "CREATE ROUTINE", "CREATE TEMPORARY TABLES",
	"CREATE VIEW", "DELETE", "DROP", "EVENT", "EXECUTE", "INDEX", "INSERT",
	"LOCK TABLES", "REFERENCES", "SELECT", "SHOW VIEW", "TRIGGER", "UPDATE",
}
View Source
var AvailableVirtualHostsTypes = []string{
	"top-level", "subdomain", "alias",
}
View Source
var NativeSvcNamesWithAliases = map[string][]string{
	"php-webserver": {
		"php", "php-ws", "lsphp", "php-fpm", "php-cgi", "litespeed", "openlitespeed",
	},
	"node": {"nodejs"},
	"mariadb": {
		"mariadbd", "mariadb-server", "mysql", "mysqld", "percona", "perconadb",
	},
	"postgresql": {"postgres"},
	"redis":      {"redis-server"},
	"java":       {"jre", "jdk", "openjdk"},
}
View Source
var ServiceStatusesWithAliases = map[string][]string{
	"running": {
		"run", "up", "start", "started", "enable", "enabled", "activate", "active",
		"true", "on", "ok", "yes", "y", "1",
	},
	"stopped": {
		"stop", "halt", "halted", "pause", "paused", "deactivate", "deactivated",
		"false", "off", "no", "n", "0",
	},
	"uninstalled": {
		"uninstall", "uninstalled", "remove", "removed", "delete", "deleted",
		"purge", "purged", "clear", "cleared", "clean", "cleaned",
	},
	"restarting": {
		"restart", "restarted", "reload", "reloaded", "refresh", "refreshed",
		"reboot", "rebooted", "reset", "reseted",
	},
}
View Source
var ValidMappingTargetTypes = []string{
	"url", "service", "response-code", "inline-html", "static-files",
}
View Source
var ValidPaginationSortDirections = []string{"asc", "desc"}
View Source
var ValidPhpModuleNames = []string{
	"curl", "mysqli", "opcache", "apcu", "igbinary", "imagick", "imap", "intl",
	"ioncube", "ldap", "mailparse", "memcached", "mcrypt", "mongodb", "msgpack",
	"parallel", "pdo_mysql", "pdo_sqlite", "pear", "pgsql", "phalcon", "pspell",
	"redis", "snmp", "solr", "sqlite3", "sqlsrv", "ssh2", "swoole", "sybase",
	"tidy", "timezonedb", "yaml", "xdebug",
}
View Source
var ValidScheduledTaskStatuses = []string{
	"pending", "running", "completed", "failed", "cancelled", "timeout",
}
View Source
var ValidServiceNatures = []string{
	"solo", "multi", "custom",
}
View Source
var ValidServiceTypes = []string{
	"application", "runtime", "database", "webserver", "mom", "monitoring",
	"logging", "security", "backup", "system", "other",
}
View Source
var ValidUnixCompressionTypes = []string{
	"tgz", "zip",
}

Functions

func ServiceNameAdapter

func ServiceNameAdapter(value string) string

Types

type AccessTokenStr

type AccessTokenStr string

func NewAccessTokenStr

func NewAccessTokenStr(value interface{}) (accessTokenStr AccessTokenStr, err error)

func (AccessTokenStr) String

func (vo AccessTokenStr) String() string

type AccessTokenType

type AccessTokenType string

func NewAccessTokenType

func NewAccessTokenType(value interface{}) (
	accessTokenType AccessTokenType, err error,
)

func (AccessTokenType) String

func (vo AccessTokenType) String() string

type AccountId

type AccountId uint64

func NewAccountId

func NewAccountId(value interface{}) (accountId AccountId, err error)

func (AccountId) String

func (vo AccountId) String() string

func (AccountId) Uint64 added in v0.1.2

func (vo AccountId) Uint64() uint64

type ActivityRecordCode

type ActivityRecordCode string

func NewActivityRecordCode

func NewActivityRecordCode(value interface{}) (code ActivityRecordCode, err error)

func (ActivityRecordCode) String

func (vo ActivityRecordCode) String() string

type ActivityRecordId

type ActivityRecordId uint64

func NewActivityRecordId

func NewActivityRecordId(value interface{}) (
	activityRecordId ActivityRecordId, err error,
)

func (ActivityRecordId) String

func (vo ActivityRecordId) String() string

func (ActivityRecordId) Uint64

func (vo ActivityRecordId) Uint64() uint64

type ActivityRecordLevel

type ActivityRecordLevel string

func NewActivityRecordLevel

func NewActivityRecordLevel(value interface{}) (
	activityRecordLevel ActivityRecordLevel, err error,
)

func (ActivityRecordLevel) String

func (vo ActivityRecordLevel) String() string

type ActivityRecordMessage

type ActivityRecordMessage string

func NewActivityRecordMessage

func NewActivityRecordMessage(value interface{}) (
	activityRecordMessage ActivityRecordMessage, err error,
)

func (ActivityRecordMessage) String

func (vo ActivityRecordMessage) String() string

type Byte

type Byte int64

func NewByte

func NewByte(value interface{}) (Byte, error)

func NewGibibyte

func NewGibibyte(value interface{}) (Byte, error)

func NewMebibyte

func NewMebibyte(value interface{}) (Byte, error)

func (Byte) Int64

func (vo Byte) Int64() int64

func (Byte) String

func (vo Byte) String() string

func (Byte) StringWithSuffix

func (vo Byte) StringWithSuffix() string

func (Byte) ToGiB

func (vo Byte) ToGiB() int64

func (Byte) ToKiB

func (vo Byte) ToKiB() int64

func (Byte) ToMiB

func (vo Byte) ToMiB() int64

func (Byte) ToTiB

func (vo Byte) ToTiB() int64

type CompressionProcessFailure

type CompressionProcessFailure struct {
	FilePath UnixFilePath  `json:"filePath"`
	Reason   FailureReason `json:"reason"`
}

func NewCompressionProcessFailure

func NewCompressionProcessFailure(
	filePath UnixFilePath,
	reason FailureReason,
) CompressionProcessFailure

type CronComment

type CronComment string

func NewCronComment

func NewCronComment(value interface{}) (cronComment CronComment, err error)

func (CronComment) String

func (vo CronComment) String() string

type CronId

type CronId uint64

func NewCronId

func NewCronId(value interface{}) (cronId CronId, err error)

func (CronId) String

func (vo CronId) String() string

func (CronId) Uint64

func (vo CronId) Uint64() uint64

type CronSchedule

type CronSchedule string

func NewCronSchedule

func NewCronSchedule(value interface{}) (cronSchedule CronSchedule, err error)

func (CronSchedule) String

func (vo CronSchedule) String() string

type CurrentResourceUsage

type CurrentResourceUsage struct {
	CpuUsagePercent        float64 `json:"cpuUsagePercent"`
	CpuUsagePercentStr     string  `json:"cpuUsagePercentStr"`
	MemUsagePercent        float64 `json:"memUsagePercent"`
	MemUsagePercentStr     string  `json:"memUsagePercentStr"`
	StorageUsagePercent    float64 `json:"storageUsage"`
	StorageUsagePercentStr string  `json:"storageUsagePercentStr"`
}

func NewCurrentResourceUsage

func NewCurrentResourceUsage(
	cpuUsagePercent float64,
	cpuUsagePercentStr string,
	memUsagePercent float64,
	memUsagePercentStr string,
	storageUsagePercent float64,
	storageUsagePercentStr string,
) CurrentResourceUsage

type DataFieldLabel

type DataFieldLabel string

func NewDataFieldLabel

func NewDataFieldLabel(value interface{}) (
	dataFieldLabel DataFieldLabel, err error,
)

func (DataFieldLabel) String

func (vo DataFieldLabel) String() string

type DataFieldName

type DataFieldName string

func NewDataFieldName

func NewDataFieldName(value interface{}) (
	dataFieldName DataFieldName, err error,
)

func (DataFieldName) String

func (vo DataFieldName) String() string

type DataFieldType

type DataFieldType string

func NewDataFieldType

func NewDataFieldType(value interface{}) (
	dataFieldType DataFieldType, err error,
)

func (DataFieldType) String

func (vo DataFieldType) String() string

type DataFieldValue

type DataFieldValue string

func NewDataFieldValue

func NewDataFieldValue(value interface{}) (
	dataFieldValue DataFieldValue, err error,
)

func (DataFieldValue) String

func (vo DataFieldValue) String() string

type DatabaseName

type DatabaseName string

func NewDatabaseName

func NewDatabaseName(value interface{}) (dbName DatabaseName, err error)

func (DatabaseName) String

func (vo DatabaseName) String() string

type DatabasePrivilege

type DatabasePrivilege string

func NewDatabasePrivilege

func NewDatabasePrivilege(value interface{}) (
	dbPrivilege DatabasePrivilege, err error,
)

func (DatabasePrivilege) String

func (vo DatabasePrivilege) String() string

type DatabaseType

type DatabaseType string

func NewDatabaseType

func NewDatabaseType(value interface{}) (dbType DatabaseType, err error)

func (DatabaseType) String

func (vo DatabaseType) String() string

type DatabaseUsername

type DatabaseUsername string

func NewDatabaseUsername

func NewDatabaseUsername(value interface{}) (
	dbUsername DatabaseUsername, err error,
)

func (DatabaseUsername) String

func (vo DatabaseUsername) String() string

type EncodedContent

type EncodedContent string

func NewEncodedContent

func NewEncodedContent(value interface{}) (encodedContent EncodedContent, err error)

func (EncodedContent) GetDecodedContent

func (vo EncodedContent) GetDecodedContent() (voStr string, err error)

func (EncodedContent) String

func (vo EncodedContent) String() string

type FailureReason

type FailureReason string

func NewFailureReason

func NewFailureReason(value interface{}) (failureReason FailureReason, err error)

func (FailureReason) String

func (vo FailureReason) String() string

type FileStreamHandler

type FileStreamHandler struct {
	Name UnixFileName
	Size Byte
	Open func() (multipart.File, error)
}

func NewFileStreamHandler

func NewFileStreamHandler(value *multipart.FileHeader) (
	fileStreamHandler FileStreamHandler, err error,
)

type Fqdn

type Fqdn string

func NewFqdn

func NewFqdn(value interface{}) (fqdn Fqdn, err error)

func (Fqdn) String

func (vo Fqdn) String() string

type GroupId

type GroupId uint64

func NewGroupId

func NewGroupId(value interface{}) (groupId GroupId, err error)

func (GroupId) String

func (vo GroupId) String() string

func (GroupId) Uint64

func (vo GroupId) Uint64() uint64

type GroupName

type GroupName string

func NewGroupName

func NewGroupName(value interface{}) (groupName GroupName, err error)

func (GroupName) String

func (vo GroupName) String() string

type HardwareSpecs

type HardwareSpecs struct {
	CpuModel     string  `json:"cpuModel"`
	CpuCores     float64 `json:"cpuCores"`
	CpuFrequency float64 `json:"cpuFrequency"`
	MemoryTotal  Byte    `json:"memoryTotal"`
	StorageTotal Byte    `json:"storageTotal"`
}

func NewHardwareSpecs

func NewHardwareSpecs(
	cpuModel string,
	cpuCores, cpuFrequency float64,
	memoryTotal, storageTotal Byte,
) HardwareSpecs

func (HardwareSpecs) String

func (vo HardwareSpecs) String() string

type Hash

type Hash string

func NewHash

func NewHash(value interface{}) (hash Hash, err error)

func (Hash) String

func (vo Hash) String() string

type HttpResponseCode

type HttpResponseCode uint16

func NewHttpResponseCode

func NewHttpResponseCode(value interface{}) (
	httpResponseCode HttpResponseCode, err error,
)

func (HttpResponseCode) String

func (vo HttpResponseCode) String() string

type InlineHtmlContent

type InlineHtmlContent string

func NewInlineHtmlContent

func NewInlineHtmlContent(value interface{}) (
	inlineHtmlContent InlineHtmlContent, err error,
)

func (InlineHtmlContent) String

func (vo InlineHtmlContent) String() string

type IpAddress

type IpAddress string

func NewIpAddress

func NewIpAddress(value interface{}) (ipAddress IpAddress, err error)

func NewLocalhostIpAddress

func NewLocalhostIpAddress() IpAddress

func (IpAddress) String

func (vo IpAddress) String() string

type MappingId

type MappingId uint64

func NewMappingId

func NewMappingId(value interface{}) (mappingId MappingId, err error)

func (MappingId) String

func (vo MappingId) String() string

func (MappingId) Uint64

func (vo MappingId) Uint64() uint64

type MappingMatchPattern

type MappingMatchPattern string

func NewMappingMatchPattern

func NewMappingMatchPattern(value interface{}) (
	mappingMatchPattern MappingMatchPattern, err error,
)

func (MappingMatchPattern) String

func (vo MappingMatchPattern) String() string

type MappingPath

type MappingPath string

func NewMappingPath

func NewMappingPath(value interface{}) (mappingPath MappingPath, err error)

func (MappingPath) String

func (vo MappingPath) String() string

type MappingTargetType

type MappingTargetType string

func NewMappingTargetType

func NewMappingTargetType(value interface{}) (
	mappingTargetType MappingTargetType, err error,
)

func (MappingTargetType) String

func (vo MappingTargetType) String() string

type MappingTargetValue

type MappingTargetValue string

func NewMappingTargetValue

func NewMappingTargetValue(
	value interface{}, targetType MappingTargetType,
) (mappingTargetValue MappingTargetValue, err error)

func (MappingTargetValue) String

func (vo MappingTargetValue) String() string

type MarketplaceCatalogItemDataField

type MarketplaceCatalogItemDataField struct {
	Name         DataFieldName    `json:"name"`
	Label        DataFieldLabel   `json:"label"`
	Type         DataFieldType    `json:"type"`
	DefaultValue *DataFieldValue  `json:"defaultValue,omitempty"`
	Options      []DataFieldValue `json:"options,omitempty"`
	IsRequired   bool             `json:"isRequired"`
}

func NewMarketplaceCatalogItemDataField

func NewMarketplaceCatalogItemDataField(
	name DataFieldName,
	label DataFieldLabel,
	fieldType DataFieldType,
	defaultValue *DataFieldValue,
	options []DataFieldValue,
	isRequired bool,
) (MarketplaceCatalogItemDataField, error)

type MarketplaceInstallableItemDataField

type MarketplaceInstallableItemDataField struct {
	Name  DataFieldName  `json:"name"`
	Value DataFieldValue `json:"value"`
}

func NewMarketplaceInstallableItemDataField

func NewMarketplaceInstallableItemDataField(
	name DataFieldName, value DataFieldValue,
) (MarketplaceInstallableItemDataField, error)

func (MarketplaceInstallableItemDataField) String

type MarketplaceInstalledItemUuid

type MarketplaceInstalledItemUuid string

func NewMarketplaceInstalledItemUuid

func NewMarketplaceInstalledItemUuid(value interface{}) (
	marketplaceInstalledItemUuid MarketplaceInstalledItemUuid, err error,
)

func (MarketplaceInstalledItemUuid) String

type MarketplaceItemDescription

type MarketplaceItemDescription string

func NewMarketplaceItemDescription

func NewMarketplaceItemDescription(value interface{}) (
	marketplaceItemDescription MarketplaceItemDescription, err error,
)

func (MarketplaceItemDescription) String

func (vo MarketplaceItemDescription) String() string

type MarketplaceItemId

type MarketplaceItemId uint16

func NewMarketplaceItemId

func NewMarketplaceItemId(value interface{}) (
	marketplaceItemId MarketplaceItemId, err error,
)

func (MarketplaceItemId) String

func (vo MarketplaceItemId) String() string

func (MarketplaceItemId) Uint16

func (vo MarketplaceItemId) Uint16() uint16

type MarketplaceItemManifestVersion added in v0.1.5

type MarketplaceItemManifestVersion string

func NewMarketplaceItemManifestVersion added in v0.1.5

func NewMarketplaceItemManifestVersion(value interface{}) (
	version MarketplaceItemManifestVersion, err error,
)

func (MarketplaceItemManifestVersion) String added in v0.1.5

type MarketplaceItemMapping

type MarketplaceItemMapping struct {
	Path                   MappingPath         `json:"path"`
	MatchPattern           MappingMatchPattern `json:"matchPattern"`
	TargetType             MappingTargetType   `json:"targetType"`
	TargetValue            *MappingTargetValue `json:"targetValue"`
	TargetHttpResponseCode *HttpResponseCode   `json:"targetHttpResponseCode"`
}

func NewMarketplaceItemMapping

func NewMarketplaceItemMapping(
	path MappingPath,
	matchPattern MappingMatchPattern,
	targetType MappingTargetType,
	targetValue *MappingTargetValue,
	targetHttpResponseCode *HttpResponseCode,
) MarketplaceItemMapping

type MarketplaceItemName

type MarketplaceItemName string

func NewMarketplaceItemName

func NewMarketplaceItemName(value interface{}) (
	marketplaceItemName MarketplaceItemName, err error,
)

func (MarketplaceItemName) String

func (vo MarketplaceItemName) String() string

type MarketplaceItemSlug

type MarketplaceItemSlug string

func NewMarketplaceItemSlug

func NewMarketplaceItemSlug(value interface{}) (
	marketplaceItemSlug MarketplaceItemSlug, err error,
)

func (MarketplaceItemSlug) String

func (vo MarketplaceItemSlug) String() string

type MarketplaceItemType

type MarketplaceItemType string

func NewMarketplaceItemType

func NewMarketplaceItemType(value interface{}) (
	marketplaceItemType MarketplaceItemType, err error,
)

func (MarketplaceItemType) String

func (vo MarketplaceItemType) String() string

type MimeType

type MimeType string

func NewMimeType

func NewMimeType(value interface{}) (mimeType MimeType, err error)

func (MimeType) IsDir

func (vo MimeType) IsDir() bool

func (MimeType) String

func (vo MimeType) String() string

type NetworkPort

type NetworkPort uint16

func NewNetworkPort

func NewNetworkPort(value interface{}) (networkPort NetworkPort, err error)

func (NetworkPort) String

func (vo NetworkPort) String() string

func (NetworkPort) Uint16

func (vo NetworkPort) Uint16() uint16

type NetworkProtocol

type NetworkProtocol string

func NewNetworkProtocol

func NewNetworkProtocol(value interface{}) (
	networkProtocol NetworkProtocol, err error,
)

func (NetworkProtocol) String

func (vo NetworkProtocol) String() string

type PaginationLastSeenId

type PaginationLastSeenId string

func NewPaginationLastSeenId

func NewPaginationLastSeenId(
	value interface{},
) (lastSeenId PaginationLastSeenId, err error)

func (PaginationLastSeenId) String

func (vo PaginationLastSeenId) String() string

type PaginationSortBy

type PaginationSortBy string

func NewPaginationSortBy

func NewPaginationSortBy(value interface{}) (sortBy PaginationSortBy, err error)

func (PaginationSortBy) String

func (vo PaginationSortBy) String() string

type PaginationSortDirection

type PaginationSortDirection string

func NewPaginationSortDirection

func NewPaginationSortDirection(
	value interface{},
) (sortDirection PaginationSortDirection, err error)

func (PaginationSortDirection) String

func (vo PaginationSortDirection) String() string

type Password

type Password string

func NewPassword

func NewPassword(value interface{}) (password Password, err error)

func (Password) String

func (vo Password) String() string

type PhpModuleName

type PhpModuleName string

func NewPhpModuleName

func NewPhpModuleName(value interface{}) (moduleName PhpModuleName, err error)

func (PhpModuleName) String

func (vo PhpModuleName) String() string

type PhpSettingName

type PhpSettingName string

func NewPhpSettingName

func NewPhpSettingName(value interface{}) (settingName PhpSettingName, err error)

func (PhpSettingName) String

func (vo PhpSettingName) String() string

type PhpSettingOption

type PhpSettingOption string

func NewPhpSettingOption

func NewPhpSettingOption(value interface{}) (
	phpSettingOption PhpSettingOption, err error,
)

func (PhpSettingOption) String

func (vo PhpSettingOption) String() string

type PhpSettingType

type PhpSettingType string

func NewPhpSettingType

func NewPhpSettingType(value interface{}) (phpSettingType PhpSettingType, err error)

func (PhpSettingType) String

func (vo PhpSettingType) String() string

type PhpSettingValue

type PhpSettingValue string

func NewPhpSettingValue

func NewPhpSettingValue(value interface{}) (settingValue PhpSettingValue, err error)

func (PhpSettingValue) GetType

func (vo PhpSettingValue) GetType() string

func (PhpSettingValue) IsBool

func (vo PhpSettingValue) IsBool() bool

func (PhpSettingValue) IsByteSize

func (vo PhpSettingValue) IsByteSize() bool

func (PhpSettingValue) IsNumber

func (vo PhpSettingValue) IsNumber() bool

func (PhpSettingValue) String

func (vo PhpSettingValue) String() string

type PhpVersion

type PhpVersion string

func NewPhpVersion

func NewPhpVersion(value interface{}) (phpVersion PhpVersion, err error)

func (PhpVersion) GetWithoutDots

func (vo PhpVersion) GetWithoutDots() string

func (PhpVersion) String

func (vo PhpVersion) String() string

type PortBinding

type PortBinding struct {
	Port     NetworkPort     `json:"port"`
	Protocol NetworkProtocol `json:"protocol"`
}

func NewPortBinding

func NewPortBinding(value interface{}) (portBinding PortBinding, err error)

func (PortBinding) GetPort

func (vo PortBinding) GetPort() NetworkPort

func (PortBinding) GetProtocol

func (vo PortBinding) GetProtocol() NetworkProtocol

func (PortBinding) String

func (vo PortBinding) String() string

type RelativeTime

type RelativeTime string

func NewRelativeTime

func NewRelativeTime(value interface{}) (relativeTime RelativeTime, err error)

func (RelativeTime) String

func (vo RelativeTime) String() string

type RuntimeType

type RuntimeType string

func NewRuntimeType

func NewRuntimeType(value interface{}) (runtimeType RuntimeType, err error)

func (RuntimeType) String

func (vo RuntimeType) String() string

type ScheduledTaskId

type ScheduledTaskId uint64

func NewScheduledTaskId

func NewScheduledTaskId(value interface{}) (
	scheduledTaskId ScheduledTaskId, err error,
)

func (ScheduledTaskId) String

func (vo ScheduledTaskId) String() string

func (ScheduledTaskId) Uint64

func (vo ScheduledTaskId) Uint64() uint64

type ScheduledTaskName

type ScheduledTaskName string

func NewScheduledTaskName

func NewScheduledTaskName(value interface{}) (
	scheduledTaskName ScheduledTaskName, err error,
)

func (ScheduledTaskName) String

func (vo ScheduledTaskName) String() string

type ScheduledTaskOutput

type ScheduledTaskOutput string

func NewScheduledTaskOutput

func NewScheduledTaskOutput(value interface{}) (
	scheduledTaskOutput ScheduledTaskOutput, err error,
)

func (ScheduledTaskOutput) String

func (vo ScheduledTaskOutput) String() string

type ScheduledTaskStatus

type ScheduledTaskStatus string

func NewScheduledTaskStatus

func NewScheduledTaskStatus(value interface{}) (
	scheduledTaskStatus ScheduledTaskStatus, err error,
)

func (ScheduledTaskStatus) String

func (vo ScheduledTaskStatus) String() string

type ScheduledTaskTag

type ScheduledTaskTag string

func NewScheduledTaskTag

func NewScheduledTaskTag(value interface{}) (
	scheduledTaskTag ScheduledTaskTag, err error,
)

func (ScheduledTaskTag) String

func (vo ScheduledTaskTag) String() string

type ServiceDescription

type ServiceDescription string

func NewServiceDescription

func NewServiceDescription(value interface{}) (
	serviceDescription ServiceDescription, err error,
)

func (ServiceDescription) String

func (vo ServiceDescription) String() string

type ServiceEnv

type ServiceEnv string

func NewServiceEnv

func NewServiceEnv(value interface{}) (serviceEnv ServiceEnv, err error)

func (ServiceEnv) String

func (vo ServiceEnv) String() string

type ServiceManifestVersion added in v0.1.5

type ServiceManifestVersion string

func NewServiceManifestVersion added in v0.1.5

func NewServiceManifestVersion(value interface{}) (
	version ServiceManifestVersion, err error,
)

func (ServiceManifestVersion) String added in v0.1.5

func (vo ServiceManifestVersion) String() string

type ServiceMetrics

type ServiceMetrics struct {
	Pids            []uint32 `json:"pids"`
	UptimeSecs      int64    `json:"uptimeSecs"`
	CpuUsagePercent float64  `json:"cpuUsagePercent"`
	MemUsagePercent float32  `json:"memUsagePercent"`
}

func NewServiceMetrics

func NewServiceMetrics(
	pids []uint32,
	uptimeSecs int64,
	cpuUsagePercent float64,
	memUsagePercent float32,
) ServiceMetrics

type ServiceName

type ServiceName string

func NewServiceName

func NewServiceName(value interface{}) (serviceName ServiceName, err error)

func (ServiceName) String

func (vo ServiceName) String() string

type ServiceNameWithVersion

type ServiceNameWithVersion struct {
	Name    ServiceName     `json:"name"`
	Version *ServiceVersion `json:"version"`
}

func NewServiceNameWithVersion

func NewServiceNameWithVersion(
	name ServiceName, version *ServiceVersion,
) ServiceNameWithVersion

func NewServiceNameWithVersionFromString

func NewServiceNameWithVersionFromString(value interface{}) (
	serviceNameWithVersion ServiceNameWithVersion, err error,
)

func (ServiceNameWithVersion) MarshalJSON

func (vo ServiceNameWithVersion) MarshalJSON() ([]byte, error)

func (ServiceNameWithVersion) String

func (vo ServiceNameWithVersion) String() string

type ServiceNature

type ServiceNature string

func NewServiceNature

func NewServiceNature(value interface{}) (serviceNature ServiceNature, err error)

func (ServiceNature) String

func (vo ServiceNature) String() string

type ServiceStatus

type ServiceStatus string

func NewServiceStatus

func NewServiceStatus(value interface{}) (status ServiceStatus, err error)

func (ServiceStatus) String

func (vo ServiceStatus) String() string

type ServiceType

type ServiceType string

func NewServiceType

func NewServiceType(value interface{}) (serviceType ServiceType, err error)

func (ServiceType) String

func (vo ServiceType) String() string

type ServiceVersion

type ServiceVersion string

func NewServiceVersion

func NewServiceVersion(value interface{}) (
	serviceVersion ServiceVersion, err error,
)

func (ServiceVersion) GetWithoutPunctuation

func (vo ServiceVersion) GetWithoutPunctuation() string

func (ServiceVersion) String

func (vo ServiceVersion) String() string

type SslCertificateAuthority

type SslCertificateAuthority string

func NewSslCertificateAuthority

func NewSslCertificateAuthority(value interface{}) (
	certificateAuthority SslCertificateAuthority, err error,
)

func (SslCertificateAuthority) IsSelfSigned

func (vo SslCertificateAuthority) IsSelfSigned() bool

func (SslCertificateAuthority) String

func (vo SslCertificateAuthority) String() string

type SslCertificateContent

type SslCertificateContent string

func NewSslCertificateContent

func NewSslCertificateContent(input interface{}) (
	certContent SslCertificateContent, err error,
)

func (SslCertificateContent) MarshalJSON

func (vo SslCertificateContent) MarshalJSON() ([]byte, error)

func (SslCertificateContent) String

func (vo SslCertificateContent) String() string

type SslCertificateId added in v0.1.5

type SslCertificateId string

func NewSslCertificateId added in v0.1.5

func NewSslCertificateId(value interface{}) (sslCertificateId SslCertificateId, err error)

func NewSslCertificateIdFromSslCertificateContent added in v0.1.5

func NewSslCertificateIdFromSslCertificateContent(
	sslCertificate SslCertificateContent,
) (sslCertificateId SslCertificateId, err error)

func (SslCertificateId) String added in v0.1.5

func (vo SslCertificateId) String() string

type SslHostname

type SslHostname string

func NewSslHostname

func NewSslHostname(value interface{}) (sslHostname SslHostname, err error)

func (SslHostname) String

func (vo SslHostname) String() string

type SslPairId added in v0.1.5

type SslPairId string

func NewSslPairId added in v0.1.5

func NewSslPairId(value interface{}) (sslPairId SslPairId, err error)

func NewSslPairIdFromSslPairContent added in v0.1.5

func NewSslPairIdFromSslPairContent(
	sslCertificate SslCertificateContent,
	sslChainCertificates []SslCertificateContent,
	sslPrivateKey SslPrivateKey,
) (sslPairId SslPairId, err error)

func (SslPairId) String added in v0.1.5

func (vo SslPairId) String() string

type SslPrivateKey

type SslPrivateKey string

func NewSslPrivateKey

func NewSslPrivateKey(value interface{}) (privateKey SslPrivateKey, err error)

func (SslPrivateKey) MarshalJSON

func (vo SslPrivateKey) MarshalJSON() ([]byte, error)

func (SslPrivateKey) String

func (vo SslPrivateKey) String() string

type StorageInfo

type StorageInfo struct {
	Total     Byte `json:"total"`
	Available Byte `json:"available"`
	Used      Byte `json:"used"`
}

func NewStorageInfo

func NewStorageInfo(total, available, used Byte) StorageInfo

type SystemResourceIdentifier added in v0.1.2

type SystemResourceIdentifier string

func NewAccountSri added in v0.1.2

func NewAccountSri(accountId AccountId) SystemResourceIdentifier

func NewCronSri added in v0.1.5

func NewCronSri(
	accountId AccountId,
	cronId CronId,
) SystemResourceIdentifier

func NewCustomServiceSri added in v0.1.5

func NewCustomServiceSri(
	accountId AccountId,
	serviceName ServiceName,
) SystemResourceIdentifier

func NewDatabaseSri added in v0.1.5

func NewDatabaseSri(
	accountId AccountId,
	databaseName DatabaseName,
) SystemResourceIdentifier

func NewDatabaseUserSri added in v0.1.5

func NewDatabaseUserSri(
	accountId AccountId,
	databaseUsername DatabaseUsername,
) SystemResourceIdentifier

func NewInstallableServiceSri added in v0.1.5

func NewInstallableServiceSri(
	accountId AccountId,
	serviceName ServiceName,
) SystemResourceIdentifier

func NewInstalledServiceSri added in v0.1.5

func NewInstalledServiceSri(
	accountId AccountId,
	serviceName ServiceName,
) SystemResourceIdentifier

func NewMappingSri added in v0.1.5

func NewMappingSri(
	accountId AccountId,
	mappingId MappingId,
) SystemResourceIdentifier

func NewMarketplaceCatalogItemSri added in v0.1.5

func NewMarketplaceCatalogItemSri(
	accountId AccountId,
	marketplaceCatalogItemId *MarketplaceItemId,
	marketplaceCatalogItemSlug *MarketplaceItemSlug,
) SystemResourceIdentifier

func NewMarketplaceInstalledItemSri added in v0.1.5

func NewMarketplaceInstalledItemSri(
	accountId AccountId,
	marketplaceInstalledItemId MarketplaceItemId,
) SystemResourceIdentifier

func NewPhpRuntimeSri added in v0.1.5

func NewPhpRuntimeSri(
	accountId AccountId,
	virtualHostHostname Fqdn,
) SystemResourceIdentifier

func NewSslSri added in v0.1.5

func NewSslSri(
	accountId AccountId,
	sslPairId SslPairId,
) SystemResourceIdentifier

func NewSystemResourceIdentifier added in v0.1.2

func NewSystemResourceIdentifier(
	value interface{},
) (sri SystemResourceIdentifier, err error)

func NewSystemResourceIdentifierIgnoreError added in v0.1.2

func NewSystemResourceIdentifierIgnoreError(value interface{}) SystemResourceIdentifier

Note: this panic is solely to warn about the misuse of the VO, specifically for developer auditing, and has nothing to do with user input. This is not a standard and should not be followed for the development of other VOs.

func NewUnixFileSri added in v0.1.5

func NewUnixFileSri(
	accountId AccountId,
	unixFilePath UnixFilePath,
) SystemResourceIdentifier

func NewVirtualHostSri added in v0.1.5

func NewVirtualHostSri(
	accountId AccountId,
	vhostHostname Fqdn,
) SystemResourceIdentifier

func (SystemResourceIdentifier) String added in v0.1.2

func (vo SystemResourceIdentifier) String() string

type UnixCommand

type UnixCommand string

func NewUnixCommand

func NewUnixCommand(value interface{}) (unixCommand UnixCommand, err error)

func (UnixCommand) String

func (vo UnixCommand) String() string

type UnixCompressionType

type UnixCompressionType string

func NewUnixCompressionType

func NewUnixCompressionType(value interface{}) (
	unixCompressionType UnixCompressionType, err error,
)

func (UnixCompressionType) String

func (vo UnixCompressionType) String() string

type UnixFileContent

type UnixFileContent string

func NewUnixFileContent

func NewUnixFileContent(value interface{}) (
	unixFileContent UnixFileContent, err error,
)

func (UnixFileContent) String

func (vo UnixFileContent) String() string

type UnixFileExtension

type UnixFileExtension string

func NewUnixFileExtension

func NewUnixFileExtension(value interface{}) (
	unixFileExtension UnixFileExtension, err error,
)

func (UnixFileExtension) GetMimeType

func (vo UnixFileExtension) GetMimeType() MimeType

func (UnixFileExtension) String

func (vo UnixFileExtension) String() string

type UnixFileName

type UnixFileName string

func NewUnixFileName

func NewUnixFileName(value interface{}) (fileName UnixFileName, err error)

func (UnixFileName) String

func (vo UnixFileName) String() string

type UnixFilePath

type UnixFilePath string

func NewUnixFilePath

func NewUnixFilePath(value interface{}) (filePath UnixFilePath, err error)

func (UnixFilePath) GetFileDir

func (vo UnixFilePath) GetFileDir() UnixFilePath

func (UnixFilePath) GetFileExtension

func (vo UnixFilePath) GetFileExtension() (UnixFileExtension, error)

func (UnixFilePath) GetFileName

func (vo UnixFilePath) GetFileName() UnixFileName

func (UnixFilePath) GetFileNameWithoutExtension

func (vo UnixFilePath) GetFileNameWithoutExtension() UnixFileName

func (UnixFilePath) GetWithoutExtension

func (vo UnixFilePath) GetWithoutExtension() UnixFilePath

func (UnixFilePath) String

func (vo UnixFilePath) String() string

type UnixFilePermissions

type UnixFilePermissions string

func NewUnixFilePermissions

func NewUnixFilePermissions(value interface{}) (
	unixFilePermission UnixFilePermissions, err error,
)

*

  • The "interfaceToUint" helper was not used due to the problem of octal
  • base vs decimal base in file permissions in C-like language.

func (UnixFilePermissions) GetFileMode

func (vo UnixFilePermissions) GetFileMode() fs.FileMode

func (UnixFilePermissions) String

func (vo UnixFilePermissions) String() string

type UnixTime

type UnixTime int64

func NewUnixTime

func NewUnixTime(value interface{}) (unixTime UnixTime, err error)

func NewUnixTimeAfterNow

func NewUnixTimeAfterNow(duration time.Duration) UnixTime

func NewUnixTimeBeforeNow

func NewUnixTimeBeforeNow(duration time.Duration) UnixTime

func NewUnixTimeNow

func NewUnixTimeNow() UnixTime

func NewUnixTimeWithGoTime

func NewUnixTimeWithGoTime(goTime time.Time) UnixTime

func (UnixTime) GetAsGoTime

func (vo UnixTime) GetAsGoTime() time.Time

func (UnixTime) GetDateOnly

func (vo UnixTime) GetDateOnly() string

func (UnixTime) GetRfcDate

func (vo UnixTime) GetRfcDate() string

func (UnixTime) GetTimeOnly

func (vo UnixTime) GetTimeOnly() string

func (UnixTime) Int64

func (vo UnixTime) Int64() int64

func (UnixTime) String

func (vo UnixTime) String() string

type UnixUid

type UnixUid int64

func NewUnixUid

func NewUnixUid(value interface{}) (unixUid UnixUid, err error)

func (UnixUid) Int64

func (vo UnixUid) Int64() int64

func (UnixUid) String

func (vo UnixUid) String() string

type UnixUsername

type UnixUsername string

func NewUnixUsername

func NewUnixUsername(value interface{}) (unixUsername UnixUsername, err error)

func (UnixUsername) String

func (vo UnixUsername) String() string

type UpdateProcessFailure

type UpdateProcessFailure struct {
	FilePath UnixFilePath  `json:"filePath"`
	Reason   FailureReason `json:"reason"`
}

func NewUpdateProcessFailure

func NewUpdateProcessFailure(
	filePath UnixFilePath,
	reason FailureReason,
) UpdateProcessFailure

type UploadProcessFailure

type UploadProcessFailure struct {
	FileName UnixFileName  `json:"fileName"`
	Reason   FailureReason `json:"reason"`
}

func NewUploadProcessFailure

func NewUploadProcessFailure(
	fileName UnixFileName,
	reason FailureReason,
) UploadProcessFailure

type Url

type Url string

func NewUrl

func NewUrl(value interface{}) (url Url, err error)

func (Url) String

func (vo Url) String() string

type UrlPath

type UrlPath string

func NewUrlPath

func NewUrlPath(value interface{}) (urlPath UrlPath, err error)

func (UrlPath) GetWithoutTrailingSlash

func (vo UrlPath) GetWithoutTrailingSlash() string

func (UrlPath) String

func (vo UrlPath) String() string

type Username

type Username string

func NewUsername

func NewUsername(value interface{}) (username Username, err error)

func (Username) String

func (vo Username) String() string

type VirtualHostType

type VirtualHostType string

func NewVirtualHostType

func NewVirtualHostType(value interface{}) (vhostType VirtualHostType, err error)

func (VirtualHostType) String

func (vo VirtualHostType) String() string

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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