Documentation
¶
Index ¶
- Variables
- type ActionService
- func (s *ActionService) GetActionType(sourceID string, name string) (*model.ActionType, error)
- func (s *ActionService) GetActionTypes() ([]model.ActionType, error)
- func (s *ActionService) GetActionTypesBySourceID(sourceID string) ([]model.ActionType, error)
- func (s *ActionService) RegisterActionType(actionType model.ActionType) (*model.ActionType, error)
- func (s *ActionService) Start(ctx *context.Context)
- func (s *ActionService) Subscribe(sourceID string, names []string) (chan model.Action, error)
- func (s *ActionService) Trigger(action model.Action) (*model.Action, error)
- func (s *ActionService) Unsubscribe(sourceID string, name string, c chan model.Action) error
- type EventService
- func (s *EventService) GetEventType(sourceID string, name string) (*model.EventType, error)
- func (s *EventService) GetEventTypes() ([]model.EventType, error)
- func (s *EventService) GetEventTypesBySourceID(sourceID string) ([]model.EventType, error)
- func (s *EventService) Publish(event model.Event) (*model.Event, error)
- func (s *EventService) RegisterEventType(eventType model.EventType) (*model.EventType, error)
- func (s *EventService) Start(ctx *context.Context)
- func (s *EventService) Subscribe(sourceID string, names []string) (chan model.Event, error)
- func (s *EventService) Unsubscribe(sourceID string, name string, c chan model.Event) error
- type MessageBus
- type Services
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrActionSourceIDNotFound = errors.New("event source id not found") ErrActionNameNotFound = errors.New("event name not found") )
View Source
var ( ErrEventSourceIDNotFound = errors.New("event source id not found") ErrEventNameNotFound = errors.New("event name not found") )
Functions ¶
This section is empty.
Types ¶
type ActionService ¶
type ActionService struct {
// contains filtered or unexported fields
}
func NewActionService ¶
func NewActionService(repository *repository.Repository) *ActionService
func (*ActionService) GetActionType ¶
func (s *ActionService) GetActionType(sourceID string, name string) (*model.ActionType, error)
func (*ActionService) GetActionTypes ¶
func (s *ActionService) GetActionTypes() ([]model.ActionType, error)
func (*ActionService) GetActionTypesBySourceID ¶
func (s *ActionService) GetActionTypesBySourceID(sourceID string) ([]model.ActionType, error)
func (*ActionService) RegisterActionType ¶
func (s *ActionService) RegisterActionType(actionType model.ActionType) (*model.ActionType, error)
func (*ActionService) Start ¶
func (s *ActionService) Start(ctx *context.Context)
func (*ActionService) Unsubscribe ¶
type EventService ¶
type EventService struct {
// contains filtered or unexported fields
}
func NewEventService ¶
func NewEventService(repository *repository.Repository) *EventService
func (*EventService) GetEventType ¶
func (*EventService) GetEventTypes ¶
func (s *EventService) GetEventTypes() ([]model.EventType, error)
func (*EventService) GetEventTypesBySourceID ¶
func (s *EventService) GetEventTypesBySourceID(sourceID string) ([]model.EventType, error)
func (*EventService) RegisterEventType ¶
func (*EventService) Start ¶
func (s *EventService) Start(ctx *context.Context)
func (*EventService) Unsubscribe ¶
type Services ¶
type Services struct { EventService *EventService ActionService *ActionService }
func NewServices ¶
func NewServices(repository *repository.Repository) Services
Click to show internal directories.
Click to hide internal directories.