errs

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package errs provides common error types that can be used across the application.

Index

Constants

View Source
const (
	InvalidAgentToken             = UnauthenticatedError("invalid agent token")
	InvalidAgentID                = InvalidArgumentError("invalid agent ID")
	InvalidAgentName              = InvalidArgumentError("invalid agent name")
	InvalidMachineID              = InvalidArgumentError("invalid machine ID")
	InvalidAgentType              = InvalidArgumentError("invalid agent type")
	InvalidAgentVersion           = InvalidArgumentError("invalid agent version")
	UnsupportedAgentVersion       = InvalidArgumentError("unsupported agent version")
	InvalidAgentEdition           = InvalidArgumentError("invalid agent edition")
	InvalidAgentOperatingSystem   = InvalidArgumentError("invalid agent operating system")
	InvalidAgentArchitecture      = InvalidArgumentError("invalid agent architecture")
	InvalidAgentFlags             = InvalidArgumentError("invalid agent flags")
	InvalidAgentFlag              = InvalidArgumentError("invalid agent flag")
	InvalidAgentRawConfig         = InvalidArgumentError("invalid agent raw config")
	InvalidAgentMetadata          = InvalidArgumentError("invalid agent metadata")
	UpdateAgentVersionForbidden   = PermissionDeniedError("update agent version forbidden")
	UpdateAgentEditionForbidden   = PermissionDeniedError("update agent edition forbidden")
	UpdateAgentFlagsForbidden     = PermissionDeniedError("update agent flags forbidden")
	UpdateAgentRawConfigForbidden = PermissionDeniedError("update agent raw config forbidden")
	UpdateAgentMetadataForbidden  = PermissionDeniedError("update agent metadata forbidden")
	AgentGone                     = GoneError("agent gone")
	MachineIDConflict             = ConflictError("machine ID conflict")
	AgentNotFound                 = NotFoundError("agent not found")
	AgentsQuotaExceeded           = PermissionDeniedError("agents quota exceeded")
	InvalidTag                    = InvalidArgumentError("invalid tag")
)
View Source
const (
	AgentErrorNotFound             = NotFoundError("agent error not found")
	InvalidAgentErrorID            = InvalidArgumentError("invalid agent error ID")
	InvalidAgentError              = InvalidArgumentError("invalid agent error")
	EitherAgentIDOrFleetIDRequired = InvalidArgumentError("either agent ID or fleet ID required")
	InvalidAgentErrorDismissReason = InvalidArgumentError("invalid agent error dismiss reason")
)
View Source
const (
	InvalidPermission   = InvalidArgumentError("invalid permission")
	DuplicatePermission = InvalidArgumentError("duplicate permission")
)
View Source
const (
	InvalidAWSMarketplaceCustomerToken = InvalidArgumentError("invalid AWS marketplace customer token")
	AWSContractAlreadyExists           = ConflictError("AWS contract already exists")
)
View Source
const (
	ClusterObjectAlreadyExists = InvalidArgumentError("cluster object already exists")
	InvalidClusterObjectID     = InvalidArgumentError("invalid cluster object ID")
	InvalidClusterObjectName   = InvalidArgumentError("invalid cluster object name")
	InvalidClusterObjectKind   = InvalidArgumentError("invalid cluster object kind")
	ClusterObjectNotFound      = NotFoundError("cluster object not found")
)
View Source
const (
	InvalidClusterObjectRegexID     = InvalidArgumentError("invalid cluster object regex ID")
	InvalidClusterObjectRegex       = InvalidArgumentError("invalid cluster object regex")
	InvalidClusterObjectRegexDesc   = InvalidArgumentError("invalid cluster object regex description")
	ClusterObjectRegexAlreadyExists = ConflictError("cluster object regex already exists")
	ClusterObjectRegexNotFound      = NotFoundError("cluster object regex not found")
)
View Source
const (
	ConfigSectionNotFound        = NotFoundError("config section not found")
	InvalidConfigSectionID       = InvalidArgumentError("invalid config section ID")
	UnsupportedConfigSection     = InvalidArgumentError("unsupported config section")
	ConfigSectionSetSizeOverflow = InvalidArgumentError("config section set size overflow")
)
View Source
const (
	InvalidCoreInstanceToken       = UnauthenticatedError("invalid aggregator token")
	InvalidAggregatorID            = InvalidArgumentError("invalid aggregator ID")
	InvalidCoreInstanceID          = InvalidArgumentError("invalid core instance ID")
	InvalidCoreInstanceName        = InvalidArgumentError("invalid aggregator name")
	InvalidCoreInstanceVersion     = InvalidArgumentError("invalid aggregator version")
	CoreInstanceGone               = GoneError("aggregator gone")
	CoreInstanceNotFound           = NotFoundError("aggregator not found")
	CoreInstanceNameAlreadyExists  = ConflictError("aggregator name already exists")
	CoreInstancesQuotaExceeded     = PermissionDeniedError("aggregators quota exceeded")
	InvalidCoreInstanceMetadata    = InvalidArgumentError("invalid aggregator metadata")
	InvalidCoreInstanceDockerImage = InvalidArgumentError("invalid docker image")
)
View Source
const (
	InvalidCoreInstanceCheckStatus   = InvalidArgumentError("invalid core instance check status")
	InvalidCoreInstanceCheckID       = InvalidArgumentError("invalid core instance check ID")
	InvalidCoreInstanceCheckProtocol = InvalidArgumentError("invalid core instance check protocol")
	InvalidCoreInstanceCheckPort     = InvalidArgumentError("invalid core instance check port")
	InvalidCoreInstanceCheckHost     = InvalidArgumentError("invalid core instance check host")
	CoreInstanceCheckNotFound        = NotFoundError("core instance check not found")
)
View Source
const (
	CoreInstanceFileAlreadyExists = ConflictError("core instance file already exists")
	CoreInstanceFileNotFound      = NotFoundError("core instance file not found")
	InvalidCoreInstanceFileID     = InvalidArgumentError("invalid core instance file ID")
)
View Source
const (
	CoreInstanceSecretAlreadyExists = ConflictError("core instance secret already exists")
	CoreInstanceSecretNotFound      = NotFoundError("core instance secret not found")
	InvalidCoreInstanceSecretID     = InvalidArgumentError("invalid core instance secret ID")
)
View Source
const (
	EnvironmentNotFound    = NotFoundError("environment not found")
	InvalidEnvironmentName = InvalidArgumentError("invalid environment name")
	EnvironmentNameTaken   = ConflictError("environment name taken")
	InvalidEnvironmentID   = InvalidArgumentError("invalid environment ID")
)
View Source
const (
	Unauthenticated  = UnauthenticatedError("unauthenticated")
	InvalidArgument  = InvalidArgumentError("invalid argument")
	NotFound         = NotFoundError("not found")
	Conflict         = ConflictError("conflict")
	PermissionDenied = PermissionDeniedError("permission denied")
	Gone             = GoneError("gone")
	Unavailable      = UnavailableError("unavailable")
)
View Source
const (
	InvalidFleetID           = InvalidArgumentError("invalid fleet ID")
	InvalidFleetName         = InvalidArgumentError("invalid fleet name")
	InvalidFluentBitVersion  = InvalidArgumentError("invalid fluentbit version")
	FleetNameTaken           = ConflictError("fleet name taken")
	FleetNotFound            = NotFoundError("fleet not found")
	InvalidFluentbitConfig   = InvalidArgumentError("invalid fluentbit config")
	InvalidFleetConfigFormat = InvalidArgumentError("invalid fleet config format")
)
View Source
const (
	InvalidFleetFileID         = InvalidArgumentError("invalid fleet file ID")
	InvalidFleetFileName       = InvalidArgumentError("invalid fleet file name")
	FleetFilenameAlreadyExists = ConflictError("fleet file name already exists")
	FleetFileNotFound          = NotFoundError("fleet file not found")
	FleetFilesQuotaExceeded    = PermissionDeniedError("fleet files quota exceeded")
	FleetFileSizeExceeded      = InvalidArgumentError("fleet file size exceeded")
)
View Source
const (
	PluginNotFound          = NotFoundError("plugin not found")
	InvalidConfigToValidate = InvalidArgumentError("invalid configuration validation payload")
)
View Source
const (
	IngestCheckAlreadyExists  = InvalidArgumentError("ingestion check already exists")
	InvalidIngestCheckStatus  = InvalidArgumentError("invalid ingest check status")
	InvalidIngestCheckLogs    = InvalidArgumentError("invalid ingest check logs")
	InvalidIngestCheckRetries = InvalidArgumentError("invalid ingest check retries")
	InvalidIngestCheckID      = InvalidArgumentError("invalid ingest check ID")
	InvalidConfigSectionKind  = InvalidArgumentError("invalid config section kind")
	IngestCheckNotFound       = NotFoundError("ingest check not found")
)
View Source
const (
	InvalidInvitationToken = UnauthenticatedError("invalid invitation token")
	InvitationExpired      = UnauthenticatedError("invitation expired")
	InvalidRedirectURI     = InvalidArgumentError("invalid redirect URI")
	UntrustedRedirectURI   = InvalidArgumentError("untrusted redirect URI")
	EmailMismatch          = PermissionDeniedError("email mismatch")
	CannotInviteYourSelf   = PermissionDeniedError("cannot invite yourself")
	InvitationGone         = GoneError("invitation gone")
	InvitationNotFound     = NotFoundError("invitation not found")
)
View Source
const (
	InvalidMemberID         = InvalidArgumentError("invalid member ID")
	MemberAlreadyExists     = ConflictError("member already exists")
	MemberNotFound          = NotFoundError("member not found")
	CannotDeleteLastCreator = ConflictError("cannot delete last creator")
)
View Source
const (
	InvalidStart      = InvalidArgumentError("invalid start")
	InvalidInterval   = InvalidArgumentError("invalid interval")
	InvalidMetrics    = InvalidArgumentError("invalid metrics")
	DuplicatedMetrics = ConflictError("duplicated metrics")
)
View Source
const (
	InvalidPipelineKind                 = InvalidArgumentError("invalid pipeline kind")
	InvalidPipelineID                   = InvalidArgumentError("invalid pipeline ID")
	InvalidPipelineName                 = InvalidArgumentError("invalid pipeline name")
	InvalidPipelineMetadata             = InvalidArgumentError("invalid pipeline metadata")
	InvalidPipelineMetadataKey          = InvalidArgumentError("invalid pipeline metadata key")
	InvalidPipelineMetadataValue        = InvalidArgumentError("invalid pipeline metadata value")
	InvalidPipelineImage                = InvalidArgumentError("invalid pipeline image")
	InvalidPipelineDeploymentStrategy   = InvalidArgumentError("invalid pipeline deployment strategy")
	InvalidHPAScalingType               = InvalidArgumentError("invalid pipeline HPA scaling type")
	InvalidMinReplicasCount             = InvalidArgumentError("invalid min replica count")
	PipelineNameAlreadyExists           = ConflictError("pipeline name already exists")
	CannotUpdatePipelineKind            = ConflictError("pipeline kind cannot be updated")
	PipelineNotFound                    = NotFoundError("pipeline not found")
	PipelinesQuotaExceeded              = PermissionDeniedError("pipelines quota exceeded")
	PipelineReplicasOnlyDeployments     = ConflictError("pipeline replicas can only be set for pipelines of kind deployment")
	InternalPipelinePermissionDenied    = PermissionDeniedError("pipeline can only be deleted by the system")
	ClusterLoggingPipelineAlreadyExists = ConflictError("a pipeline for cluster logging already exists")
	ZeroClusterObjectIDs                = InvalidArgumentError("zero cluster object IDs")
	ClusterLoggingOnlyNamespaces        = ConflictError("only cluster objects of type namespace can be associated to a cluster logging pipeline")
)
View Source
const (
	InvalidPipelineCheckStatus   = InvalidArgumentError("invalid pipeline check status")
	InvalidPipelineCheckID       = InvalidArgumentError("invalid pipeline check ID")
	InvalidPipelineCheckProtocol = InvalidArgumentError("invalid pipeline check protocol")
	InvalidPipelineCheckPort     = InvalidArgumentError("invalid pipeline check port")
	InvalidPipelineCheckHost     = InvalidArgumentError("invalid pipeline check host")
	PipelineCheckNotFound        = NotFoundError("pipeline check not found")
	PipelineCheckAlreadyExists   = ConflictError("pipeline check already exists")
)
View Source
const (
	InvalidPipelineConfig       = InvalidArgumentError("invalid pipeline config")
	InvalidPipelineConfigFormat = InvalidArgumentError("invalid pipeline config format")
	PipelineConfigNotFound      = NotFoundError("pipeline config not found")
)
View Source
const (
	InvalidPipelineFileID      = InvalidArgumentError("invalid pipeline file ID")
	PipelineFileAlreadyExists  = ConflictError("pipeline file already exists")
	PipelineFileNotFound       = NotFoundError("pipeline file not found")
	PipelineFilesQuotaExceeded = PermissionDeniedError("pipeline files quota exceeded")
)
View Source
const (
	InvalidFileName      = InvalidArgumentError("invalid file name")
	FileSizeExceeded     = InvalidArgumentError("file size exceeded")
	FileContentsRequired = InvalidArgumentError("file contents required")
)
View Source
const (
	PipelineLogNotFound      = NotFoundError("pipeline log not found")
	InvalidPipelineLogs      = InvalidArgumentError("invalid pipeline logs")
	InvalidPipelineLogStatus = InvalidArgumentError("invalid pipeline log status")
	InvalidPipelineLogLines  = InvalidArgumentError("invalid pipeline log lines")
	InvalidPipelineLogID     = InvalidArgumentError("invalid pipeline log ID")
)
View Source
const (
	InvalidPipelinePortID       = InvalidArgumentError("invalid pipeline port ID")
	InvalidPipelinePortProtocol = InvalidArgumentError("invalid pipeline port protocol")
	InvalidPipelinePortNumber   = InvalidArgumentError("invalid pipeline port number")
	InvalidPipelinePortEndpoint = InvalidArgumentError("invalid pipeline port endpoint")
	InvalidPipelinePortKind     = InvalidArgumentError("invalid pipeline port type")
	PipelinePortNotFound        = NotFoundError("pipeline port not found")
	PipelinePortInUse           = ConflictError("pipeline port already in use")
)
View Source
const (
	InvalidPipelineSecretID      = InvalidArgumentError("invalid pipeline secret ID")
	PipelineSecretAlreadyExists  = ConflictError("pipeline secret already exists")
	PipelineSecretNotFound       = NotFoundError("pipeline secret not found")
	PipelineSecretsQuotaExceeded = PermissionDeniedError("pipeline secrets quota exceeded")
)
View Source
const (
	InvalidSecretKey    = InvalidArgumentError("invalid secret key")
	SecretSizeExceeded  = InvalidArgumentError("secret size exceeded")
	SecretValueRequired = InvalidArgumentError("secret value required")
)
View Source
const (
	InvalidPipelineStatus  = InvalidArgumentError("invalid pipeline status")
	PipelineStatusNotFound = NotFoundError("pipeline status not found")
)
View Source
const (
	InvalidProcessingRuleID                 = InvalidArgumentError("invalid processing rule ID")
	InvalidProcessingRuleMatch              = InvalidArgumentError("invalid processing rule match")
	InvalidProcessingRuleLanguage           = InvalidArgumentError("invalid processing rule language")
	InvalidProcessingRuleActionDesc         = InvalidArgumentError("invalid processing rule action desc")
	InvalidProcessingRuleActionKind         = InvalidArgumentError("invalid processing rule action kind")
	InvalidProcessingRuleActionSelectorKind = InvalidArgumentError("invalid processing rule action selector kind")
	InvalidProcessingRuleActionSelectorOp   = InvalidArgumentError("invalid processing rule action selector op")
	InvalidProcessingRuleActionSelectorExpr = InvalidArgumentError("invalid processing rule action selector expr")
	InvalidProcessingRuleActionArgs         = InvalidArgumentError("invalid processing rule action args")
	ProcessingRuleNotFound                  = NotFoundError("processing rule not found")
)
View Source
const (
	ProcessingRuleTemplateAlreadyExists          = ConflictError("processing rule template already exists")
	ProcessingRuleTemplateNotFound               = NotFoundError("processing rule template not found")
	InvalidProcessingRuleTemplateName            = InvalidArgumentError("invalid processing rule template name")
	InvalidProcessingRuleTemplateInput           = InvalidArgumentError("invalid processing rule template input")
	InvalidProcessingRuleTemplatePipelineVersion = InvalidArgumentError("invalid processing rule template pipeline version")
	InvalidProcessingRuleDef                     = InvalidArgumentError("invalid processing rule template definition")
	InvalidProcessingRuleTemplateID              = InvalidArgumentError("invalid processing rule template ID")
)
View Source
const (
	InvalidProjectID   = InvalidArgumentError("invalid project ID")
	InvalidProjectName = InvalidArgumentError("invalid project name")
	ProjectNotFound    = NotFoundError("project not found")
)
View Source
const (
	InvalidResourceProfileID     = InvalidArgumentError("invalid resource profile ID")
	InvalidResourceProfileName   = InvalidArgumentError("invalid resource profile name")
	ResourceProfileStillInUse    = PermissionDeniedError("resource profile still in use by pipelines")
	ResourceProfileAlreadyExists = ConflictError("resource profile name already exists")
	ResourceProfileNotFound      = NotFoundError("resource profile not found")
)
View Source
const (
	InvalidToken     = UnauthenticatedError("invalid token")
	InvalidTokenID   = InvalidArgumentError("invalid token ID")
	InvalidTokenName = InvalidArgumentError("invalid token name")
	TokenNameTaken   = ConflictError("token name taken")
	TokenGone        = GoneError("token gone")
	TokenNotFound    = NotFoundError("token not found")
)
View Source
const (
	InvalidTraceSessionID        = InvalidArgumentError("invalid trace session ID")
	TraceSessionNotFound         = NotFoundError("trace session not found")
	NoActiveTraceSession         = NotFoundError("no active trace session")
	ActiveTraceSessionInProgress = ConflictError("active trace session in progress")
	InvalidTraceLifespan         = InvalidArgumentError("invalid trace lifespan")
	ZeroTracePlugins             = InvalidArgumentError("zero trace plugins")
	InvalidTraceRecordKind       = InvalidArgumentError("invalid trace record kind")
	InvalidTraceRecords          = InvalidArgumentError("invalid trace record")
	TraceSessionTerminated       = GoneError("trace session terminated")
)
View Source
const (
	EmailNotVerified = UnauthenticatedError("email not verified")
	InvalidEmail     = InvalidArgumentError("invalid email")
	InvalidUserName  = InvalidArgumentError("invalid user name")
	InvalidAvatarURL = InvalidArgumentError("invalid avatar URL")
	EmailTaken       = ConflictError("email taken")
	UserNotFound     = NotFoundError("user not found")
)
View Source
const DecodeCursor = InvalidArgumentError("decode cursor")
View Source
const (
	UnknownSearchResource = InvalidArgumentError("unknown search resource")
)

Variables

This section is empty.

Functions

func NewPipelinePortInUseError

func NewPipelinePortInUseError(protocol string, port uint) error

Types

type ConflictError

type ConflictError string

func (ConflictError) Error

func (e ConflictError) Error() string

func (ConflictError) Is

func (e ConflictError) Is(target error) bool

type DetailedError

type DetailedError struct {
	Msg    string  `json:"error"`
	Detail *string `json:"detail,omitempty"`
	Parent error   `json:"-"`
}

func NewDetailedError

func NewDetailedError(parent error, detail string) *DetailedError

func NewPipelinePortAlreadyInUseError

func NewPipelinePortAlreadyInUseError(protocol string, port uint) *DetailedError

func NewResourceProfileSpecError

func NewResourceProfileSpecError(s string) *DetailedError

func NewUndefinedPipelineSecretError

func NewUndefinedPipelineSecretError(s string) *DetailedError

func WrapFluentbitConfigError

func WrapFluentbitConfigError(err error) *DetailedError

func (*DetailedError) Error

func (e *DetailedError) Error() string

func (*DetailedError) Unwrap

func (e *DetailedError) Unwrap() error

type GoneError

type GoneError string

func (GoneError) Error

func (e GoneError) Error() string

func (GoneError) Is

func (e GoneError) Is(target error) bool

type IndexedError

type IndexedError struct {
	Msg    string `json:"error"`
	Index  uint   `json:"index"`
	Parent error  `json:"-"`
}

func NewIndexedError

func NewIndexedError(e error, index uint) *IndexedError

func (*IndexedError) Error

func (e *IndexedError) Error() string

func (*IndexedError) Unwrap

func (e *IndexedError) Unwrap() error

type InvalidArgumentError

type InvalidArgumentError string

func (InvalidArgumentError) Error

func (e InvalidArgumentError) Error() string

func (InvalidArgumentError) Is

func (e InvalidArgumentError) Is(target error) bool

type NotFoundError

type NotFoundError string

func (NotFoundError) Error

func (e NotFoundError) Error() string

func (NotFoundError) Is

func (e NotFoundError) Is(target error) bool

type PermissionDeniedError

type PermissionDeniedError string

func (PermissionDeniedError) Error

func (e PermissionDeniedError) Error() string

func (PermissionDeniedError) Is

func (e PermissionDeniedError) Is(target error) bool

type QuotaExceededError

type QuotaExceededError struct {
	Msg       string `json:"error"`
	Limit     uint   `json:"quotaLimit"`
	Remaining uint   `json:"quotaRemaining"`
	Parent    error  `json:"-"`
}

func NewQuotaExceededError

func NewQuotaExceededError(base error, limit, remaining uint) *QuotaExceededError

func (*QuotaExceededError) Error

func (e *QuotaExceededError) Error() string

func (*QuotaExceededError) Unwrap

func (e *QuotaExceededError) Unwrap() error

type UnauthenticatedError

type UnauthenticatedError string

func (UnauthenticatedError) Error

func (e UnauthenticatedError) Error() string

func (UnauthenticatedError) Is

func (e UnauthenticatedError) Is(target error) bool

type UnavailableError added in v1.8.0

type UnavailableError string

func (UnavailableError) Error added in v1.8.0

func (e UnavailableError) Error() string

func (UnavailableError) Is added in v1.8.0

func (e UnavailableError) Is(target error) bool

Jump to

Keyboard shortcuts

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