services

package
v0.0.0-...-c01a966 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Address        = "address"
	Port           = "port"
	TLSCertFile    = "tls_cert_file"
	TLSKeyFile     = "tls_key_file"
	FCMServerKey   = "fcm_server_key"
	PublicKeyFile  = "public_key_file"
	PrivateKeyFile = "private_key_file"
)
View Source
const MinPingInterval = 0

Variables

View Source
var (
	NoMatchingMessage  = errors.New("could not find a message that match")
	NoUUIDForPublicKey = errors.New("no uuid for public key found")
	UUIDsDoesNotMatch  = errors.New("the given uuid does not match the stored one")
)
View Source
var (
	InvalidSubProtocols = errors.New("invalid subprotocols")
	InvalidPingInterval = errors.New("invalid ping interval, shall be greater than 0")
	InvalidKey          = errors.New("invalid key")
	NoRoomInitiated     = errors.New("no room was initiated")
)

Functions

This section is empty.

Types

type AddDeviceService

type AddDeviceService interface {
	OnAddDeviceMessage(connection *websocket.Conn, message []byte) error
}

func NewAddDeviceServiceImpl

func NewAddDeviceServiceImpl(
	keyPairStorage ports.KeyPairStorage,
	deviceTokenRepository ports.DeviceTokenRepository,
) AddDeviceService

type AddDeviceServiceImpl

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

func (*AddDeviceServiceImpl) OnAddDeviceMessage

func (a *AddDeviceServiceImpl) OnAddDeviceMessage(connection *websocket.Conn, message []byte) error

type FlagService

type FlagService interface {
	String(key string) string
	Int(key string) int
}

func NewFlagServiceImpl

func NewFlagServiceImpl() FlagService

type FlagServiceImpl

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

func (*FlagServiceImpl) Int

func (i *FlagServiceImpl) Int(key string) int

func (*FlagServiceImpl) String

func (i *FlagServiceImpl) String(key string) string

type SaltyRTCService

type SaltyRTCService interface {
	OnClientConnect(initiatorsPublicKey values.Key, connection *websocket.Conn) (*models.Client, error)
	OnMessage(initiatorsPublicKey values.Key, client *models.Client, message []byte) error
}

type SaltyRTCServiceImpl

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

func NewSaltyRTCServiceImpl

func NewSaltyRTCServiceImpl(
	keyPairStorage ports.KeyPairStorage,
	notificationService ports.NotificationService,
	deviceTokenRepository ports.DeviceTokenRepository,
) *SaltyRTCServiceImpl

func (*SaltyRTCServiceImpl) OnClientConnect

func (s *SaltyRTCServiceImpl) OnClientConnect(
	initiatorsPublicKey values.Key,
	connection *websocket.Conn,
) (*models.Client, error)

func (*SaltyRTCServiceImpl) OnMessage

func (s *SaltyRTCServiceImpl) OnMessage(initiatorsPublicKey values.Key, client *models.Client, message []byte) error

func (*SaltyRTCServiceImpl) ReadMessageLoop

func (s *SaltyRTCServiceImpl) ReadMessageLoop(initiatorsPublicKey values.Key, client *models.Client)

Jump to

Keyboard shortcuts

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