camera

package
v0.0.0-...-9604f65 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DefaulCaptureFlags = ""
View Source
const ItemBucket = storage.CameraItemBucket

Variables

View Source
var Default = Config{
	ImageDirectory: "/var/lib/reef-pi/images",
	TickInterval:   120,
	Motion: MotionConfig{
		URL:    "http://localhost:8081",
		Width:  800,
		Height: 600,
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Enable         bool          `json:"enable"`
	ImageDirectory string        `json:"image_directory"`
	CaptureFlags   string        `json:"capture_flags"`
	TickInterval   time.Duration `json:"tick_interval"`
	Upload         bool          `json:"upload"`
	Motion         MotionConfig  `json:"motion"`
}

swagger:model cameraConfig

type Controller

type Controller struct {
	DevMode bool
	// contains filtered or unexported fields
}

func New

func New(devMode bool, c controller.Controller) (*Controller, error)

func (*Controller) Capture

func (c *Controller) Capture() (string, error)

func (*Controller) GetEntity

func (c *Controller) GetEntity(id string) (controller.Entity, error)

func (*Controller) InUse

func (c *Controller) InUse(_, _ string) ([]string, error)

func (*Controller) List

func (c *Controller) List() ([]ImageItem, error)

func (*Controller) LoadAPI

func (c *Controller) LoadAPI(r *mux.Router)

func (*Controller) On

func (c *Controller) On(id string, b bool) error

func (*Controller) Process

func (c *Controller) Process(name string) error

func (*Controller) Setup

func (c *Controller) Setup() error

func (*Controller) Start

func (c *Controller) Start()

func (*Controller) Stop

func (c *Controller) Stop()

type ImageItem

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

type MotionConfig

type MotionConfig struct {
	Enable bool   `json:"enable"`
	URL    string `json:"url"`
	Width  int    `json:"width"`
	Height int    `json:"height"`
}

Jump to

Keyboard shortcuts

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