db

package
v0.0.0-...-549af0b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2015 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB gorm.DB
)

Functions

func Init

func Init(dbname *string) error
type Switch struct {
  Id	int   `json:"id"`
  DeviceId  int
  Swstate   string  `json:"swstate"`
}

Types

type Device

type Device struct {
	Id          int       `json:"id"`
	Wifimode    string    `json:"wifimode"`
	Wifissid    string    `json:"wifissid"`
	Wifipwd     string    `json:"wifipwd"`
	Wifiip      string    `json:"wifiip"`
	Wifinetmask string    `json:"wifinetmask"`
	Wifigateway string    `json:"gateway"`
	Device      string    `json:"device"`
	Land        string    `json:"land"`
	Serial      string    `json:"serial"`
	Mac         string    `json:"mac"`
	Ip          string    `json:"ip"`
	Landhq      string    `json:"landhq"`
	Swstate     string    `json:"swstate"`
	Created     time.Time `json:"created_at"`
}

type User

type User struct {
	Id       int       `json:"id"`
	Username string    `json:"username"; unique`
	Password string    `json:"password"`
	Created  time.Time `json:"created_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL