errors

package
v0.0.0-...-6cdb919 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TLS                       = sourceType{/* contains filtered or unexported fields */}
	GitlabClient              = sourceType{/* contains filtered or unexported fields */}
	GitlabResource            = sourceType{/* contains filtered or unexported fields */}
	GithubResource            = sourceType{/* contains filtered or unexported fields */}
	ClusterInDB               = sourceType{/* contains filtered or unexported fields */}
	CollectionInDB            = sourceType{/* contains filtered or unexported fields */}
	ClusterStateInArgo        = sourceType{/* contains filtered or unexported fields */}
	TagInDB                   = sourceType{/* contains filtered or unexported fields */}
	BadgeInDB                 = sourceType{/* contains filtered or unexported fields */}
	ApplicationInArgo         = sourceType{/* contains filtered or unexported fields */}
	ApplicationResourceInArgo = sourceType{/* contains filtered or unexported fields */}
	ApplicationInDB           = sourceType{/* contains filtered or unexported fields */}
	ApplicationRegionInDB     = sourceType{/* contains filtered or unexported fields */}
	EnvironmentRegionInDB     = sourceType{/* contains filtered or unexported fields */}
	EnvironmentInDB           = sourceType{/* contains filtered or unexported fields */}
	RegionInDB                = sourceType{/* contains filtered or unexported fields */}
	GroupInDB                 = sourceType{/* contains filtered or unexported fields */}
	K8SClient                 = sourceType{/* contains filtered or unexported fields */}
	RegistryInDB              = sourceType{/* contains filtered or unexported fields */}
	Pipelinerun               = sourceType{/* contains filtered or unexported fields */}
	PipelinerunInTekton       = sourceType{/* contains filtered or unexported fields */}
	PipelinerunInDB           = sourceType{/* contains filtered or unexported fields */}
	PipelineInDB              = sourceType{/* contains filtered or unexported fields */}
	TaskInDB                  = sourceType{/* contains filtered or unexported fields */}
	StepInDB                  = sourceType{/* contains filtered or unexported fields */}
	UserInDB                  = sourceType{/* contains filtered or unexported fields */}
	UserLinkInDB              = sourceType{/* contains filtered or unexported fields */}
	TemplateSchemaTagInDB     = sourceType{/* contains filtered or unexported fields */}
	TemplateInDB              = sourceType{/* contains filtered or unexported fields */}
	TemplateReleaseInDB       = sourceType{/* contains filtered or unexported fields */}
	TemplateReleaseInRepo     = sourceType{/* contains filtered or unexported fields */}
	MemberInfoInDB            = sourceType{/* contains filtered or unexported fields */}
	ApplicationManifestInArgo = sourceType{/* contains filtered or unexported fields */}
	PodsInK8S                 = sourceType{/* contains filtered or unexported fields */}
	PodLogsInK8S              = sourceType{/* contains filtered or unexported fields */}
	ReplicasSetInK8S          = sourceType{/* contains filtered or unexported fields */}
	DeploymentInK8S           = sourceType{/* contains filtered or unexported fields */}
	ResourceInK8S             = sourceType{/* contains filtered or unexported fields */}
	PodEventInK8S             = sourceType{/* contains filtered or unexported fields */}
	KubeConfigInK8S           = sourceType{/* contains filtered or unexported fields */}
	GroupFullPath             = sourceType{/* contains filtered or unexported fields */}
	IdentityProviderInDB      = sourceType{/* contains filtered or unexported fields */}
	EventInDB                 = sourceType{/* contains filtered or unexported fields */}
	EventCursorInDB           = sourceType{/* contains filtered or unexported fields */}
	WebhookInDB               = sourceType{/* contains filtered or unexported fields */}
	WebhookLogInDB            = sourceType{/* contains filtered or unexported fields */}
	MetatagInDB               = sourceType{/* contains filtered or unexported fields */}
	CheckInDB                 = sourceType{/* contains filtered or unexported fields */}
	CheckRunInDB              = sourceType{/* contains filtered or unexported fields */}
	PRMessageInDB             = sourceType{/* contains filtered or unexported fields */}

	// S3
	PipelinerunLog = sourceType{/* contains filtered or unexported fields */}
	PipelinerunObj = sourceType{/* contains filtered or unexported fields */}

	ArgoCD = sourceType{/* contains filtered or unexported fields */}

	Tekton          = sourceType{/* contains filtered or unexported fields */}
	TektonClient    = sourceType{/* contains filtered or unexported fields */}
	TektonCollector = sourceType{/* contains filtered or unexported fields */}

	HelmRepo  = sourceType{/* contains filtered or unexported fields */}
	OAuthInDB = sourceType{/* contains filtered or unexported fields */}
	TokenInDB = sourceType{/* contains filtered or unexported fields */}
	ChartFile = sourceType{/* contains filtered or unexported fields */}

	// identity provider
	Oauth2Token           = sourceType{/* contains filtered or unexported fields */}
	ProviderFromDiscovery = sourceType{/* contains filtered or unexported fields */}

	StepInWorkload = sourceType{/* contains filtered or unexported fields */}

	EnvValueInGit = sourceType{/* contains filtered or unexported fields */}
)
View Source
var (
	// universal
	ErrWriteFailed             = errors.New("write failed")
	ErrReadFailed              = errors.New("read failed")
	ErrNameConflict            = errors.New("name conflict")
	ErrPathConflict            = errors.New("path conflict")
	ErrPairConflict            = errors.New("entity pair conflict")
	ErrSubResourceExist        = errors.New("sub resource exist")
	ErrNoPrivilege             = errors.New("no privilege")
	ErrParamInvalid            = errors.New("parameter is invalid")
	ErrForbidden               = errors.New("forbidden")
	ErrDeadlineExceeded        = errors.New("time limit exceeded")
	ErrGenerateRandomID        = errors.New("failed to generate random id")
	ErrDisabled                = errors.New("entity is disabled")
	ErrDuplicatedKey           = errors.New("duplicated keys")
	ErrMutatingFailed          = errors.New("mutating failed")
	ErrValidatingFailed        = errors.New("validating failed")
	ErrUnsupportedResourceType = errors.New("unsupported resource type")

	// http
	ErrHTTPRespNotAsExpected = errors.New("http response is not as expected")
	ErrHTTPRequestFailed     = errors.New("http request failed")

	// cluster
	ErrClusterNoChange                 = errors.New("no change to cluster")
	ErrShouldBuildDeployFirst          = errors.New("clusters with build config should build and deploy first")
	ErrBuildDeployNotSupported         = errors.New("builddeploy is not supported for this cluster")
	ErrFreedClusterNotSupportedRestart = errors.New("freed cluster is not supported to restart")

	// context
	ErrFailedToGetORM       = errors.New("cannot get the ORM from context")
	ErrFailedToGetUser      = errors.New("cannot get user from context")
	ErrFailedToGetRequestID = errors.New("cannot get the requestID from context")
	ErrFailedToGetJWTToken  = errors.New("cannot get the jwt token from context")

	ErrKubeDynamicCliResponseNotOK = errors.New("response for kube dynamic cli is not 200 OK")
	ErrKubeExecFailed              = errors.New("kube exec failed")

	// S3
	ErrS3SignFailed   = errors.New("s3 sign failed")
	ErrS3PutObjFailed = errors.New("s3 put obj failed")
	ErrS3GetObjFailed = errors.New("s3 get obj failed")

	ErrGitlabInternal              = errors.New("gitlab internal")
	ErrGitlabMRNotReady            = errors.New("gitlab mr is not ready and cannot be merged")
	ErrGitlabResourceNotFound      = errors.New("gitlab resource not found")
	ErrGitLabDefaultBranchNotMatch = errors.New("gitlab default branch do not match")

	// git
	ErrBranchAndCommitEmpty      = errors.New("branch and commit cannot be empty at the same time")
	ErrGitlabInterfaceCallFailed = errors.New("failed to call gitlab interface")

	// pipeline
	ErrPipelineOutputEmpty = errors.New("pipeline output is empty")

	// restart
	ErrRestartFileEmpty = errors.New("restart file is empty")

	// tekton
	ErrTektonInternal = errors.New("tekton internal error")

	// helm
	ErrLoadChartArchive = errors.New("failed to load archive")

	// group
	// ErrHasChildren used when delete a group which still has some children
	ErrGroupHasChildren = errors.New("children exist, cannot be deleted")
	// ErrConflictWithApplication conflict with the application
	ErrGroupConflictWithApplication = errors.New("name or path is in conflict with application")

	// ErrOAuthSecretNotFound oauth clientid secret was not valid
	ErrOAuthSecretNotValid = errors.New("secret not valid")

	// ErrOAuthCodeExpired oauth authorization code  or access token expire
	ErrOAuthCodeExpired            = errors.New("code expired")
	ErrOAuthAccessTokenExpired     = errors.New("access token expired")
	ErrOAuthRefreshTokenExpired    = errors.New("refresh token expired")
	ErrOAuthReqNotValid            = errors.New("oauth request not valid")
	ErrOAuthInternal               = errors.New("oauth internal error")
	ErrAuthorizationHeaderNotFound = errors.New("AuthorizationHeader not found")
	ErrOAuthTokenFormatError       = errors.New("Oauth token format error")
	ErrOAuthNotGroupOwnerType      = errors.New("not group oauth app")

	// ErrRegistryUsedByRegions used when deleting a registry that is still used by regions
	ErrRegistryUsedByRegions = errors.New("cannot delete a registry when used by regions")

	// ErrRegionUsedByClusters used when deleting a region that is still used by clusters
	ErrRegionUsedByClusters        = errors.New("cannot delete a region when used by clusters")
	ErrPipelineOutPut              = errors.New("pipeline output is not valid")
	ErrTemplateParamInvalid        = errors.New("parameters of template are invalid")
	ErrTemplateReleaseParamInvalid = errors.New("parameters of release are invalid")
	ErrAPIServerResponseNotOK      = errors.New("response for api-server is not 200 OK")
	ErrListGrafanaDashboard        = errors.New("List grafana dashboards error")

	// event
	ErrEventHandlerAlreadyExist = errors.New("event handler already exist")

	ErrSessionNotFound   = errors.New("session not found")
	ErrSessionSaveFailed = errors.New("failed to save session")

	ErrMethodNotImplemented = errors.New("method not implemented")
	ErrTopResourceNotFound  = errors.New("top resource in resource tree not found")

	ErrNotSupport = errors.New("not support")

	// token
	ErrTokenInvalid = errors.New("token is invalid")
)

Functions

func NewErrCreateFailed

func NewErrCreateFailed(source sourceType, msg string) error

func NewErrDeleteFailed

func NewErrDeleteFailed(source sourceType, msg string) error

func NewErrGetFailed

func NewErrGetFailed(source sourceType, msg string) error

func NewErrInsertFailed

func NewErrInsertFailed(source sourceType, msg string) error

func NewErrListFailed

func NewErrListFailed(source sourceType, msg string) error

func NewErrNotFound

func NewErrNotFound(source sourceType, msg string) error

func NewErrUpdateFailed

func NewErrUpdateFailed(source sourceType, msg string) error

Types

type HorizonErrCreateFailed

type HorizonErrCreateFailed struct {
	Source sourceType
}

func (*HorizonErrCreateFailed) Error

func (e *HorizonErrCreateFailed) Error() string

type HorizonErrDeleteFailed

type HorizonErrDeleteFailed struct {
	Source sourceType
}

func (*HorizonErrDeleteFailed) Error

func (e *HorizonErrDeleteFailed) Error() string

type HorizonErrGetFailed

type HorizonErrGetFailed struct {
	Source sourceType
}

func (*HorizonErrGetFailed) Error

func (e *HorizonErrGetFailed) Error() string

type HorizonErrInsertFailed

type HorizonErrInsertFailed struct {
	Source sourceType
}

func (*HorizonErrInsertFailed) Error

func (e *HorizonErrInsertFailed) Error() string

type HorizonErrListFailed

type HorizonErrListFailed struct {
	Source sourceType
}

func (*HorizonErrListFailed) Error

func (e *HorizonErrListFailed) Error() string

type HorizonErrNotFound

type HorizonErrNotFound struct {
	Source sourceType
}

func (*HorizonErrNotFound) Error

func (e *HorizonErrNotFound) Error() string

type HorizonErrUpdateFailed

type HorizonErrUpdateFailed struct {
	Source sourceType
}

func (*HorizonErrUpdateFailed) Error

func (e *HorizonErrUpdateFailed) Error() string

Jump to

Keyboard shortcuts

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