news

package
v0.0.0-...-cbaa3f3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminSetDeleted

func AdminSetDeleted(db *gorp.DbMap, id int64) error

func AdminSetPublished

func AdminSetPublished(db *gorp.DbMap, id int64, published bool) error

func UpdateNew

func UpdateNew(db *gorp.DbMap, n New) error

Types

type New

type New struct {
	Id          int64
	Title       string
	Slug        string
	Description string
	Body        []byte
	ImgId       int64
	Views       int64
	OwnerId     int64
	Published   bool
	Source      string

	Deleted int64
	Created int64
	Updated int64
	Version int64

	ImgUrl string     `db:"-"`
	Tags   []tags.Tag `db:"-"`
	Images []int64    `db:"-"`
	Rate   rate.Rate  `db:"-"`
}

func AdminGetNews

func AdminGetNews(db *gorp.DbMap, offset, count int64) ([]New, error)

func CreateNew

func CreateNew(db *gorp.DbMap, title, description string, body []byte,
	imgid int64, tags []int64, userid int64, published bool,
	source string) (New, error)

func GetAllNews

func GetAllNews(db *gorp.DbMap, offset, count int64) ([]New, error)

func GetNew

func GetNew(db *gorp.DbMap, id int64) (New, error)

func GetNewBySlug

func GetNewBySlug(db *gorp.DbMap, id string) (New, error)

func GetNews

func GetNews(db *gorp.DbMap, offset, count int64) ([]New, error)

func (New) AddImages

func (n New) AddImages(db *gorp.DbMap, iids []int64) error

func (New) GetImages

func (n New) GetImages(db *gorp.DbMap)

type NewImages

type NewImages struct {
	NewId   int64
	ImageId int64
}

Jump to

Keyboard shortcuts

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