service

package
v0.4.7-alpha13 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: Apache-2.0 Imports: 20 Imported by: ? modules, 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

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

func NewActionServiceWS

func NewActionServiceWS(actionTypeService *ActionTypeService) *ActionServiceWS

func (*ActionServiceWS) Start

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

func (*ActionServiceWS) Subscribe

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

func (*ActionServiceWS) Trigger

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

func (*ActionServiceWS) Unsubscribe

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

type ActionTypeService

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

func NewActionTypeService

func NewActionTypeService(repository *repository.Repository) *ActionTypeService

func (*ActionTypeService) GetActionType

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

func (*ActionTypeService) GetActionTypes

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

func (*ActionTypeService) GetActionTypesBySourceID

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

func (*ActionTypeService) RegisterActionType

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

type EventServiceWS

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

func NewEventServiceWS

func NewEventServiceWS(eventTypeService *EventTypeService) *EventServiceWS

func (*EventServiceWS) Publish

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

func (*EventServiceWS) Start

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

func (*EventServiceWS) Subscribe

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

func (*EventServiceWS) Unsubscribe

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

type EventTypeService

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

func NewEventTypeService

func NewEventTypeService(repository *repository.Repository) *EventTypeService

func (*EventTypeService) GetEventType

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

func (*EventTypeService) GetEventTypes

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

func (*EventTypeService) GetEventTypesBySourceID

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

func (*EventTypeService) RegisterEventType

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

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

func NewSocketIOService

func NewSocketIOService() *SocketIOService

func (*SocketIOService) Publish

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

func (*SocketIOService) Server

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

func (*SocketIOService) Start

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