valueObject

package
v0.0.0-...-2f4a2fd Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: EPL-2.0 Imports: 20 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 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",
		"percona-server-mysqld",
	},
	"postgresql": {"postgres"},
	"redis":      {"redis-server"},
}
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",
	},
}
View Source
var ValidDatabasePrivileges = []string{
	"ALL PRIVILEGES",
	"ALL",
	"ALTER ROUTINE",
	"ALTER SYSTEM",
	"ALTER",
	"BYPASSRLS",
	"CONNECT",
	"CREATE DOMAIN",
	"CREATE FUNCTION",
	"CREATE GROUP",
	"CREATE INDEX",
	"CREATE LANGUAGE",
	"CREATE PROCEDURE",
	"CREATE ROLE",
	"CREATE ROUTINE",
	"CREATE SCHEMA",
	"CREATE TABLE",
	"CREATE TEMP",
	"CREATE TEMPORARY TABLES",
	"CREATE TRIGGER",
	"CREATE TYPE",
	"CREATE USER",
	"CREATE VIEW",
	"CREATE",
	"CREATEDB",
	"CREATEROLE",
	"DELETE HISTORY",
	"DELETE",
	"DROP",
	"EVENT",
	"EXECUTE",
	"FILE",
	"INDEX",
	"INSERT",
	"LOCK TABLES",
	"PASSWORDADMIN",
	"PROCESS",
	"PROXY",
	"REFERENCES",
	"RELOAD",
	"REPLICATION CLIENT",
	"REPLICATION SLAVE",
	"REPLICATION",
	"SELECT",
	"SET",
	"SHOW VIEW",
	"SHUTDOWN",
	"SUPER",
	"SUPERUSER",
	"TEMPORARY",
	"TRIGGER",
	"TRUNCATE",
	"UPDATE",
	"USAGE",
}
View Source
var ValidMappingMatchPatterns = []string{
	"begins-with",
	"contains",
	"equals",
	"ends-with",
}
View Source
var ValidMappingTargetTypes = []string{
	"url",
	"service",
	"response-code",
	"inline-html",
	"static-files",
}
View Source
var ValidMarketplaceItemTypes = []string{
	"app",
	"framework",
	"stack",
}
View Source
var ValidNetworkProtocols = []string{
	"http",
	"https",
	"ws",
	"wss",
	"grpc",
	"grpcs",
	"tcp",
	"udp",
}
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 ValidServiceNatures = []string{
	"solo",
	"multi",
	"custom",
}
View Source
var ValidServiceTypes = []string{
	"application",
	"runtime",
	"database",
	"webserver",
	"mom",
	"monitoring",
	"logging",
	"security",
	"backup",
	"system",
	"other",
}
View Source
var ValidVirtualHostTypes = []string{
	"primary",
	"top-level",
	"subdomain",
	"wildcard",
	"alias",
}

Functions

func ServiceNameAdapter

func ServiceNameAdapter(value string) string

func ServiceStatusAdapter

func ServiceStatusAdapter(value string) (string, error)

Types

type AccessTokenStr

type AccessTokenStr string

func NewAccessTokenStr

func NewAccessTokenStr(value string) (AccessTokenStr, error)

func NewAccessTokenStrPanic

func NewAccessTokenStrPanic(value string) AccessTokenStr

func (AccessTokenStr) String

func (ats AccessTokenStr) String() string

type AccessTokenType

type AccessTokenType string

func NewAccessTokenType

func NewAccessTokenType(value string) (AccessTokenType, error)

func NewAccessTokenTypePanic

func NewAccessTokenTypePanic(value string) AccessTokenType

func (AccessTokenType) String

func (att AccessTokenType) String() string

type AccountId

type AccountId uint64

func NewAccountId

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

func NewAccountIdPanic

func NewAccountIdPanic(value interface{}) AccountId

func (AccountId) Get

func (id AccountId) Get() uint64

func (AccountId) String

func (id AccountId) String() string

type Byte

type Byte int64

func NewByte

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

func (Byte) Get

func (b Byte) Get() int64

func (Byte) ToGiB

func (b Byte) ToGiB() int64

func (Byte) ToKiB

func (b Byte) ToKiB() int64

func (Byte) ToMiB

func (b Byte) ToMiB() int64

func (Byte) ToTiB

func (b 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 string) (CronComment, error)

func NewCronCommentPanic

func NewCronCommentPanic(value string) CronComment

func (CronComment) String

func (comment CronComment) String() string

type CronId

type CronId uint64

func NewCronId

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

func NewCronIdPanic

func NewCronIdPanic(value interface{}) CronId

func (CronId) Get

func (id CronId) Get() uint64

func (CronId) String

func (id CronId) String() string

type CronSchedule

type CronSchedule string

func NewCronSchedule

func NewCronSchedule(value string) (CronSchedule, error)

func NewCronSchedulePanic

func NewCronSchedulePanic(value string) CronSchedule

func (CronSchedule) String

func (schedule CronSchedule) String() string

type CurrentResourceUsage

type CurrentResourceUsage struct {
	CpuUsagePercent     float64 `json:"cpuUsagePercent"`
	MemUsagePercent     float64 `json:"memUsagePercent"`
	StorageUsagePercent float64 `json:"storageUsage"`
}

func NewCurrentResourceUsage

func NewCurrentResourceUsage(
	cpuUsagePercent float64,
	memUsagePercent float64,
	storageUsagePercent float64,
) CurrentResourceUsage

type DataFieldLabel

type DataFieldLabel string

func NewDataFieldLabel

func NewDataFieldLabel(value string) (DataFieldLabel, error)

func NewDataFieldLabelPanic

func NewDataFieldLabelPanic(value string) DataFieldLabel

func (DataFieldLabel) String

func (dfl DataFieldLabel) String() string

type DataFieldName

type DataFieldName string

func NewDataFieldName

func NewDataFieldName(value string) (DataFieldName, error)

func NewDataFieldNamePanic

func NewDataFieldNamePanic(value string) DataFieldName

func (DataFieldName) String

func (dfn DataFieldName) String() string

type DataFieldType

type DataFieldType string

func NewDataFieldType

func NewDataFieldType(value string) (DataFieldType, error)

func NewDataFieldTypePanic

func NewDataFieldTypePanic(value string) DataFieldType

func (DataFieldType) String

func (vo DataFieldType) String() string

type DataFieldValue

type DataFieldValue string

func NewDataFieldValue

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

func NewDataFieldValuePanic

func NewDataFieldValuePanic(value interface{}) DataFieldValue

func (DataFieldValue) String

func (dfv DataFieldValue) String() string

type DatabaseName

type DatabaseName string

func NewDatabaseName

func NewDatabaseName(value string) (DatabaseName, error)

func NewDatabaseNamePanic

func NewDatabaseNamePanic(value string) DatabaseName

func (DatabaseName) String

func (dbName DatabaseName) String() string

type DatabasePrivilege

type DatabasePrivilege string

func NewDatabasePrivilege

func NewDatabasePrivilege(value string) (DatabasePrivilege, error)

func NewDatabasePrivilegePanic

func NewDatabasePrivilegePanic(value string) DatabasePrivilege

func (DatabasePrivilege) String

func (dp DatabasePrivilege) String() string

type DatabaseType

type DatabaseType string

func NewDatabaseType

func NewDatabaseType(value string) (DatabaseType, error)

func NewDatabaseTypePanic

func NewDatabaseTypePanic(value string) DatabaseType

func (DatabaseType) String

func (dt DatabaseType) String() string

type DatabaseUsername

type DatabaseUsername string

func NewDatabaseUsername

func NewDatabaseUsername(value string) (DatabaseUsername, error)

func NewDatabaseUsernamePanic

func NewDatabaseUsernamePanic(value string) DatabaseUsername

func (DatabaseUsername) String

func (dbUser DatabaseUsername) String() string

type EncodedContent

type EncodedContent string

func NewEncodedContent

func NewEncodedContent(value string) (EncodedContent, error)

func NewEncodedContentPanic

func NewEncodedContentPanic(value string) EncodedContent

func (EncodedContent) GetDecodedContent

func (encodedBaseContent EncodedContent) GetDecodedContent() (string, error)

func (EncodedContent) String

func (encodedBaseContent EncodedContent) String() string

type FailureReason

type FailureReason string

func NewFailureReason

func NewFailureReason(value string) (FailureReason, error)

func NewFailureReasonPanic

func NewFailureReasonPanic(value string) FailureReason

func (FailureReason) String

func (fileProcessingFailure 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, error)

func NewFileStreamHandlerPanic

func NewFileStreamHandlerPanic(value *multipart.FileHeader) FileStreamHandler

type Fqdn

type Fqdn string

func NewFqdn

func NewFqdn(value string) (Fqdn, error)

func NewFqdnPanic

func NewFqdnPanic(value string) Fqdn

func (Fqdn) String

func (fqdn Fqdn) String() string

type GroupId

type GroupId int64

func NewGroupId

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

func NewGroupIdPanic

func NewGroupIdPanic(value interface{}) GroupId

func (GroupId) Get

func (gid GroupId) Get() int64

func (GroupId) String

func (gid GroupId) String() string

type GroupName

type GroupName string

func NewGroupName

func NewGroupName(value string) (GroupName, error)

func NewGroupNamePanic

func NewGroupNamePanic(value string) GroupName

func (GroupName) String

func (groupName GroupName) String() string

type HardwareSpecs

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

func NewHardwareSpecs

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

type Hash

type Hash string

func NewHash

func NewHash(value string) (Hash, error)

func NewHashPanic

func NewHashPanic(value string) Hash

func (Hash) String

func (hash Hash) String() string

type HttpResponseCode

type HttpResponseCode uint64

func NewHttpResponseCode

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

func NewHttpResponseCodePanic

func NewHttpResponseCodePanic(value interface{}) HttpResponseCode

func (HttpResponseCode) String

func (responseCode HttpResponseCode) String() string

type InlineHtmlContent

type InlineHtmlContent string

func NewInlineHtmlContent

func NewInlineHtmlContent(value string) (InlineHtmlContent, error)

func NewInlineHtmlContentPanic

func NewInlineHtmlContentPanic(value string) InlineHtmlContent

func (InlineHtmlContent) String

func (ihc InlineHtmlContent) String() string

type IpAddress

type IpAddress string

func NewIpAddress

func NewIpAddress(value string) (IpAddress, error)

func NewIpAddressPanic

func NewIpAddressPanic(value string) IpAddress

func (IpAddress) String

func (addr IpAddress) String() string

type MappingId

type MappingId uint64

func NewMappingId

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

func NewMappingIdPanic

func NewMappingIdPanic(value interface{}) MappingId

func (MappingId) Get

func (mId MappingId) Get() uint64

func (MappingId) String

func (mId MappingId) String() string

type MappingMatchPattern

type MappingMatchPattern string

func NewMappingMatchPattern

func NewMappingMatchPattern(value string) (MappingMatchPattern, error)

func NewMappingMatchPatternPanic

func NewMappingMatchPatternPanic(value string) MappingMatchPattern

func (MappingMatchPattern) String

func (mmp MappingMatchPattern) String() string

type MappingPath

type MappingPath string

func NewMappingPath

func NewMappingPath(value string) (MappingPath, error)

func NewMappingPathPanic

func NewMappingPathPanic(value string) MappingPath

func (MappingPath) String

func (mappingPath MappingPath) String() string

type MappingTargetType

type MappingTargetType string

func NewMappingTargetType

func NewMappingTargetType(value string) (MappingTargetType, error)

func NewMappingTargetTypePanic

func NewMappingTargetTypePanic(value string) MappingTargetType

func (MappingTargetType) String

func (mtt MappingTargetType) String() string

type MappingTargetValue

type MappingTargetValue string

func NewMappingTargetValue

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

func NewMappingTargetValuePanic

func NewMappingTargetValuePanic(
	value interface{},
	targetType MappingTargetType,
) (vo MappingTargetValue)

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 NewMarketplaceInstallableItemDataFieldPanic

func NewMarketplaceInstallableItemDataFieldPanic(
	name DataFieldName,
	value DataFieldValue,
) MarketplaceInstallableItemDataField

type MarketplaceInstalledItemUuid

type MarketplaceInstalledItemUuid string

func NewMarketplaceInstalledItemUuid

func NewMarketplaceInstalledItemUuid(
	value string,
) (MarketplaceInstalledItemUuid, error)

func NewMarketplaceInstalledItemUuidPanic

func NewMarketplaceInstalledItemUuidPanic(
	value string,
) MarketplaceInstalledItemUuid

func (MarketplaceInstalledItemUuid) String

func (min MarketplaceInstalledItemUuid) String() string

type MarketplaceItemCmdStep

type MarketplaceItemCmdStep string

func NewMarketplaceItemCmdStep

func NewMarketplaceItemCmdStep(value string) (MarketplaceItemCmdStep, error)

func NewMarketplaceItemCmdStepPanic

func NewMarketplaceItemCmdStepPanic(value string) MarketplaceItemCmdStep

func (MarketplaceItemCmdStep) String

func (miis MarketplaceItemCmdStep) String() string

type MarketplaceItemDescription

type MarketplaceItemDescription string

func NewMarketplaceItemDescription

func NewMarketplaceItemDescription(value string) (MarketplaceItemDescription, error)

func NewMarketplaceItemDescriptionPanic

func NewMarketplaceItemDescriptionPanic(value string) MarketplaceItemDescription

func (MarketplaceItemDescription) String

func (mid MarketplaceItemDescription) String() string

type MarketplaceItemId

type MarketplaceItemId uint

func NewMarketplaceItemId

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

func NewMarketplaceItemIdPanic

func NewMarketplaceItemIdPanic(value interface{}) MarketplaceItemId

func (MarketplaceItemId) Get

func (vo MarketplaceItemId) Get() uint

func (MarketplaceItemId) String

func (vo MarketplaceItemId) String() string

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 string) (MarketplaceItemName, error)

func NewMarketplaceItemNamePanic

func NewMarketplaceItemNamePanic(value string) MarketplaceItemName

func (MarketplaceItemName) String

func (min MarketplaceItemName) String() string

type MarketplaceItemSlug

type MarketplaceItemSlug string

func NewMarketplaceItemSlug

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

func NewMarketplaceItemSlugPanic

func NewMarketplaceItemSlugPanic(value interface{}) MarketplaceItemSlug

func (MarketplaceItemSlug) String

func (vo MarketplaceItemSlug) String() string

type MarketplaceItemType

type MarketplaceItemType string

func NewMarketplaceItemType

func NewMarketplaceItemType(value string) (MarketplaceItemType, error)

func NewMarketplaceItemTypePanic

func NewMarketplaceItemTypePanic(value string) MarketplaceItemType

func (MarketplaceItemType) String

func (mit MarketplaceItemType) String() string

type MimeType

type MimeType string

func NewMimeType

func NewMimeType(value string) (MimeType, error)

func NewMimeTypePanic

func NewMimeTypePanic(value string) MimeType

func (MimeType) IsDir

func (mimeType MimeType) IsDir() bool

func (MimeType) String

func (mimeType MimeType) String() string

type NetworkPort

type NetworkPort uint64

func NewNetworkPort

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

func NewNetworkPortPanic

func NewNetworkPortPanic(value interface{}) NetworkPort

func (NetworkPort) Get

func (np NetworkPort) Get() uint64

func (NetworkPort) String

func (np NetworkPort) String() string

type NetworkProtocol

type NetworkProtocol string

func NewNetworkProtocol

func NewNetworkProtocol(value string) (NetworkProtocol, error)

func NewNetworkProtocolPanic

func NewNetworkProtocolPanic(value string) NetworkProtocol

func (NetworkProtocol) String

func (np NetworkProtocol) String() string

type Password

type Password string

func NewPassword

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

func NewPasswordPanic

func NewPasswordPanic(value interface{}) Password

func (Password) String

func (vo Password) String() string

type PhpModuleName

type PhpModuleName string

func NewPhpModuleName

func NewPhpModuleName(value string) (PhpModuleName, error)

func NewPhpModuleNamePanic

func NewPhpModuleNamePanic(value string) PhpModuleName

func (PhpModuleName) String

func (moduleName PhpModuleName) String() string

type PhpSettingName

type PhpSettingName string

func NewPhpSettingName

func NewPhpSettingName(value string) (PhpSettingName, error)

func NewPhpSettingNamePanic

func NewPhpSettingNamePanic(value string) PhpSettingName

func (PhpSettingName) String

func (settingName PhpSettingName) String() string

type PhpSettingOption

type PhpSettingOption string

func NewPhpSettingOption

func NewPhpSettingOption(value string) (PhpSettingOption, error)

func NewPhpSettingOptionPanic

func NewPhpSettingOptionPanic(value string) PhpSettingOption

func (PhpSettingOption) String

func (settingOption PhpSettingOption) String() string

type PhpSettingValue

type PhpSettingValue string

func NewPhpSettingValue

func NewPhpSettingValue(value string) (PhpSettingValue, error)

func NewPhpSettingValuePanic

func NewPhpSettingValuePanic(value string) PhpSettingValue

func (PhpSettingValue) GetType

func (settingValue PhpSettingValue) GetType() string

func (PhpSettingValue) IsBool

func (settingValue PhpSettingValue) IsBool() bool

func (PhpSettingValue) IsByteSize

func (settingValue PhpSettingValue) IsByteSize() bool

func (PhpSettingValue) IsNumber

func (settingValue PhpSettingValue) IsNumber() bool

func (PhpSettingValue) String

func (settingValue PhpSettingValue) String() string

type PhpVersion

type PhpVersion string

func NewPhpVersion

func NewPhpVersion(value string) (PhpVersion, error)

func NewPhpVersionPanic

func NewPhpVersionPanic(value string) PhpVersion

func (PhpVersion) GetWithoutDots

func (version PhpVersion) GetWithoutDots() string

func (PhpVersion) String

func (version PhpVersion) String() string

type PortBinding

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

func NewPortBinding

func NewPortBinding(
	port NetworkPort,
	protocol NetworkProtocol,
) PortBinding

func NewPortBindingFromString

func NewPortBindingFromString(value string) (PortBinding, error)

func (PortBinding) GetPort

func (portBinding PortBinding) GetPort() NetworkPort

func (PortBinding) GetProtocol

func (portBinding PortBinding) GetProtocol() NetworkProtocol

func (PortBinding) String

func (portBinding PortBinding) String() string

type RuntimeContext

type RuntimeContext string

func NewRuntimeContext

func NewRuntimeContext(value string) (RuntimeContext, error)

func NewRuntimeContextPanic

func NewRuntimeContextPanic(value string) RuntimeContext

func (RuntimeContext) IsContainer

func (rc RuntimeContext) IsContainer() bool

func (RuntimeContext) String

func (rc RuntimeContext) 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 string) (ServiceName, error)

func NewServiceNamePanic

func NewServiceNamePanic(value string) ServiceName

func (ServiceName) String

func (sn 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 string) (
	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 string) (ServiceNature, error)

func NewServiceNaturePanic

func NewServiceNaturePanic(value string) ServiceNature

func (ServiceNature) String

func (sn ServiceNature) String() string

type ServiceStatus

type ServiceStatus string

func NewServiceStatus

func NewServiceStatus(value string) (ServiceStatus, error)

func NewServiceStatusPanic

func NewServiceStatusPanic(value string) ServiceStatus

func (ServiceStatus) String

func (vo ServiceStatus) String() string

type ServiceType

type ServiceType string

func NewServiceType

func NewServiceType(value string) (ServiceType, error)

func NewServiceTypePanic

func NewServiceTypePanic(value string) ServiceType

func (ServiceType) String

func (st ServiceType) String() string

type ServiceVersion

type ServiceVersion string

func NewServiceVersion

func NewServiceVersion(value string) (ServiceVersion, error)

func NewServiceVersionPanic

func NewServiceVersionPanic(value string) ServiceVersion

func (ServiceVersion) GetWithoutPunctuation

func (version ServiceVersion) GetWithoutPunctuation() string

func (ServiceVersion) String

func (version ServiceVersion) String() string

type SslCertificateAuthority

type SslCertificateAuthority string

func NewSslCertificateAuthority

func NewSslCertificateAuthority(value string) (SslCertificateAuthority, error)

func NewSslCertificateAuthorityPanic

func NewSslCertificateAuthorityPanic(value string) SslCertificateAuthority

func (SslCertificateAuthority) IsSelfSigned

func (sca SslCertificateAuthority) IsSelfSigned() bool

func (SslCertificateAuthority) String

func (sca SslCertificateAuthority) String() string

type SslCertificateContent

type SslCertificateContent string

func NewSslCertificateContent

func NewSslCertificateContent(sslCertificate string) (SslCertificateContent, error)

func NewSslCertificateContentFromEncodedContent

func NewSslCertificateContentFromEncodedContent(
	encodedContent EncodedContent,
) (SslCertificateContent, error)

func NewSslCertificateContentFromEncodedContentPanic

func NewSslCertificateContentFromEncodedContentPanic(
	encodedContent EncodedContent,
) SslCertificateContent

func NewSslCertificateContentPanic

func NewSslCertificateContentPanic(certificate string) SslCertificateContent

func (SslCertificateContent) MarshalJSON

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

func (SslCertificateContent) String

func (sslCrt SslCertificateContent) String() string

type SslHostname

type SslHostname string

func NewSslHostname

func NewSslHostname(value string) (SslHostname, error)

func NewSslHostnamePanic

func NewSslHostnamePanic(value string) SslHostname

func (SslHostname) String

func (sslHostname SslHostname) String() string

type SslId

type SslId string

func NewSslId

func NewSslId(value string) (SslId, error)

func NewSslIdFromSslCertificateContent

func NewSslIdFromSslCertificateContent(
	sslCertificate SslCertificateContent,
) (SslId, error)

func NewSslIdFromSslPairContent

func NewSslIdFromSslPairContent(
	sslCertificate SslCertificateContent,
	sslChainCertificates []SslCertificateContent,
	sslPrivateKey SslPrivateKey,
) (SslId, error)

func NewSslIdPanic

func NewSslIdPanic(value string) SslId

func (SslId) String

func (sslId SslId) String() string

type SslPrivateKey

type SslPrivateKey string

func NewSslPrivateKey

func NewSslPrivateKey(privateKey string) (SslPrivateKey, error)

func NewSslPrivateKeyFromEncodedContent

func NewSslPrivateKeyFromEncodedContent(
	encodedContent EncodedContent,
) (SslPrivateKey, error)

func NewSslPrivateKeyFromEncodedContentPanic

func NewSslPrivateKeyFromEncodedContentPanic(
	encodedContent EncodedContent,
) SslPrivateKey

func NewSslPrivateKeyPanic

func NewSslPrivateKeyPanic(privateKey string) SslPrivateKey

func (SslPrivateKey) MarshalJSON

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

func (SslPrivateKey) String

func (sslPrivateKey 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 Byte,
	available Byte,
	used Byte,
) StorageInfo

type UnixCommand

type UnixCommand string

func NewUnixCommand

func NewUnixCommand(value string) (UnixCommand, error)

func NewUnixCommandPanic

func NewUnixCommandPanic(value string) UnixCommand

func (UnixCommand) String

func (cmd UnixCommand) String() string

type UnixCompressionType

type UnixCompressionType string

func NewUnixCompressionType

func NewUnixCompressionType(value string) (UnixCompressionType, error)

func NewUnixCompressionTypePanic

func NewUnixCompressionTypePanic(value string) UnixCompressionType

func (UnixCompressionType) String

func (unixCompressionType UnixCompressionType) String() string

type UnixFileContent

type UnixFileContent string

func NewUnixFileContent

func NewUnixFileContent(value string) (UnixFileContent, error)

func NewUnixFileContentPanic

func NewUnixFileContentPanic(value string) UnixFileContent

func (UnixFileContent) String

func (unixFileContent UnixFileContent) String() string

type UnixFileExtension

type UnixFileExtension string

func NewUnixFileExtension

func NewUnixFileExtension(value string) (UnixFileExtension, error)

func NewUnixFileExtensionPanic

func NewUnixFileExtensionPanic(value string) UnixFileExtension

func (UnixFileExtension) GetMimeType

func (unixFileExtension UnixFileExtension) GetMimeType() MimeType

func (UnixFileExtension) String

func (unixFileExtension UnixFileExtension) String() string

type UnixFileName

type UnixFileName string

func NewUnixFileName

func NewUnixFileName(value string) (UnixFileName, error)

func NewUnixFileNamePanic

func NewUnixFileNamePanic(value string) UnixFileName

func (UnixFileName) String

func (unixFileName UnixFileName) String() string

type UnixFilePath

type UnixFilePath string

func NewUnixFilePath

func NewUnixFilePath(value string) (UnixFilePath, error)

func NewUnixFilePathPanic

func NewUnixFilePathPanic(value string) UnixFilePath

func (UnixFilePath) GetFileDir

func (unixFilePath UnixFilePath) GetFileDir() UnixFilePath

func (UnixFilePath) GetFileExtension

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

func (UnixFilePath) GetFileName

func (unixFilePath UnixFilePath) GetFileName() UnixFileName

func (UnixFilePath) GetFileNameWithoutExtension

func (unixFilePath UnixFilePath) GetFileNameWithoutExtension() UnixFileName

func (UnixFilePath) GetWithoutExtension

func (unixFilePath UnixFilePath) GetWithoutExtension() UnixFilePath

func (UnixFilePath) String

func (unixFilePath UnixFilePath) String() string

type UnixFilePermissions

type UnixFilePermissions string

func NewUnixFilePermissions

func NewUnixFilePermissions(value string) (UnixFilePermissions, 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 NewUnixFilePermissionsPanic

func NewUnixFilePermissionsPanic(value string) UnixFilePermissions

func (UnixFilePermissions) GetFileMode

func (unixFilePermissions UnixFilePermissions) GetFileMode() fs.FileMode

func (UnixFilePermissions) String

func (unixFilePermission UnixFilePermissions) String() string

type UnixTime

type UnixTime int64

func (UnixTime) Get

func (ut UnixTime) Get() int64

func (UnixTime) GetDateOnly

func (ut UnixTime) GetDateOnly() string

func (UnixTime) GetRfcDate

func (ut UnixTime) GetRfcDate() string

func (UnixTime) GetTimeOnly

func (ut UnixTime) GetTimeOnly() string

func (UnixTime) GetUnixTime

func (ut UnixTime) GetUnixTime() time.Time

type UnixUid

type UnixUid int64

func NewUnixUid

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

func NewUnixUidPanic

func NewUnixUidPanic(value int) UnixUid

func (UnixUid) Get

func (gid UnixUid) Get() int64

func (UnixUid) String

func (gid UnixUid) 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 string) (Url, error)

func NewUrlPanic

func NewUrlPanic(value string) Url

func (Url) GetPort

func (url Url) GetPort() (NetworkPort, error)

func (Url) String

func (url Url) String() string

type UrlPath

type UrlPath string

func NewUrlPath

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

func NewUrlPathPanic

func NewUrlPathPanic(value interface{}) UrlPath

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 string) (Username, error)

func NewUsernamePanic

func NewUsernamePanic(value string) Username

func (Username) String

func (user Username) String() string

type VirtualHostType

type VirtualHostType string

func NewVirtualHostType

func NewVirtualHostType(value string) (VirtualHostType, error)

func NewVirtualHostTypePanic

func NewVirtualHostTypePanic(value string) VirtualHostType

func (VirtualHostType) String

func (vt 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