Documentation
¶
Index ¶
Constants ¶
View Source
const ( // BootupStatePending is the 0 state for bootup process BootupStatePending = iota // BootupStateCompleted is the 2 state for bootup process BootupStateCompleted )
View Source
const ( // RoleAdmin is the admin role for a user RoleAdmin = iota // RoleNode is the node role for a user RoleNode )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
ID string `bson:"id"`
TS time.Time `bson:"ts"`
Name string `json:"name"`
LastHeartbeat time.Time `bson:"lastHeartbeat"`
Version string `bson:"version"`
HostData HostData `bson:"hostData"`
Pods []Pod `bson:"pods"`
}
Node represents a remote kamji-node owner by a user
type Pod ¶
type Pod struct {
ID string `bson:"id"`
TS time.Time `bson:"ts"`
LastHeartbeat time.Time `bson:"lastHeartbeat"`
MultiAddr string `bson:"multiAddr"`
TemplateID int `bson:"tplId"`
State string `bson:"state"`
}
Pod reperesents a pod running on a kamaji-node
type SystemConfig ¶
type SystemConfig struct {
ID string `bson:"id"`
BootupState Bootupstate `bson:"bootupState"`
RootToken string `bson:"rootToken"`
JWTSecret string `bson:"jwtToken"`
}
SystemConfig stores the config used by the system
type User ¶
type User struct {
ID string `bson:"id" json:"id"`
TS time.Time `bson:"ts" json:"ts"`
Email string `bson:"email" json:"email"`
Username string `bson:"username,omitempty" json:"username"`
Password string `bson:"password,omitempty" json:"-"`
RoleID int `bson:"roleId" json:"role"`
Nodes []Node `bson:"nodes" json:"nodes"`
}
User represents a user in the system
Click to show internal directories.
Click to hide internal directories.