service

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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")
)
View Source
var (
	ErrInboundChannelNotFound     = errors.New("inbound channel not found")
	ErrSubscriberChannelsNotFound = errors.New("subscriber channels not found")
	ErrAlreadySubscribed          = errors.New("already subscribed")
)

Functions

This section is empty.

Types

type ActionServiceWS added in v0.4.2

type ActionServiceWS struct {
	// contains filtered or unexported fields
}

func NewActionServiceWS added in v0.4.2

func NewActionServiceWS(actionTypeService *ActionTypeService) *ActionServiceWS

func (*ActionServiceWS) Start added in v0.4.2

func (s *ActionServiceWS) Start(ctx *context.Context)

func (*ActionServiceWS) Subscribe added in v0.4.2

func (s *ActionServiceWS) Subscribe(sourceID string, names []string) (chan model.Action, error)

func (*ActionServiceWS) Trigger added in v0.4.2

func (s *ActionServiceWS) Trigger(action model.Action)

func (*ActionServiceWS) Unsubscribe added in v0.4.2

func (s *ActionServiceWS) Unsubscribe(sourceID string, name string, c chan model.Action) error

type ActionTypeService added in v0.4.2

type ActionTypeService struct {
	// contains filtered or unexported fields
}

func NewActionTypeService added in v0.4.2

func NewActionTypeService(repository *repository.Repository) *ActionTypeService

func (*ActionTypeService) GetActionType added in v0.4.2

func (s *ActionTypeService) GetActionType(sourceID string, name string) (*model.ActionType, error)

func (*ActionTypeService) GetActionTypes added in v0.4.2

func (s *ActionTypeService) GetActionTypes() ([]model.ActionType, error)

func (*ActionTypeService) GetActionTypesBySourceID added in v0.4.2

func (s *ActionTypeService) GetActionTypesBySourceID(sourceID string) ([]model.ActionType, error)

func (*ActionTypeService) RegisterActionType added in v0.4.2

func (s *ActionTypeService) RegisterActionType(actionType model.ActionType) (*model.ActionType, error)

type EventServiceWS added in v0.4.2

type EventServiceWS struct {
	// contains filtered or unexported fields
}

func NewEventServiceWS added in v0.4.2

func NewEventServiceWS(eventTypeService *EventTypeService) *EventServiceWS

func (*EventServiceWS) Publish added in v0.4.2

func (s *EventServiceWS) Publish(event model.Event)

func (*EventServiceWS) Start added in v0.4.2

func (s *EventServiceWS) Start(ctx *context.Context)

func (*EventServiceWS) Subscribe added in v0.4.2

func (s *EventServiceWS) Subscribe(sourceID string, names []string) (chan model.Event, error)

func (*EventServiceWS) Unsubscribe added in v0.4.2

func (s *EventServiceWS) Unsubscribe(sourceID string, name string, c chan model.Event) error

type EventTypeService added in v0.4.2

type EventTypeService struct {
	// contains filtered or unexported fields
}

func NewEventTypeService added in v0.4.2

func NewEventTypeService(repository *repository.Repository) *EventTypeService

func (*EventTypeService) GetEventType added in v0.4.2

func (s *EventTypeService) GetEventType(sourceID string, name string) (*model.EventType, error)

func (*EventTypeService) GetEventTypes added in v0.4.2

func (s *EventTypeService) GetEventTypes() ([]model.EventType, error)

func (*EventTypeService) GetEventTypesBySourceID added in v0.4.2

func (s *EventTypeService) GetEventTypesBySourceID(sourceID string) ([]model.EventType, error)

func (*EventTypeService) RegisterEventType added in v0.4.2

func (s *EventTypeService) RegisterEventType(eventType model.EventType) (*model.EventType, error)

type MessageBus

type MessageBus struct{}

func NewMessageBus

func NewMessageBus() *MessageBus

type Services

type Services struct {
	EventTypeService *EventTypeService
	EventServiceWS   *EventServiceWS

	ActionTypeService *ActionTypeService
	ActionServiceWS   *ActionServiceWS

	SocketIOService *SocketIOService
}

func NewServices

func NewServices(repository *repository.Repository) Services

func (*Services) Start

func (s *Services) Start(ctx *context.Context)

type SocketIOService added in v0.4.2

type SocketIOService struct {
	// contains filtered or unexported fields
}

func NewSocketIOService added in v0.4.2

func NewSocketIOService() *SocketIOService

func (*SocketIOService) Publish added in v0.4.2

func (s *SocketIOService) Publish(message interface{})

func (*SocketIOService) Server added in v0.4.2

func (s *SocketIOService) Server() *socketio.Server

func (*SocketIOService) Start added in v0.4.2

func (s *SocketIOService) Start(ctx *context.Context)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL