service

package
v0.4.7-alpha7 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

	YSKService *YSKService
}

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)

type YSKService

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

func NewYSKService

func NewYSKService(
	repository *repository.Repository,
	ws *EventServiceWS,
	ets *EventTypeService,
) *YSKService

func (*YSKService) DeleteYSKCard

func (s *YSKService) DeleteYSKCard(ctx context.Context, id string) error

func (*YSKService) Start

func (s *YSKService) Start(init bool)

func (*YSKService) UpsertYSKCard

func (s *YSKService) UpsertYSKCard(ctx context.Context, yskCard ysk.YSKCard) error

func (*YSKService) YskCardList

func (s *YSKService) YskCardList(ctx context.Context) ([]ysk.YSKCard, error)

Jump to

Keyboard shortcuts

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