Documentation
¶
Index ¶
- Variables
- type AgentError
- type BundleID
- type ContentID
- type ContentName
- type ErrorCode
- type ErrorData
- type EventableError
- type GUID
- type Int64Str
- 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 UserID
Constants ¶
This section is empty.
Variables ¶
View Source
var JSON_NULL = []byte("null")
Functions ¶
This section is empty.
Types ¶
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 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 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 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
Click to show internal directories.
Click to hide internal directories.