communication

package
v0.0.0-...-06767ef Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplicationStart

func ApplicationStart(loggedIn bool, idToken string)

ApplicationStart is the application startup welcome communicate

func ApplicationStop

func ApplicationStop()

ApplicationStop is the application startup goodbye communicate

func Debug

func Debug(message string)

Debug is debug level logger

func Error

func Error(message string)

Error is error level logger

func Fatal

func Fatal(message string)

Fatal is fatal level logger, which should cause application to stop

func Info

func Info(message string)

Info is info level logger

func LoadingFailure

func LoadingFailure(tunnelID string, err error)

LoadingFailure is the notification about started loading process being finished with failure

func LoadingStart

func LoadingStart(tunnelID string, loaderMessage string)

LoadingStart is the notification about some loading process being started

func LoadingSuccess

func LoadingSuccess(tunnelID string)

LoadingSuccess is the notification about started loading process being finished successfully

func LoginFailure

func LoginFailure(err error)

LoginFailure is the application login failure communicate

func LoginStart

func LoginStart(deviceCodeSpec authModels.DeviceCodeSpec)

LoginStart is the communicate to notify about login process being started

func LoginSuccess

func LoginSuccess(idToken string)

LoginSuccess is the application success login communicate

func LogoutFailure

func LogoutFailure(err error)

LogoutFailure is the notification logout failure communicate

func LogoutSuccess

func LogoutSuccess()

LogoutSuccess is the notification logout success communicate

func NewVersionAvailable

func NewVersionAvailable(availableVersion string)

NewVersionAvailable is a communicate being sent if new version of the application is available

func SetCommunicationMechanism

func SetCommunicationMechanism(mechanism Mechanism)

SetCommunicationMechanism is communication mechanism switcher

func TunnelDebug

func TunnelDebug(tunnelID string, message string)

TunnelDebug is debug level logger in context of a tunnel

func TunnelError

func TunnelError(tunnelID string, message string)

TunnelError is error level logger in context of a tunnel

func TunnelInfo

func TunnelInfo(tunnelID string, message string)

TunnelInfo is info level logger in context of a tunnel

func TunnelRestart

func TunnelRestart(tunnelID string)

TunnelRestart is the notification about tunnel being restarted

func TunnelStart

func TunnelStart(tunnelID string)

TunnelStart is the notification about tunnel registration success

func TunnelStartFailure

func TunnelStartFailure(tunnelID string, err error)

TunnelStartFailure is the notification about tunnel failing to start

func TunnelStartSuccess

func TunnelStartSuccess(remoteConfig coreModels.RemoteEndpointSpecs, localEndpoint string)

TunnelStartSuccess is the notification about tunnel being started succesfully

func TunnelStopSuccess

func TunnelStopSuccess(tunnelID string)

TunnelStopSuccess is the notification about tunnel being shut down

func TunnelWarn

func TunnelWarn(tunnelID string, message string)

TunnelWarn is warn level logger in context of a tunnel

func Warn

func Warn(message string)

Warn is warn level logger

Types

type Mechanism

type Mechanism interface {
	Debug(message string)
	Info(message string)
	Warn(message string)
	Error(message string)
	Fatal(message string)

	TunnelDebug(tunnelID string, message string)
	TunnelInfo(tunnelID string, message string)
	TunnelWarn(tunnelID string, message string)
	TunnelError(tunnelID string, message string)

	ApplicationStart(loggedIn bool, idToken string)
	ApplicationStop()

	TunnelStart(tunnelID string)

	TunnelStartSuccess(remoteConfig coreModels.RemoteEndpointSpecs, localEndpoint string)
	TunnelStartFailure(tunnelID string, err error)

	TunnelStopSuccess(tunnelID string)

	LoginStart(authModels.DeviceCodeSpec)
	LoginSuccess(idToken string)
	LoginFailure(err error)

	LogoutSuccess()
	LogoutFailure(err error)

	LoadingStart(tunnelID string, loaderMessage string)
	LoadingSuccess(tunnelID string)
	LoadingFailure(tunnelID string, err error)

	NewVersionAvailable(availableVersion string)
}

Mechanism is a type defining interface for loophole communication

func NewStdOutLogger

func NewStdOutLogger() Mechanism

NewStdOutLogger is stdout mechanism constructor

Jump to

Keyboard shortcuts

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