article

package
v0.0.0-...-6de6600 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2014 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	Id         string             `gorethink:"id" json:"id"`
	Title      string             `gorethink:"title" json:"title"`
	SectionsId []string           `gorethink:"sections" json:"-"`
	Sections   []*section.Section `gorethink:"-" json:"sections"`
	Existed    bool               `gorethink:"-" json:"-"`
}

func Get

func Get(id string) (*Article, error)

func List

func List() ([]*Article, error)
func Search(query string) ([]*Article, error)

func (*Article) AddAudio

func (article *Article) AddAudio(sectionId string, uploadFile multipart.File) error

func (*Article) CreateFromRaw

func (article *Article) CreateFromRaw() error

func (*Article) Merge

func (article *Article) Merge() error

type ArticleRaw

type ArticleRaw struct {
	Id      string `gorethink:"id"`
	Title   string `gorethink:"title"`
	Content string `gorethink:"content"`
}

type Document

type Document struct {
	Title   string
	Score   float64
	Matches int
}

type DocumentList

type DocumentList []*Document

func (DocumentList) Len

func (a DocumentList) Len() int

func (DocumentList) Less

func (a DocumentList) Less(i, j int) bool

func (DocumentList) Swap

func (a DocumentList) Swap(i, j int)

type Index

type Index struct {
	Id   string  `gorethink:"id"`
	Docs []int64 `gorethink:"docs"`
}

type Title

type Title struct {
	Id   int64  `gorethink:"id"`
	Slug string `gorethink:"slug"`
}

Jump to

Keyboard shortcuts

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