models

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const SQL_DATE_FORMAT = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

This section is empty.

Types

type Post

type Post struct {
	PostId        int
	ThreadId      int
	UserId        int
	Body          string
	CreatedString string

	// Transient
	Thread  *Thread
	User    *User
	Created interface{}
}

func (*Post) PostGet

func (p *Post) PostGet(exe gorp.SqlExecutor) error

func (*Post) PreInsert

func (p *Post) PreInsert(_ gorp.SqlExecutor) error

func (Post) String

func (p Post) String() string

type Thread

type Thread struct {
	ThreadId      int
	UserId        int
	Topic         string
	CreatedString string

	// Transient
	User    *User
	Created interface{}
}

func (*Thread) PostGet

func (b *Thread) PostGet(exe gorp.SqlExecutor) error

func (*Thread) PreInsert

func (b *Thread) PreInsert(_ gorp.SqlExecutor) error

func (Thread) String

func (b Thread) String() string

type User

type User struct {
	UserId         int
	Name           string
	HashedPassword []byte
}

Jump to

Keyboard shortcuts

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