models

package
v0.0.0-...-a5410b4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2014 License: GPL-2.0 Imports: 5 Imported by: 1

Documentation

Overview

struct.go

Index

Constants

View Source
const (
	DbName = "./sqlite.db"
)

Variables

View Source
var (
	Engine *xorm.Engine
)

Functions

func CreateDb

func CreateDb()

func LookHost

func LookHost(alias string) (hostname, password string, err error)

func SetEngine

func SetEngine() (*xorm.Engine, error)

func XConDb

func XConDb() (*xorm.Engine, error)

Types

type Record

type Record struct {
	Hostname  string `xorm:"unique(u)"`
	User      string `xorm:"unique(u)"`
	Pass      string
	ViewCount int64 `xorm:"default 0"`
}

func GetRecord

func GetRecord(host, user string) (r *Record, err error)

func (*Record) Add

func (r *Record) Add() (err error)

func (*Record) Sync

func (r *Record) Sync() (err error)

Jump to

Keyboard shortcuts

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