data

package
v0.0.0-...-40db9ca Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2013 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Orm

type Orm struct {
	Hd *hood.Hood // The instance of the ORM
}

func NewOrm

func NewOrm(connectionString string) *Orm

func (Orm) Create

func (o Orm) Create()

func (Orm) FindByName

func (o Orm) FindByName(name string) (User, error)

func (Orm) FindByUid

func (o Orm) FindByUid(uid string) (User, error)

func (Orm) LastUser

func (o Orm) LastUser() User

Retrieves the last user in the database

func (Orm) NewUser

func (o Orm) NewUser(token string, uid string) error

Creates a new user

func (Orm) UpdateName

func (o Orm) UpdateName(u User, domain string, rev int) error

Creates a new user

func (Orm) UpdateSum

func (o Orm) UpdateSum(u User, sum string) error

func (Orm) UpdateToken

func (o Orm) UpdateToken(u User, token string) error

func (Orm) UserCount

func (o Orm) UserCount() int64

A count of all of the users in the database

type Red

type Red struct {
	Address  string      // The address to redis
	Password string      //  The password to redis
	Redis    *redis.Pool // This is our generic redis connection
}

func NewRedis

func NewRedis(address string, password string) *Red

type User

type User struct {
	Id           hood.Id
	Name         string
	DropboxUid   string `validate:"presence"`
	DropboxToken string `validate:"presence"`
	FolderSum    string // We use this to check for dropbox folder changes
	SettingsRev  int    // We use this to check for dropbox setting changes
}

The user table

func (*User) Indexes

func (table *User) Indexes(indexes *hood.Indexes)

Indexes for the user table

Jump to

Keyboard shortcuts

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