models

package
v0.0.0-...-2d65cbb Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2013 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNextSequence

func GetNextSequence(database *mgo.Database) (count int)

func ValidatePassword

func ValidatePassword(v *revel.Validation, password string) *revel.ValidationResult

Types

type Category

type Category struct {
	ID          bson.ObjectId `bson:"_id,omitempty"`
	Name        string        `bson:"name"`
	Description string
}

type Counter

type Counter struct {
	ID   bson.ObjectId `bson:"_id,omitempty"`
	Name string
	Seq  int
}

sequential Id counter for posts

type Post

type Post struct {
	ID        bson.ObjectId `bson:"_id,omitempty"`
	ShortID   int
	Title     string
	Subtitle  string
	Image     string
	Slug      string
	Body      string
	Category  string
	Tags      []string
	Published bool
	Timestamp time.Time
}

type User

type User struct {
	Name     string
	Username string
	Password []byte
}

func (*User) String

func (u *User) String() string

func (*User) Validate

func (user *User) Validate(v *revel.Validation)

Jump to

Keyboard shortcuts

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