db

package
v0.0.0-...-dca6c44 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FusionDAO

type FusionDAO struct {
	// contains filtered or unexported fields
}

FusionDAO sturct is a DAO for database related actions

func New

New Creates a new FusionDAO

func (*FusionDAO) News

func (f *FusionDAO) News(offset, limit int) ([]News, error)

News is a function used to query news from the database

type News

type News struct {
	ID            int    `sql:"news_id" json:"id"`
	Subject       string `sql:"news_subject" json:"subject"`
	Category      int    `sql:"news_cat" json:"category"`
	Summary       string `sql:"news_news" json:"summary"`
	FullText      string `sql:"news_extended" json:"full_text"`
	Breaks        bool   `sql:"news_breaks" json:"breaks"`
	Name          int    `sql:"news_name" json:"name"`
	DateStamp     int    `sql:"news_datestamp" json:"datestamp"`
	Start         int    `sql:"news_start" json:"start"`
	End           int    `sql:"news_end" json:"end"`
	Visibility    int    `sql:"news_visibility" json:"visibility"`
	Reads         int    `sql:"news_reads" json:"reads"`
	Draft         bool   `sql:"news_draft" json:"draft"`
	Sticky        bool   `sql:"news_sticky" json:"sticky"`
	AllowComments bool   `sql:"news_allow_comment" json:"allow_comments"`
	AllowRatings  bool   `sql:"news_allow_ratings" json:"allow_ratings"`
	CategoryID    int    `sql:"news_cat_id" json:"category_id"`
	CategoryName  string `sql:"news_cat_name" json:"category_name"`
	CategoryImage string `sql:"news_cat_image" json:"category_image"`
	UserID        int    `sql:"user_id" json:"user_id"`
	UserName      string `sql:"user_name" json:"user_name"`
}

News represents a news entry

Jump to

Keyboard shortcuts

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