models

package
v0.0.0-...-f0eec3f Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Id           string `gorethink:"id"`
	UserId       string
	FileName     string
	Private      bool
	AccessKey    string
	Epoch        time.Time
	LastAccessed time.Time
	Hits         int
	FileSize     int64
	MimeType     string
}

func (File) GetUrl

func (f File) GetUrl(BaseUrl string) string

type FilePiece

type FilePiece struct {
	Seq      int64
	ParentId string
	Data     []byte
}

type User

type User struct {
	Id             string `gorethink:"id,omitempty"`
	Email          string
	ApiKey         string
	LastActivity   time.Time
	HashedPassword string
	Active         bool
	Epoch          time.Time
}

func GetUserByApiKey

func GetUserByApiKey(ApiKey string, session *r.Session, Tablename string, debug bool) (User, error)

func (*User) UpdateLastActivity

func (user *User) UpdateLastActivity(session *r.Session, Table string) error

Jump to

Keyboard shortcuts

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