Versions in this module Expand all Collapse all v0 v0.0.1 Nov 20, 2023 Changes in this version + var DefaultErrorHandler = func(err error) + var DefaultErrorHandler_notifier = func(pub *Event) func(notifier Notifier, err error) + var InvokeByChannelUuid func(tenant_hash string, channel_uuid string, v []map[string]interface{}) = func(tenant_hash string, channel_uuid string, v []map[string]interface{}) + var InvokeByEventCategory func(tenant_hash string, ec channelv3.EventCategory, v []map[string]interface{}) = func(tenant_hash string, ec channelv3.EventCategory, v []map[string]interface{}) + func HttpMultipartReq(opt *HttpClient_opt, httpclient *http.Client, parts []part) error + func HttpReq(opt *HttpClient_opt, httpclient *http.Client, content_type string, ...) error + func MapString(m map[string]string) string + func OnNotifyAsync(notifier Notifier, factory *MarshalFactory) <-chan NotifierFuture + func ValidNotifier(edge *channelv3.NotifierEdge_option) (err error) + type ChannelConsole struct + func NewChannelConsole(uuid string, opt *channelv2.ConsoleConfig) *ChannelConsole + func (channel *ChannelConsole) Close() + func (channel ChannelConsole) OnNotify(factory *MarshalFactory) error + func (channel ChannelConsole) Property() map[string]string + func (channel ChannelConsole) Type() fmt.Stringer + func (channel ChannelConsole) Uuid() string + type ChannelRabbitMQ struct + func NewChannelRabbitMQ(uuid string, opt *channelv2.RabbitMqConfig) *ChannelRabbitMQ + func (ChannelRabbitMQ) Dial(url string) (*amqp.Connection, *amqp.Channel, error) + func (ChannelRabbitMQ) Publish(opt *channelv2.RabbitMqConfig, ch *amqp.Channel, b []byte) error + func (channel *ChannelRabbitMQ) Close() + func (channel *ChannelRabbitMQ) OnNotify(factory *MarshalFactory) error + func (channel ChannelRabbitMQ) Property() map[string]string + func (channel ChannelRabbitMQ) Type() fmt.Stringer + func (channel ChannelRabbitMQ) Uuid() string + type ChannelSlackhook struct + func NewChannelSlackhook(uuid string, opt *channelv2.SlackhookConfig) *ChannelSlackhook + func (channel *ChannelSlackhook) Close() + func (channel ChannelSlackhook) OnNotify(factory *MarshalFactory) (err error) + func (channel ChannelSlackhook) Property() map[string]string + func (channel ChannelSlackhook) Type() fmt.Stringer + func (channel ChannelSlackhook) Uuid() string + type ChannelWebhook struct + func NewChannelWebhook(uuid string, opt *channelv2.WebhookConfig) *ChannelWebhook + func (channel *ChannelWebhook) Close() + func (channel ChannelWebhook) OnNotify(factory *MarshalFactory) error + func (channel ChannelWebhook) Property() map[string]string + func (channel ChannelWebhook) Type() fmt.Stringer + func (channel ChannelWebhook) Uuid() string + type Event struct + ErrorHandlers HashsetErrorHandlers + NofitierErrorHandlers HashsetNofitierErrorHandler + func NewEvent(db *sql.DB, dialect excute.SqlExcutor) *Event + func (pub *Event) BuildMuxerByChannelUuid(tenant_hash string, channel_uuid string) error + func (pub *Event) BuildMuxerByEventCategory(tenant_hash string, event_category channelv3.EventCategory) (err error) + func (pub *Event) Close() + func (pub *Event) OnError(err error) + func (pub *Event) OnNotifierError(notifier Notifier, err error) + func (pub *Event) SetEventNotifierMuxer(mux EventNotifierMuxer) + func (pub Event) BuildChannelFormatter(channel_uuid string) (err error) + func (pub Event) InvokeByChannelUuid(tenant_hash string, channel_uuid string, v []map[string]interface{}) + func (pub Event) InvokeByEventCategory(tenant_hash string, ec channelv3.EventCategory, v []map[string]interface{}) + type EventNotifierMuxer interface + Close func() + EventPublisher func() Publisher + Formatters func() HashsetFormatter + Notifiers func() HashsetNotifier + Regist func(Publisher) EventNotifierMuxer + Update func([]map[string]interface{}) + type Formatter interface + Format func(map[string]interface{}) (interface{}, error) + Type func() channelv2.FormatType + type Formatter_fields struct + FormatData string + func (format *Formatter_fields) Format(a map[string]interface{}) (interface{}, error) + func (format Formatter_fields) Type() channelv2.FormatType + type Formatter_jq struct + FormatData string + func (format *Formatter_jq) Format(a map[string]interface{}) (interface{}, error) + func (format Formatter_jq) Type() channelv2.FormatType + type HashsetErrorHandlers map[uintptr]func(error) + func (hashset HashsetErrorHandlers) Add(fn ...func(error)) HashsetErrorHandlers + func (hashset HashsetErrorHandlers) OnError(err error) + func (hashset HashsetErrorHandlers) Remove(fn ...func(error)) HashsetErrorHandlers + type HashsetFormatter map[string]Formatter + func (hashset HashsetFormatter) Add(channel_uuid string, formatter Formatter) + func (hashset HashsetFormatter) Remove(channel_uuid string) + type HashsetNofitierErrorHandler map[uintptr]func(Notifier, error) + func (hashset HashsetNofitierErrorHandler) Add(fn ...func(Notifier, error)) HashsetNofitierErrorHandler + func (hashset HashsetNofitierErrorHandler) OnError(notifier Notifier, err error) + func (hashset HashsetNofitierErrorHandler) Remove(fn ...func(error)) HashsetNofitierErrorHandler + type HashsetNotifier map[string]Notifier + func (hashset HashsetNotifier) Add(channel_uuid string, notifier Notifier) + func (hashset HashsetNotifier) Remove(channel_uuid string) + type HttpClient_opt struct + Method string + RequestHeaders map[string]string + RequestTimeout time.Duration + Url string + type ManagedEventNotifierMux struct + func NewManagedEventNotifierMux() *ManagedEventNotifierMux + func (mux *ManagedEventNotifierMux) Close() + func (mux *ManagedEventNotifierMux) EventPublisher() Publisher + func (mux *ManagedEventNotifierMux) Regist(pub Publisher) EventNotifierMuxer + func (mux *ManagedEventNotifierMux) Update(v []map[string]interface{}) + func (mux ManagedEventNotifierMux) Formatters() HashsetFormatter + func (mux ManagedEventNotifierMux) Notifiers() HashsetNotifier + func (mux ManagedEventNotifierMux) OnNotify(v []map[string]interface{}) []error + func (mux ManagedEventNotifierMux) OnNotifyAsync(v []map[string]interface{}) []<-chan NotifierFuture + type MarshalFactory struct + Formatter Formatter + Value map[string]interface{} + func NewMarshalFactory(v map[string]interface{}, format Formatter) *MarshalFactory + func (ms *MarshalFactory) Marshal(mime string) (b []byte, err error) + type Notifier interface + Close func() + OnNotify func(*MarshalFactory) error + Property func() map[string]string + Type func() fmt.Stringer + Uuid func() string + func NotifierFactory(uuid string, mc *channelv3.NotifierEdge_option) (notifier Notifier, err error) + type NotifierFuture struct + Error error + Notifier Notifier + type Publisher interface + Close func() + OnError func(error) + OnNotifierError func(Notifier, error) + SetEventNotifierMuxer func(EventNotifierMuxer)