Documentation ¶
Index ¶
- func AddSGLOverlays(box Box, plant Plant, meta MetricsMeta, img *bytes.Buffer) (*bytes.Buffer, error)
- func AddSGLOverlaysForFile(box Box, plant Plant, meta MetricsMeta, file string) error
- func DownloadFile(url, dst string) error
- func GETSGLObject(token, url string, obj interface{}) error
- func POSTSGLObject(token, url string, obj interface{}, respObj interface{}) error
- func UploadSGLObject(url string, obj io.Reader, length int64) error
- func UploadSGLObjectFile(url, file string) error
- type Box
- type Boxes
- type Device
- type Devices
- type Feed
- type FeedEntries
- type FeedEntry
- type FeedEntryMeta
- type FeedMedia
- type FeedMedias
- type Feeds
- type GetLedBox
- type MetricsLoader
- type MetricsMeta
- type Object
- type Objects
- type Plant
- type Plants
- type S3FileHolder
- type S3FileHolders
- type S3Path
- type TimeSeries
- type Timelapse
- type TimelapseFrame
- type TimelapseFrameMeta
- type TimelapseFrames
- type Timelapses
- type UserObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSGLOverlays ¶
func AddSGLOverlaysForFile ¶
func AddSGLOverlaysForFile(box Box, plant Plant, meta MetricsMeta, file string) error
func DownloadFile ¶
func GETSGLObject ¶
func POSTSGLObject ¶
func UploadSGLObjectFile ¶
Types ¶
type Box ¶
type Box struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` DeviceID uuid.NullUUID `db:"deviceid" json:"deviceID"` DeviceBox *uint `db:"devicebox,omitempty" json:"deviceBox,omitempty"` FeedID uuid.NullUUID `db:"feedid" json:"feedID"` Name string `db:"name" json:"name"` Settings string `db:"settings" json:"settings"` Deleted bool `db:"deleted" json:"deleted"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
Box -
type Device ¶
type Device struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` Identifier string `db:"identifier" json:"identifier"` Name string `db:"name" json:"name"` IP string `db:"ip" json:"ip"` Mdns string `db:"mdns" json:"mdns"` Deleted bool `db:"deleted" json:"deleted"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
Device -
type Feed ¶
type Feed struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` Name string `db:"name" json:"name"` IsNewsFeed bool `db:"isnewsfeed" json:"isNewsFeed"` Deleted bool `db:"deleted" json:"deleted"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
Feed -
type FeedEntry ¶
type FeedEntry struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` FeedID uuid.UUID `db:"feedid" json:"feedID"` Date time.Time `db:"createdat" json:"date"` Type string `db:"etype" json:"type"` Params string `db:"params" json:"params"` Meta null.String `db:"meta,omitempty" json:"meta,omitempty"` Deleted bool `db:"deleted" json:"deleted"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
FeedEntry -
type FeedEntryMeta ¶
type FeedEntryMeta struct {
MetricsMeta
}
type FeedMedia ¶
type FeedMedia struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` FeedEntryID uuid.UUID `db:"feedentryid" json:"feedEntryID"` FilePath string `db:"filepath" json:"filePath"` ThumbnailPath string `db:"thumbnailpath" json:"thumbnailPath"` Params string `db:"params" json:"params"` Deleted bool `db:"deleted" json:"deleted"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
FeedMedia -
type MetricsLoader ¶
type MetricsMeta ¶
type MetricsMeta struct { Date time.Time `json:"date"` Temperature *TimeSeries `json:"temperature,omitempty"` Humidity *TimeSeries `json:"humidity,omitempty"` VPD *TimeSeries `json:"vpd,omitempty"` Timer *TimeSeries `json:"timer,omitempty"` Dimming *[]TimeSeries `json:"dimming,omitempty"` Ventilation *TimeSeries `json:"ventilation,omitempty"` }
func LoadMetricsMeta ¶
func LoadMetricsMeta(device Device, box Box, from, to time.Time, loader MetricsLoader, getLedBox GetLedBox) MetricsMeta
type Plant ¶
type Plant struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` BoxID uuid.UUID `db:"boxid" json:"boxID"` FeedID uuid.UUID `db:"feedid" json:"feedID"` Name string `db:"name" json:"name"` Single bool `db:"single" json:"single"` // TODO remove this field Public bool `db:"is_public" json:"public"` AlertsEnabled bool `db:"alerts_enabled" json:"alertsEnabled"` Settings string `db:"settings" json:"settings"` Deleted bool `db:"deleted" json:"deleted"` Archived bool `db:"archived" json:"archived"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
Plant -
type S3FileHolder ¶
type S3FileHolders ¶
type S3FileHolders interface {
AsFeedMediasArray() []S3FileHolder
}
type Timelapse ¶
type Timelapse struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` PlantID uuid.UUID `db:"plantid" json:"plantID"` Name string `db:"name" json:"name"` Type string `db:"ttype" json:"type"` Settings string `db:"settings" json:"settings"` Deleted bool `db:"deleted" json:"deleted"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
Timelapse -
type TimelapseFrame ¶
type TimelapseFrame struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` TimelapseID uuid.UUID `db:"timelapseid" json:"timelapseID"` FilePath string `db:"filepath" json:"filePath"` Meta string `db:"meta" json:"meta"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
TimelapseFrame -
func (TimelapseFrame) GetURLs ¶
func (r TimelapseFrame) GetURLs() []S3Path
func (*TimelapseFrame) SetURLs ¶
func (r *TimelapseFrame) SetURLs(paths []string)
type TimelapseFrameMeta ¶
type TimelapseFrameMeta struct {
MetricsMeta
}
Click to show internal directories.
Click to hide internal directories.