models

package
v0.0.0-...-4d1a479 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Sections []map[string]interface{}

Functions

func AddEntry

func AddEntry(e Entry) (string, error)

func DeleteEntry

func DeleteEntry(eid string) error

func GetBroadcast

func GetBroadcast() (string, error)

func Hash

func Hash(s string) string

func SetBroadcast

func SetBroadcast(content string) error

func UpdateEntry

func UpdateEntry(e Entry) error

Types

type Entry

type Entry struct {
	Id      string `json:"id"`
	Title   string `json:"title" form:"title"`
	Author  string `json:"author" form:"author"`
	Date    string `json:"date" form:"date"`
	Section string `json:"section" form:"section"`
	Content string `json:"content" form:"content"`
	Status  string `json:"status" form:"status"`
}

func AllEntries

func AllEntries() ([]Entry, error)

func EntriesBySection

func EntriesBySection(sid string) ([]Entry, error)

func EntryById

func EntryById(eid string) (*Entry, error)

func PublishedEntriesBySection

func PublishedEntriesBySection(sid string) ([]Entry, error)

type User

type User struct {
	Name     string `json:"name" form:"name"`
	Password string `json:"password" form:"password"`
}

func AddUser

func AddUser(name, password string) (*User, error)

func UserByName

func UserByName(name string) (*User, error)

Jump to

Keyboard shortcuts

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