Documentation ¶
Index ¶
- func AttributeValuetoStr(av interface{}) (string, error)
- func GenerateNewID() string
- func GetErrorMessage(err interface{}) string
- func GetErrorType(err interface{}) string
- func GetEventTypeFromContext(ctx context.Context) interface{}
- func GetPid() string
- func GetStringFieldFromValue(value reflect.Value, fieldName string) (string, bool)
- func GetThisProcess() *process.Process
- func GetTimestamp() int64
- func IsTimeout(err interface{}) bool
- func MarshalJSON(av AttributeValue) ([]byte, error)
- func MsToTime(t int64) time.Time
- func SetEventTypeToContext(ctx context.Context, et reflect.Type) context.Context
- func SetSpanError(span opentracing.Span, err interface{})
- func TimeToMs(t time.Time) int64
- type AttributeValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttributeValuetoStr ¶
AttributeValuetoStr returns string representation of an attribute value
func GetErrorMessage ¶
func GetErrorMessage(err interface{}) string
GetErrorMessage returns error message
func GetErrorType ¶
func GetErrorType(err interface{}) string
GetErrorType returns type of the error
func GetEventTypeFromContext ¶
GetEventTypeFromContext returns event type passed in context
func GetStringFieldFromValue ¶
func GetThisProcess ¶
GetThisProcess returns process info about this process.
func IsTimeout ¶
func IsTimeout(err interface{}) bool
IsTimeout returns whether or not an err is a timeout error
func MarshalJSON ¶
func MarshalJSON(av AttributeValue) ([]byte, error)
MarshalJSON implements custom marshaling for AttributeValue
func SetEventTypeToContext ¶
SetEventTypeToContext returns a context with event type value
func SetSpanError ¶
func SetSpanError(span opentracing.Span, err interface{})
SetSpanError sets the tags related to the given error to the given span
Types ¶
type AttributeValue ¶
type AttributeValue struct { B []byte `type:"blob" json:",omitempty"` BOOL *bool `type:"boolean" json:",omitempty"` BS [][]byte `type:"list" json:",omitempty"` L []*AttributeValue `type:"list" json:",omitempty"` M *map[string]*AttributeValue `type:"map" json:",omitempty"` N *string `type:"string" json:",omitempty"` NS []*string `type:"list" json:",omitempty"` NULL *bool `type:"boolean" json:",omitempty"` S *string `type:"string" json:"S,omitempty"` SS []*string `type:"list" json:",omitempty"` }
AttributeValue is a struct for marshalling dynamodb attribute value without null fields
Click to show internal directories.
Click to hide internal directories.