Documentation ¶
Index ¶
- Variables
- func GetActivePlantsForControllerIdentifier(controllerID string, boxSlotID int) ([]appbackend.Plant, error)
- func GetBox(boxID uuid.UUID) (appbackend.Box, error)
- func GetBoxFromPlantFeed(feedID uuid.UUID) (appbackend.Box, error)
- func GetDevice(deviceID uuid.UUID) (appbackend.Device, error)
- func GetDeviceFromPlantFeed(feedID uuid.UUID) (appbackend.Device, error)
- func GetFeedEntriesBetweenDates(from, to time.Time) ([]appbackend.FeedEntry, error)
- func GetFeedEntry(feedEntryID uuid.UUID) (appbackend.FeedEntry, error)
- func GetObjectWithField(field string, value interface{}, collection string, obj interface{}) error
- func GetObjectWithID(id uuid.UUID, collection string, obj interface{}) error
- func GetObjectsWithField(field string, value interface{}, collection string, obj interface{}) error
- func GetPlant(id uuid.UUID) (appbackend.Plant, error)
- func GetPlantForFeedEntryID(feedEntryID uuid.UUID) (appbackend.Plant, error)
- func GetPlantForFeedID(feedID uuid.UUID) (appbackend.Plant, error)
- func GetTimelapse(id uuid.UUID) (appbackend.Timelapse, error)
- func GetTimelapseFrame(timelapseID uuid.UUID) (appbackend.TimelapseFrame, error)
- func GetTimelapseFrames(timelapseID uuid.UUID, from, to time.Time) ([]appbackend.TimelapseFrame, error)
- func GetTimelapses() ([]appbackend.Timelapse, error)
- func Init()
- func MigrateDB()
- func SetFeedEntryMeta(feedEntryID uuid.UUID, meta string) error
- type Bookmark
- type Comment
- type Follow
- type Like
- type LinkBookmark
- type PlantSharing
- type ProductSuppliers
- type Products
- type Report
- type Suppliers
- type User
- type UserEnd
- type UserEndBox
- type UserEndDevice
- type UserEndFeed
- type UserEndFeedEntry
- type UserEndFeedMedia
- type UserEndObject
- type UserEndPlant
- type UserEndTimelapse
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Sess sqlbuilder.Database
)
Functions ¶
func GetActivePlantsForControllerIdentifier ¶
func GetActivePlantsForControllerIdentifier(controllerID string, boxSlotID int) ([]appbackend.Plant, error)
func GetBoxFromPlantFeed ¶
func GetBoxFromPlantFeed(feedID uuid.UUID) (appbackend.Box, error)
func GetDeviceFromPlantFeed ¶
func GetDeviceFromPlantFeed(feedID uuid.UUID) (appbackend.Device, error)
func GetFeedEntriesBetweenDates ¶
func GetFeedEntriesBetweenDates(from, to time.Time) ([]appbackend.FeedEntry, error)
func GetFeedEntry ¶
func GetFeedEntry(feedEntryID uuid.UUID) (appbackend.FeedEntry, error)
func GetObjectWithField ¶
func GetObjectsWithField ¶
func GetPlantForFeedEntryID ¶
func GetPlantForFeedEntryID(feedEntryID uuid.UUID) (appbackend.Plant, error)
func GetPlantForFeedID ¶
func GetPlantForFeedID(feedID uuid.UUID) (appbackend.Plant, error)
func GetTimelapse ¶
func GetTimelapse(id uuid.UUID) (appbackend.Timelapse, error)
func GetTimelapseFrame ¶
func GetTimelapseFrame(timelapseID uuid.UUID) (appbackend.TimelapseFrame, error)
func GetTimelapseFrames ¶
func GetTimelapseFrames(timelapseID uuid.UUID, from, to time.Time) ([]appbackend.TimelapseFrame, error)
func GetTimelapses ¶
func GetTimelapses() ([]appbackend.Timelapse, error)
Types ¶
type Bookmark ¶
type Bookmark struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` FeedEntryID uuid.NullUUID `db:"feedentryid" json:"feedEntryID"` UserID uuid.UUID `db:"userid" json:"userID"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
Bookmark -
type Comment ¶
type Comment struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` FeedEntryID uuid.UUID `db:"feedentryid" json:"feedEntryID"` UserID uuid.UUID `db:"userid" json:"userID"` ReplyTo uuid.NullUUID `db:"replyto,omitempty" json:"replyTo,omitempty"` Text string `db:"text" json:"text"` Type string `db:"ctype" json:"type"` Params string `db:"params" json:"params"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
Comment -
type Follow ¶
type Follow struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` PlantID uuid.NullUUID `db:"plantid" json:"plantID"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
Follow -
type Like ¶
type Like struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` FeedEntryID uuid.NullUUID `db:"feedentryid" json:"feedEntryID"` UserID uuid.UUID `db:"userid" json:"userID"` CommentID uuid.NullUUID `db:"commentid" json:"commentID"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
Like -
type LinkBookmark ¶
type LinkBookmark struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` URL string `db:"url" json:"url"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
LinkBookmark -
type PlantSharing ¶
type PlantSharing struct { UserID uuid.NullUUID `db:"userid" json:"userID"` PlantID uuid.UUID `db:"plantid" json:"plantID"` ToUserID uuid.UUID `db:"touserid" json:"toUserID"` Params string `db:"params" json:"params"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
PlantSharing -
type ProductSuppliers ¶
type ProductSuppliers struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` ProductID uuid.UUID `db:"productid" json:"productID"` SupplierID uuid.NullUUID `db:"supplierid" json:"supplierID"` URL string `db:"url" json:"url"` Price float64 `db:"price" json:"price"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
ProductSuppliers -
func (*ProductSuppliers) SetUserID ¶
func (o *ProductSuppliers) SetUserID(userID uuid.UUID)
SetUserID -
type Products ¶
type Products struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` Name string `db:"name" json:"name"` Description string `db:"description" json:"description"` Categories string `db:"categories" json:"categories"` Specs string `db:"specs" json:"specs"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
Products -
type Report ¶
type Report struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` FeedEntryID uuid.NullUUID `db:"feedentryid" json:"feedEntryID"` CommentID uuid.NullUUID `db:"commentid" json:"commentID"` PlantID uuid.NullUUID `db:"plantid" json:"plantID"` Type string `db:"rtype" json:"type"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
Report -
type Suppliers ¶
type Suppliers struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` Name string `db:"name" json:"name"` URL string `db:"url" json:"url"` Description string `db:"description" json:"description"` Locals string `db:"locals" json:"locals"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
Suppliers -
type User ¶
type User struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` Nickname string `db:"nickname" json:"nickname"` Password string `db:"password,omitempty" json:"password"` Pic null.String `db:"pic,omitempty" json:"pic,omitempty"` Liked bool `db:"liked,omitempty" json:"liked,omitempty"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
User -
func GetUserForNickname ¶
type UserEnd ¶
type UserEnd struct { ID uuid.NullUUID `db:"id,omitempty" json:"id"` UserID uuid.UUID `db:"userid" json:"userID"` NotificationToken null.String `db:"notification_token" json:"notificationToken"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
UserEnd -
type UserEndBox ¶
type UserEndBox struct { UserEndID uuid.UUID `db:"userendid,omitempty" json:"userEndID"` BoxID uuid.UUID `db:"boxid" json:"boxID"` Sent bool `db:"sent" json:"sent"` Dirty bool `db:"dirty" json:"dirty"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
UserEndBox -
type UserEndDevice ¶
type UserEndDevice struct { UserEndID uuid.UUID `db:"userendid,omitempty" json:"userEndID"` DeviceID uuid.UUID `db:"deviceid" json:"deviceID"` Sent bool `db:"sent" json:"sent"` Dirty bool `db:"dirty" json:"dirty"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
UserEndDevice -
func (*UserEndDevice) SetObjectID ¶
func (ueo *UserEndDevice) SetObjectID(id uuid.UUID)
SetObjectID -
func (*UserEndDevice) SetUserEndID ¶
func (ueo *UserEndDevice) SetUserEndID(id uuid.UUID)
SetUserEndID -
type UserEndFeed ¶
type UserEndFeed struct { UserEndID uuid.UUID `db:"userendid,omitempty" json:"userEndID"` FeedID uuid.UUID `db:"feedid" json:"feedID"` Sent bool `db:"sent" json:"sent"` Dirty bool `db:"dirty" json:"dirty"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
UserEndFeed -
func (*UserEndFeed) SetUserEndID ¶
func (ueo *UserEndFeed) SetUserEndID(id uuid.UUID)
SetUserEndID -
type UserEndFeedEntry ¶
type UserEndFeedEntry struct { UserEndID uuid.UUID `db:"userendid,omitempty" json:"userEndID"` FeedEntryID uuid.UUID `db:"feedentryid" json:"feedEntryID"` Sent bool `db:"sent" json:"sent"` Dirty bool `db:"dirty" json:"dirty"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
UserEndFeedEntry -
func (*UserEndFeedEntry) SetObjectID ¶
func (ueo *UserEndFeedEntry) SetObjectID(id uuid.UUID)
SetObjectID -
func (*UserEndFeedEntry) SetUserEndID ¶
func (ueo *UserEndFeedEntry) SetUserEndID(id uuid.UUID)
SetUserEndID -
type UserEndFeedMedia ¶
type UserEndFeedMedia struct { UserEndID uuid.UUID `db:"userendid,omitempty" json:"userEndID"` FeedMediaID uuid.UUID `db:"feedmediaid" json:"feedMediaID"` Sent bool `db:"sent" json:"sent"` Dirty bool `db:"dirty" json:"dirty"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
UserEndFeedMedia -
func (*UserEndFeedMedia) SetObjectID ¶
func (ueo *UserEndFeedMedia) SetObjectID(id uuid.UUID)
SetObjectID -
func (*UserEndFeedMedia) SetUserEndID ¶
func (ueo *UserEndFeedMedia) SetUserEndID(id uuid.UUID)
SetUserEndID -
type UserEndObject ¶
type UserEndObject interface { SetUserEndID(uuid.UUID) SetObjectID(uuid.UUID) SetDirty(bool) SetSent(bool) }
UserEndObject -
type UserEndPlant ¶
type UserEndPlant struct { UserEndID uuid.UUID `db:"userendid,omitempty" json:"userEndID"` PlantID uuid.UUID `db:"plantid" json:"plantID"` Sent bool `db:"sent" json:"sent"` Dirty bool `db:"dirty" json:"dirty"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
UserEndPlant -
func (*UserEndPlant) SetUserEndID ¶
func (ueo *UserEndPlant) SetUserEndID(id uuid.UUID)
SetUserEndID -
type UserEndTimelapse ¶
type UserEndTimelapse struct { UserEndID uuid.UUID `db:"userendid,omitempty" json:"userEndID"` TimelapseID uuid.UUID `db:"timelapseid" json:"timelapseID"` Sent bool `db:"sent" json:"sent"` Dirty bool `db:"dirty" json:"dirty"` CreatedAt time.Time `db:"cat,omitempty" json:"cat"` UpdatedAt time.Time `db:"uat,omitempty" json:"uat"` }
UserEndTimelapse -
func (*UserEndTimelapse) SetObjectID ¶
func (ueo *UserEndTimelapse) SetObjectID(id uuid.UUID)
SetObjectID -
func (*UserEndTimelapse) SetUserEndID ¶
func (ueo *UserEndTimelapse) SetUserEndID(id uuid.UUID)
SetUserEndID -
Click to show internal directories.
Click to hide internal directories.