Documentation
¶
Index ¶
- Variables
- type APIError
- type APIErrorCredentialServiceUnavailable
- type APIErrorInvalidTOMLFileDetails
- type APIErrorTomlUnknownErrorDetails
- type APIErrorTomlValidationDetails
- type APIErrorUnknownTOMLKeyDetails
- type AgentError
- type BundleID
- type ContentID
- type ContentName
- type ErrorCode
- type ErrorData
- type ErrorTomlUnknownErrorDetails
- type ErrorTomlValidationDetails
- type EventableError
- type GUID
- type Int64Str
- type InvalidTOMLFileDetails
- type NullBool
- type NullBundleID
- type NullContentID
- type NullFloat64
- type NullGUID
- type NullInt32
- type NullInt64
- type NullInt64Str
- type NullString
- type NullTime
- type Operation
- type Optional
- type PrincipalID
- type TaskID
- type Time
- type UnknownTOMLKeyDetails
- type UserID
Constants ¶
This section is empty.
Variables ¶
View Source
var JSON_NULL = []byte("null")
Functions ¶
This section is empty.
Types ¶
type APIError ¶ added in v1.2.0
type APIError interface {
JSONResponse(http.ResponseWriter)
}
type APIErrorCredentialServiceUnavailable ¶ added in v1.2.0
type APIErrorCredentialServiceUnavailable struct {
}func APIErrorCredentialsUnavailableFromAgentError ¶ added in v1.2.0
func APIErrorCredentialsUnavailableFromAgentError(aerr AgentError) APIErrorCredentialServiceUnavailable
func (*APIErrorCredentialServiceUnavailable) JSONResponse ¶ added in v1.2.0
func (apierr *APIErrorCredentialServiceUnavailable) JSONResponse(w http.ResponseWriter)
type APIErrorInvalidTOMLFileDetails ¶ added in v1.2.0
type APIErrorInvalidTOMLFileDetails struct { Code ErrorCode `json:"code"` Details InvalidTOMLFileDetails `json:"details"` }
func APIErrorInvalidTOMLFileFromAgentError ¶ added in v1.2.0
func APIErrorInvalidTOMLFileFromAgentError(aerr AgentError) APIErrorInvalidTOMLFileDetails
func (*APIErrorInvalidTOMLFileDetails) Error ¶ added in v1.2.0
func (apierr *APIErrorInvalidTOMLFileDetails) Error() string
func (*APIErrorInvalidTOMLFileDetails) JSONResponse ¶ added in v1.2.0
func (apierr *APIErrorInvalidTOMLFileDetails) JSONResponse(w http.ResponseWriter)
type APIErrorTomlUnknownErrorDetails ¶ added in v1.2.0
type APIErrorTomlUnknownErrorDetails struct { Code ErrorCode `json:"code"` Details ErrorTomlUnknownErrorDetails `json:"details"` }
func APIErrorTomlUnknownErrorFromAgentError ¶ added in v1.2.0
func APIErrorTomlUnknownErrorFromAgentError(aerr AgentError, configPath string) APIErrorTomlUnknownErrorDetails
func (*APIErrorTomlUnknownErrorDetails) Error ¶ added in v1.2.0
func (apierr *APIErrorTomlUnknownErrorDetails) Error() string
func (*APIErrorTomlUnknownErrorDetails) JSONResponse ¶ added in v1.2.0
func (apierr *APIErrorTomlUnknownErrorDetails) JSONResponse(w http.ResponseWriter)
type APIErrorTomlValidationDetails ¶ added in v1.2.0
type APIErrorTomlValidationDetails struct { Code ErrorCode `json:"code"` Details ErrorTomlValidationDetails `json:"details"` }
func APIErrorTomlValidationFromAgentError ¶ added in v1.2.0
func APIErrorTomlValidationFromAgentError(aerr AgentError, configPath string) APIErrorTomlValidationDetails
func (*APIErrorTomlValidationDetails) Error ¶ added in v1.2.0
func (apierr *APIErrorTomlValidationDetails) Error() string
func (*APIErrorTomlValidationDetails) JSONResponse ¶ added in v1.2.0
func (apierr *APIErrorTomlValidationDetails) JSONResponse(w http.ResponseWriter)
type APIErrorUnknownTOMLKeyDetails ¶ added in v1.2.0
type APIErrorUnknownTOMLKeyDetails struct { Code ErrorCode `json:"code"` Details UnknownTOMLKeyDetails `json:"details"` }
func APIErrorUnknownTOMLKeyFromAgentError ¶ added in v1.2.0
func APIErrorUnknownTOMLKeyFromAgentError(aerr AgentError) APIErrorUnknownTOMLKeyDetails
func (*APIErrorUnknownTOMLKeyDetails) Error ¶ added in v1.2.0
func (apierr *APIErrorUnknownTOMLKeyDetails) Error() string
func (*APIErrorUnknownTOMLKeyDetails) JSONResponse ¶ added in v1.2.0
func (apierr *APIErrorUnknownTOMLKeyDetails) JSONResponse(w http.ResponseWriter)
type AgentError ¶
type AgentError struct { Code ErrorCode `json:"code" toml:"code"` Err error `json:"-" toml:"-"` Message string `json:"msg" toml:"message"` Op Operation `json:"operation" toml:"operation"` Data ErrorData `json:"data" toml:"data,omitempty"` }
func AsAgentError ¶
func AsAgentError(e error) *AgentError
func IsAgentError ¶ added in v1.2.0
func IsAgentError(err error) (*AgentError, bool)
Evaluate if a given error is an AgentError returning the error as AgentError type when it is and a bool flag of the comparison result.
func NewAgentError ¶
func NewAgentError(code ErrorCode, err error, details any) *AgentError
func (*AgentError) Error ¶
func (e *AgentError) Error() string
func (*AgentError) GetCode ¶
func (e *AgentError) GetCode() ErrorCode
func (*AgentError) GetData ¶
func (e *AgentError) GetData() ErrorData
func (*AgentError) GetOperation ¶
func (e *AgentError) GetOperation() Operation
func (*AgentError) SetOperation ¶
func (e *AgentError) SetOperation(op Operation)
type ContentName ¶
type ContentName string
type ErrorCode ¶
type ErrorCode string
const ( ErrorResourceNotFound ErrorCode = "resourceNotFound" ErrorInvalidTOML ErrorCode = "invalidTOML" ErrorUnknownTOMLKey ErrorCode = "unknownTOMLKey" ErrorInvalidConfigFiles ErrorCode = "invalidConfigFiles" ErrorCertificateVerification ErrorCode = "errorCertificateVerification" ErrorRenvLockPackagesReading ErrorCode = "renvlockPackagesReadingError" ErrorRequirementsFileReading ErrorCode = "requirementsFileReadingError" ErrorDeployedContentNotRunning ErrorCode = "deployedContentNotRunning" ErrorUnknown ErrorCode = "unknown" ErrorTomlValidationError ErrorCode = "tomlValidationError" ErrorTomlUnknownError ErrorCode = "tomlUnknownError" )
type ErrorTomlUnknownErrorDetails ¶ added in v1.2.0
type ErrorTomlUnknownErrorDetails struct { Filename string `json:"filename"` Problem string `json:"problem"` }
ErrorTomlUnknownError
type ErrorTomlValidationDetails ¶ added in v1.2.0
type ErrorTomlValidationDetails struct { Filename string `json:"filename"` Message string `json:"message"` Key string `json:"key"` Problem string `json:"problem"` SchemaReference string `json:"schema-reference"` }
ErrorTomlValidationError
type EventableError ¶
type EventableError interface { error SetOperation(op Operation) // Caller who receives an error calls SetOperation to attach context GetOperation() Operation // Retrieve Operation for serialization GetCode() ErrorCode // Retrieve Code for serialization GetData() ErrorData // Retrieve Data for serialization }
func OperationError ¶
func OperationError(op Operation, err error) EventableError
type InvalidTOMLFileDetails ¶ added in v1.2.0
type NullBundleID ¶
type NullContentID ¶
type NullFloat64 ¶
type NullInt64Str ¶
type NullString ¶
type Optional ¶
type Optional[T any] struct { // contains filtered or unexported fields }
func NewOptional ¶
func (Optional[T]) MarshalJSON ¶
func (*Optional[T]) UnmarshalJSON ¶
type PrincipalID ¶
type PrincipalID string
type UnknownTOMLKeyDetails ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.