models

package
v0.0.0-...-527721e Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2018 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

View Source
const SQL_DATE_FORMAT = time.RFC3339

Variables

This section is empty.

Functions

func ValidatePassword

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

Types

type Article

type Article struct {
	ArticleId int
	SourceId  int

	Url    string
	Title  string
	Body   string
	ImgUrl string

	PublishedStr string

	// Transient
	Published time.Time

	Source *Source
}

func (*Article) PostGet

func (a *Article) PostGet(exe gorp.SqlExecutor) error

func (*Article) PreInsert

func (a *Article) PreInsert(_ gorp.SqlExecutor) error

func (Article) String

func (a Article) String() string

func (Article) Validate

func (a Article) Validate(v *revel.Validation)

type Source

type Source struct {
	SourceId int

	Name, Url        string
	ArticleUrlsXpath string

	CardXpath  string
	TitleXpath string
	BodyXpath  string
	ImgXpath   string

	PublishedXpath  string
	PublishedFormat string
}

func (*Source) String

func (source *Source) String() string

func (*Source) Validate

func (source *Source) Validate(v *revel.Validation)

type User

type User struct {
	UserId             int
	Name               string
	Username, Password string
	HashedPassword     []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