Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *pop.Connection
DB is a connection to your database to be used throughout your application.
Functions ¶
This section is empty.
Types ¶
type Location ¶
type Location struct { ID int `json:"id" db:"id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` Name string `json:"name" db:"name"` Code string `json:"code" db:"code"` Description string `json:"description" db:"description"` }
func (*Location) BeforeDestroy ¶
func (l *Location) BeforeDestroy(tx *pop.Connection) error
type Node ¶
type Node struct { ID int `json:"id" db:"id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` Uuid string `json:"uuid" db:"uuid"` Name string `json:"name" db:"name"` Description string `json:"description" db:"description"` LocationId int `json:"location_id" db:"location_id"` PublicIp string `json:"public_ip" db:"public_ip"` PrivateIp string `json:"private_ip" db:"private_ip"` Port int `json:"port" db:"port"` }
func CreateNode ¶
func CreateNode() *Node
func (*Node) BeforeDestroy ¶
func (n *Node) BeforeDestroy(tx *pop.Connection) error
type OAuthClient ¶
type Server ¶
type Server struct { ID int `json:"id" db:"id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` Uuid uuid.UUID `json:"uuid" db:"uuid"` Name string `json:"name" db:"name"` UserId int `json:"user_id" db:"user_id"` NodeId int `json:"node_id" db:"node_id"` }
func CreateServer ¶
func CreateServer() *Server
type User ¶
type User struct { ID int `json:"id" db:"id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` Uuid uuid.UUID `json:"uuid" db:"uuid"` Username string `json:"username" db:"username"` Email string `json:"email" db:"email"` Language string `json:"language" db:"language"` Admin bool `json:"admin" db:"admin"` //private variable that's just backed by the database, we do not pass these outside this Password string `json:"-" db:"password"` }
func CreateUser ¶
func CreateUser() *User
func (*User) BeforeDestroy ¶
func (u *User) BeforeDestroy(tx *pop.Connection) error
func (User) ComparePassword ¶
func (User) SetPassword ¶
Click to show internal directories.
Click to hide internal directories.