app

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUpdates

func CheckUpdates(version string, configFile string, logger *zap.Logger) error

func EventsEmit

func EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})

func GetAppDirectory

func GetAppDirectory() (string, error)

func HeadlessContext

func HeadlessContext() context.Context

func IsHeadless

func IsHeadless(ctx context.Context) bool

Types

type App

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

App application struct

func NewApp

func NewApp(cfgPath string, version string, logger *zap.Logger) *App

NewApp creates a new App application struct

func (*App) DomReady

func (b *App) DomReady(ctx context.Context)

DomReady is called after the front-end dom has been loaded

func (*App) Initialize

func (b *App) Initialize() error

Initialize is called before the application is started

func (*App) Shutdown

func (b *App) Shutdown(ctx context.Context)

Shutdown is called at application termination

func (*App) Startup

func (b *App) Startup(ctx context.Context)

Startup is called at application startup

type Bindings

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

func GetBindings

func GetBindings(app *App) *Bindings

func (*Bindings) AddPlugin

func (b *Bindings) AddPlugin(name string, url string) error

func (*Bindings) GetAPIURL

func (b *Bindings) GetAPIURL() string

func (*Bindings) GetAPIVersion

func (b *Bindings) GetAPIVersion() string

func (*Bindings) GetAppDirectory

func (b *Bindings) GetAppDirectory() string

func (*Bindings) GetConfig

func (b *Bindings) GetConfig() config.Config

func (*Bindings) GetPlugins

func (b *Bindings) GetPlugins() map[string]handlers.PluginInfo

func (*Bindings) GetStreams

func (b *Bindings) GetStreams() []StreamInfo

func (*Bindings) GetVersion

func (b *Bindings) GetVersion() string

func (*Bindings) OpenAppDirectory

func (b *Bindings) OpenAppDirectory()

func (*Bindings) RemovePlugin

func (b *Bindings) RemovePlugin(name string) error

func (*Bindings) WaitForStartup

func (b *Bindings) WaitForStartup()

type EventWatcher

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

EventWatcher emits app events whenever events are triggered

func NewEventWatcher

func NewEventWatcher(
	streamEventSource models.StreamEventSource,
	configProvider *config.Provider,
	authHandler *handlers.Auth,
	ctx context.Context,
	logger *zap.Logger,
) *EventWatcher

NewEventWatcher returns a new EventWatcher

func (*EventWatcher) Serve

func (s *EventWatcher) Serve()

Serve runs the service for the app event watcher

func (*EventWatcher) Stop

func (s *EventWatcher) Stop()

Stop will shutdown this service and wait on it to stop before returning.

type StreamInfo

type StreamInfo struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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