Documentation
¶
Index ¶
Constants ¶
View Source
const ( EventActionPlantWater = "PLANT_WATER" EventActionPlantCapturePhoto = "PLANT_CAPTURE_PHOTO" EventActionRobotRandomMove = "ROBOT_RANDOM_MOVE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventAction ¶
type PlantPhoto ¶
type Robot ¶
type Robot struct {
ID uuid.UUID `json:"id" db:"id"`
AdminToken string `json:"-" db:"admin_token"`
UserID *int `json:"user_id,omitempty" db:"user_id"`
Title *string `json:"title,omitempty" db:"title"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
Robot is a single (potentially not-yet-activated) robot
type RobotState ¶
type RobotState struct {
ID uuid.UUID `json:"id" db:"id"`
BatteryLevel int `json:"battery_level" db:"battery_level"`
WaterLevel int `json:"water_level" db:"water_level"`
Standby bool `json:"standby" db:"standby"`
SeenAt *time.Time `json:"seen_at" db:"seen_at"`
}
RobotState represents the state of a rboto.
All fields are mandatory, except that seen_at has the special case where if it's `null`, the robot has not been "seen" yet. That is to say, the robot hasn't been turned on yet.
This is so that the interactive interfaces can report "Not seen yet" instead of just the default (blank) values.
type User ¶
type User struct {
ID int `json:"id" db:"id"`
Forename string `json:"forename" db:"forename"`
Surname string `json:"surname" db:"surname"`
Password string `json:"password" db:"password"`
Email string `json:"email" db:"email"`
Activated bool `json:"is_activated" db:"is_activated"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
User is a user account in the system
Click to show internal directories.
Click to hide internal directories.