Documentation ¶
Index ¶
- Constants
- type AppEventOpt
- type ApplicationEvent
- func (a *ApplicationEvent) AddAdditionData(key string, value interface{})
- func (a *ApplicationEvent) DeleteAdditionData(key string)
- func (a ApplicationEvent) Identifier() string
- func (a ApplicationEvent) Name() string
- func (a ApplicationEvent) Payload() interface{}
- func (a ApplicationEvent) String() string
- func (a ApplicationEvent) ToString(obj interface{}) string
- type LogProperties
- type Properties
Constants ¶
View Source
const DefaultEventSource = "not_used"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppEventOpt ¶
type AppEventOpt func(event *ApplicationEvent)
func WithAdditionalData ¶
func WithAdditionalData(additionalData map[string]interface{}) AppEventOpt
func WithId ¶
func WithId(id string) AppEventOpt
func WithPayload ¶
func WithPayload(payload interface{}) AppEventOpt
func WithServiceCode ¶
func WithServiceCode(serviceCode string) AppEventOpt
func WithSource ¶
func WithSource(source string) AppEventOpt
type ApplicationEvent ¶
type ApplicationEvent struct { Id string `json:"id"` Event string `json:"event"` Source string `json:"source"` ServiceCode string `json:"service_code"` AdditionalData map[string]interface{} `json:"additional_data,omitempty"` PayloadData interface{} `json:"payload"` Timestamp int64 `json:"timestamp"` }
func NewApplicationEvent ¶
func NewApplicationEvent(name string, options ...AppEventOpt) *ApplicationEvent
func (*ApplicationEvent) AddAdditionData ¶
func (a *ApplicationEvent) AddAdditionData(key string, value interface{})
func (*ApplicationEvent) DeleteAdditionData ¶
func (a *ApplicationEvent) DeleteAdditionData(key string)
func (ApplicationEvent) Identifier ¶
func (a ApplicationEvent) Identifier() string
func (ApplicationEvent) Name ¶
func (a ApplicationEvent) Name() string
func (ApplicationEvent) Payload ¶
func (a ApplicationEvent) Payload() interface{}
func (ApplicationEvent) String ¶
func (a ApplicationEvent) String() string
func (ApplicationEvent) ToString ¶
func (a ApplicationEvent) ToString(obj interface{}) string
type LogProperties ¶
type LogProperties struct {
NotLogPayloadForEvents []string
}
type Properties ¶
type Properties struct { ChannelSize int `default:"10"` Log LogProperties }
func NewProperties ¶
func NewProperties(loader config.Loader) (*Properties, error)
func (Properties) Prefix ¶
func (p Properties) Prefix() string
Click to show internal directories.
Click to hide internal directories.