Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
 - type APIError
 - type APIErrorCredentialServiceUnavailable
 - type APIErrorCredentialsBackupFileError
 - type APIErrorCredentialsCorrupted
 - type APIErrorDeviceAuth
 - type APIErrorInvalidTOMLFileDetails
 - type APIErrorPythonExecNotFound
 - type APIErrorTomlUnknownErrorDetails
 - type APIErrorTomlValidationDetails
 - type APIErrorUnknownTOMLKeyDetails
 - type AgentError
 - type BundleID
 - type CloudAuthToken
 - type CloudEnvironment
 - type ContentID
 - type ContentName
 - type Environment
 - type ErrorCode
 - type ErrorCredentialsCannotBackupFileDetails
 - type ErrorData
 - type ErrorTomlUnknownErrorDetails
 - type ErrorTomlValidationDetails
 - type ErrorTomlValidationDetailsSubError
 - 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 APIErrorCredentialsBackupFileError ¶ added in v1.8.0
type APIErrorCredentialsBackupFileError struct {
	Code    ErrorCode                               `json:"code"`
	Details ErrorCredentialsCannotBackupFileDetails `json:"details"`
}
    func APIErrorCredentialsBackupFileFromAgentError ¶ added in v1.8.0
func APIErrorCredentialsBackupFileFromAgentError(aerr AgentError) APIErrorCredentialsBackupFileError
func (*APIErrorCredentialsBackupFileError) JSONResponse ¶ added in v1.8.0
func (apierr *APIErrorCredentialsBackupFileError) JSONResponse(w http.ResponseWriter)
type APIErrorCredentialsCorrupted ¶ added in v1.8.0
type APIErrorCredentialsCorrupted struct {
	Code ErrorCode `json:"code"`
}
    func APIErrorCredentialsCorruptedFromAgentError ¶ added in v1.8.0
func APIErrorCredentialsCorruptedFromAgentError(aerr AgentError) APIErrorCredentialsCorrupted
func (*APIErrorCredentialsCorrupted) JSONResponse ¶ added in v1.8.0
func (apierr *APIErrorCredentialsCorrupted) JSONResponse(w http.ResponseWriter)
type APIErrorDeviceAuth ¶ added in v1.18.1
type APIErrorDeviceAuth struct {
	Code ErrorCode `json:"code"`
}
    func APIErrorDeviceAuthFromAgentError ¶ added in v1.18.1
func APIErrorDeviceAuthFromAgentError(aerr AgentError, log logging.Logger) APIErrorDeviceAuth
func (*APIErrorDeviceAuth) JSONResponse ¶ added in v1.18.1
func (apierr *APIErrorDeviceAuth) 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 APIErrorPythonExecNotFound ¶ added in v1.4.0
type APIErrorPythonExecNotFound struct {
	Code ErrorCode `json:"code"`
}
    func APIErrorPythonExecNotFoundFromAgentError ¶ added in v1.4.0
func APIErrorPythonExecNotFoundFromAgentError(aerr AgentError) APIErrorPythonExecNotFound
func (*APIErrorPythonExecNotFound) JSONResponse ¶ added in v1.4.0
func (apierr *APIErrorPythonExecNotFound) 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 IsAgentErrorOf ¶ added in v1.4.0
func IsAgentErrorOf(err error, code ErrorCode) (*AgentError, bool)
Evaluate if a given error is an AgentError of a specific code 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 CloudAuthToken ¶ added in v1.19.0
type CloudAuthToken string
type CloudEnvironment ¶ added in v1.18.1
type CloudEnvironment string
const ( CloudEnvironmentDevelopment CloudEnvironment = "development" CloudEnvironmentStaging CloudEnvironment = "staging" CloudEnvironmentProduction CloudEnvironment = "production" )
type ContentName ¶
type ContentName string
type Environment ¶ added in v1.4.0
type Environment []string
type ErrorCode ¶
type ErrorCode string
const ( ErrorResourceNotFound ErrorCode = "resourceNotFound" ErrorInvalidTOML ErrorCode = "invalidTOML" ErrorUnknownTOMLKey ErrorCode = "unknownTOMLKey" ErrorInvalidConfigFiles ErrorCode = "invalidConfigFiles" ErrorCredentialsCorrupted ErrorCode = "credentialsCorrupted" ErrorCredentialsCannotBackupFile ErrorCode = "credentialsCannotBackupFile" ErrorCertificateVerification ErrorCode = "errorCertificateVerification" ErrorRenvPackageVersionMismatch ErrorCode = "renvPackageVersionMismatch" ErrorRenvPackageSourceMissing ErrorCode = "renvPackageSourceMissing" ErrorRenvLockPackagesReading ErrorCode = "renvlockPackagesReadingError" ErrorRenvPackageNotInstalled ErrorCode = "renvPackageNotInstalledError" ErrorRenvActionRequired ErrorCode = "renvActionRequiredError" ErrorRequirementsFileReading ErrorCode = "requirementsFileReadingError" ErrorDeployedContentNotRunning ErrorCode = "deployedContentNotRunning" ErrorUnknown ErrorCode = "unknown" ErrorTomlValidationError ErrorCode = "tomlValidationError" ErrorTomlUnknownError ErrorCode = "tomlUnknownError" ErrorPythonExecNotFound ErrorCode = "pythonExecNotFound" ErrorRExecNotFound ErrorCode = "rExecNotFound" ErrorDeviceAuthPending ErrorCode = "deviceAuthPending" ErrorDeviceAuthSlowDown ErrorCode = "deviceAuthSlowDown" ErrorDeviceAuthAccessDenied ErrorCode = "deviceAuthAccessDenied" ErrorDeviceAuthExpiredToken ErrorCode = "deviceAuthExpiredToken" )
type ErrorCredentialsCannotBackupFileDetails ¶ added in v1.8.0
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 ErrorTomlValidationDetailsSubError ¶ added in v1.19.0
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.