Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DebugMessage ¶
type DebugMessage struct { Operation string `json:"operation,omitempty"` Command string `json:"job,omitempty"` Err string `json:"error"` }
DebugMessage is a generic message structure for unsuccessful operations.
func (DebugMessage) JSON ¶
func (d DebugMessage) JSON() string
JSON is the JSON representation of ErrorMessage.
func (DebugMessage) String ¶
func (d DebugMessage) String() string
String is the string representation of ErrorMessage.
type ErrorMessage ¶
type ErrorMessage struct { Operation string `json:"operation,omitempty"` Command string `json:"command,omitempty"` Err string `json:"error"` }
ErrorMessage is a generic message structure for unsuccessful operations.
func (ErrorMessage) JSON ¶
func (e ErrorMessage) JSON() string
JSON is the JSON representation of ErrorMessage.
func (ErrorMessage) String ¶
func (e ErrorMessage) String() string
String is the string representation of ErrorMessage.
type InfoMessage ¶
type InfoMessage struct { Operation string `json:"operation"` Success bool `json:"success"` Source *url.URL `json:"source"` Destination *url.URL `json:"destination,omitempty"` Object Message `json:"object,omitempty"` }
InfoMessage is a generic message structure for successful operations.
func (InfoMessage) JSON ¶
func (i InfoMessage) JSON() string
JSON is the JSON representation of InfoMessage.
func (InfoMessage) String ¶
func (i InfoMessage) String() string
String is the string representation of InfoMessage.
type LogLevel ¶
type LogLevel int
LogLevel is the level of Logger.
func LevelFromString ¶
LevelFromString returns logLevel for given string. It return `levelInfo` as a default.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a structure for logging messages.
type TraceMessage ¶
type TraceMessage struct {
Message string `json:"message"`
}
func (TraceMessage) JSON ¶
func (t TraceMessage) JSON() string
func (TraceMessage) String ¶
func (t TraceMessage) String() string