service

package
v0.0.0-...-cdffa6e Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer() *gin.Engine

Types

type AmqpDispatcher

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

func NewAmqpDispatcher

func NewAmqpDispatcher(publishChanel queuePublishableChanel, queueName string, mandatorySend bool) *AmqpDispatcher

func (*AmqpDispatcher) DispatchMessage

func (q *AmqpDispatcher) DispatchMessage(message interface{}) (err error)

type Handlers

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

func NewHandlers

func NewHandlers(dispatch queueDispatcher) *Handlers

func (*Handlers) AddAlertCommand

func (h *Handlers) AddAlertCommand(ctx *gin.Context)

func (*Handlers) AddPositionCommand

func (h *Handlers) AddPositionCommand(ctx *gin.Context)

func (*Handlers) AddTelemetryCommand

func (h *Handlers) AddTelemetryCommand(ctx *gin.Context)

type Repository

type Repository struct {
	Client *mongo.Client
}

func NewRepository

func NewRepository() (*Repository, error)

func (*Repository) UpdateLastAlertEvent

func (r *Repository) UpdateLastAlertEvent(event common.AlertSignalledEvent) (err error)

func (*Repository) UpdateLastPositionEvent

func (r *Repository) UpdateLastPositionEvent(event common.PositionChangedEvent) (err error)

func (*Repository) UpdateLastTelemetryEvent

func (r *Repository) UpdateLastTelemetryEvent(event common.TelemetryUpdatedEvent) (err error)

Jump to

Keyboard shortcuts

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