models

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileQuoteSource

type FileQuoteSource struct {
	Quotes []Quote
	// contains filtered or unexported fields
}

func CreateFileQuoteSource

func CreateFileQuoteSource(filename string) (source FileQuoteSource, err error)

func (FileQuoteSource) GetQuote

func (source FileQuoteSource) GetQuote() (Quote, error)

func (FileQuoteSource) String

func (source FileQuoteSource) String() string

type Quote

type Quote struct {
	Body   string `json:"body" xml:"body"`
	Author string `json:"author" xml:"author"`
}

type QuoteDBSource

type QuoteDBSource struct {
	Url        string
	Categories []string
}

Quotes from

func (QuoteDBSource) GetQuote

func (source QuoteDBSource) GetQuote() (Quote, error)

func (QuoteDBSource) String

func (source QuoteDBSource) String() string

type QuoteSource

type QuoteSource interface {
	GetQuote() (Quote, error)
}

type TheySaidSoQuote

type TheySaidSoQuote struct {
	Contents struct {
		Quote    string   `json:"quote"`
		Author   string   `json:"author"`
		Length   string   `json:"length"`
		Tags     []string `json:"tags"`
		Category string   `json:"category"`
	} `json:"contents"`
}

type TheySaidSoQuoteSource

type TheySaidSoQuoteSource struct {
	Url        string
	Categories []string
}

func (TheySaidSoQuoteSource) GetQuote

func (source TheySaidSoQuoteSource) GetQuote() (Quote, error)

func (TheySaidSoQuoteSource) String

func (source TheySaidSoQuoteSource) String() string

Jump to

Keyboard shortcuts

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