app

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Opts             Opts
	SessionStore     *session.Store
	BabyStateManager *baby.StateManager
	RestClient       *client.NanitClient
	MQTTConnection   *mqtt.Connection
}

App - application container

func NewApp

func NewApp(opts Opts) *App

NewApp - constructor

func (*App) Run

func (app *App) Run(ctx utils.GracefulContext)

Run - application main loop

type DataDirectories

type DataDirectories struct {
	BaseDir  string
	VideoDir string
	LogDir   string
}

DataDirectories - dictionary of dir paths

type EventPollingOpts

type EventPollingOpts struct {
	Enabled         bool
	PollingInterval time.Duration
	MessageTimeout  time.Duration
}

type NanitCredentials

type NanitCredentials struct {
	Email        string
	Password     string
	RefreshToken string
}

NanitCredentials - user credentials for Nanit account

type Opts

type Opts struct {
	NanitCredentials NanitCredentials
	SessionFile      string
	DataDirectories  DataDirectories
	HTTPEnabled      bool
	MQTT             *mqtt.Opts
	RTMP             *RTMPOpts
	EventPolling     EventPollingOpts
}

Opts - application run options

type RTMPOpts

type RTMPOpts struct {
	// IP:Port of the interface on which we should listen
	ListenAddr string

	// IP:Port under which can Cam reach the RTMP server
	PublicAddr string

	// Path where the cam can reach the RTMP server
	Path string

	// Key for this stream
	Key string
}

RTMPOpts - options for RTMP streaming

Jump to

Keyboard shortcuts

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