Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
func Decode(f mapstructure.DecodeHookFunc, data *map[string]interface{}, e interface{}) (interface{}, error)
func PasswordHook ¶
func PasswordHook() mapstructure.DecodeHookFunc
PasswordHook is used because the password []byte data type is encoded to base64 string by json.Marshal so we need to decode it back to base64 https://golang.org/pkg/encoding/json/#Marshal
func TimeHook ¶
func TimeHook(layout string) mapstructure.DecodeHookFunc
func UIDHook ¶
func UIDHook() mapstructure.DecodeHookFunc
Types ¶
type EventWrapper ¶
type EventWrapper struct { EventName string EventData interface{} }
EventWrapper is used to wrap the event interface with its struct name, so it will be easier to unmarshal later.
type UserEventWrapper ¶
type UserEventWrapper EventWrapper
func (*UserEventWrapper) UnmarshalJSON ¶
func (w *UserEventWrapper) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.