Documentation
¶
Overview ¶
Code generated by tools/generate_error_codes.go; DO NOT EDIT.
Index ¶
- Variables
- func New(code errorType, err error, opts ...option) *errSystem
- func WithAPIURL(apiurl string) option
- func WithAttributes(attributes map[string]any) option
- func WithContextMessage(message string) option
- func WithProjectId(projectId string) option
- func WithTraceID(traceID string) option
- func WithUserId(userId string) option
- func WithUserMessage(message string, args ...any) option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDeleteAgents = errorType{ Code: "CLI-0001", Message: "Failed to delete agents", } ErrCreateProject = errorType{ Code: "CLI-0002", Message: "Failed to create project", } ErrAuthenticateUser = errorType{ Code: "CLI-0003", Message: "Unable to authenticate user", } ErrEnvironmentVariablesNotSet = errorType{ Code: "CLI-0004", Message: "Environment variables not set", } ErrApiRequest = errorType{ Code: "CLI-0005", Message: "API request failed", } ErrInvalidConfiguration = errorType{ Code: "CLI-0006", Message: "Invalid configuration", } ErrSaveProject = errorType{ Code: "CLI-0007", Message: "Failed to save project", } ErrDeployProject = errorType{ Code: "CLI-0008", Message: "Failed to deploy project", } ErrUploadProject = errorType{ Code: "CLI-0009", Message: "Failed to upload project", } ErrParseEnvironmentFile = errorType{ Code: "CLI-0010", Message: "Failed to parse environment file", } ErrInvalidCommandFlag = errorType{ Code: "CLI-0011", Message: "Invalid command flag error", } ErrListFilesAndDirectories = errorType{ Code: "CLI-0012", Message: "Failed to list files and directories", } ErrWriteConfigurationFile = errorType{ Code: "CLI-0013", Message: "Failed to write configuration file", } ErrReadConfigurationFile = errorType{ Code: "CLI-0014", Message: "Failed to read configuration file", } ErrCreateDirectory = errorType{ Code: "CLI-0015", Message: "Failed to create directory", } ErrCreateTemporaryFile = errorType{ Code: "CLI-0016", Message: "Failed to create temporary file", } ErrCreateZipFile = errorType{ Code: "CLI-0017", Message: "Failed to create zip file", } ErrOpenFile = errorType{ Code: "CLI-0018", Message: "Failed to open file", } ErrLoadTemplates = errorType{ Code: "CLI-0019", Message: "Failed to load templates", } ErrAuthenticateOtelServer = errorType{ Code: "CLI-0020", Message: "Failed to authenticate with otel server", } ErrInstallDependencies = errorType{ Code: "CLI-0021", Message: "Failed to install dependencies", } ErrImportingProject = errorType{ Code: "CLI-0022", Message: "Error importing project", } ErrEncryptingDeploymentZipFile = errorType{ Code: "CLI-0023", Message: "Error encrypting deployment zip file", } ErrAddingGithubActionWorkflowProject = errorType{ Code: "CLI-0024", Message: "Error adding GitHub Action Workflow to the project", } ErrUpgradeCli = errorType{ Code: "CLI-0025", Message: "Failed to upgrade CLI", } ErrFetchApiKeys = errorType{ Code: "CLI-0026", Message: "Failed to fetch API keys", } ErrCreateApiKey = errorType{ Code: "CLI-0027", Message: "Failed to create API key", } ErrDeleteApiKey = errorType{ Code: "CLI-0028", Message: "Failed to delete API key", } )
View Source
var Version string = "dev"
Functions ¶
func WithAPIURL ¶
func WithAPIURL(apiurl string) option
WithAPIURL allows the API URL to be overridden.
func WithAttributes ¶
WithAttributes adds additional metadata attributes to the error.
func WithContextMessage ¶
func WithContextMessage(message string) option
WithContextMessage adds some internal context that can help with debugging.
func WithProjectId ¶
func WithProjectId(projectId string) option
WithProjectId adds the project ID to the error attributes.
func WithTraceID ¶
func WithTraceID(traceID string) option
WithTraceID adds a trace ID to the error attributes.
func WithUserId ¶
func WithUserId(userId string) option
WithUserId adds the user ID to the error attributes.
func WithUserMessage ¶
WithUserMessage adds a user-friendly message to the error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.