commands

package
v0.0.0-...-81da340 Latest Latest
Warning

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

Go to latest
Published: May 1, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CfgFile string
View Source
var DBHost string
View Source
var DBName string
View Source
var DBPort int
View Source
var Host string
View Source
var InitializeFixturesCmd = &cobra.Command{
	Use:   "initializeFixtures",
	Short: "Initialize Fixtures, throw away",
	Long:  ``,
	Run:   InitializeFixtures,
}
View Source
var Port int
View Source
var Root = &cobra.Command{
	Use:   "kaiju",
	Short: "kaiju is an open source comment server",
	Long:  `kaiju is an open source comment server`,
	Run:   RootRun,
}
View Source
var Verbose bool

Functions

func AddCommands

func AddCommands()

func Execute

func Execute()

func GetAllComments

func GetAllComments(db *mgo.Database,
	forumId bson.ObjectId,
	page string) ([]*models.Comment, error)

func GetAllCommentsResource

func GetAllCommentsResource(db *mgo.Database, parms martini.Params) string

func GetCommentsSinceTime

func GetCommentsSinceTime(db *mgo.Database,
	forumId bson.ObjectId,
	page string,
	since bson.ObjectId) ([]*models.Comment, error)

func GetCommentsWithAncestor

func GetCommentsWithAncestor(db *mgo.Database,
	forumId bson.ObjectId,
	page string,
	ancestorId bson.ObjectId) ([]*models.Comment, error)

func GetTopLevelComments

func GetTopLevelComments(db *mgo.Database,
	forumId bson.ObjectId,
	page string) ([]*models.Comment, error)

func InitializeFixtures

func InitializeFixtures(cmd *cobra.Command, args []string)

func PostComment

func PostComment(db *mgo.Database, fullname string, email string, forumId bson.ObjectId,
	page string, body string, parentId *bson.ObjectId) (*models.Comment, error)

func PostCommentHandler

func PostCommentHandler(request *http.Request, db *mgo.Database) string

func PostCommentResource

func PostCommentResource(forumIdStr string, pageStr string, bodyStr string, parentIdStr string) (forumId bson.ObjectId, page string, body string, parentId *bson.ObjectId, err error)

func RootRun

func RootRun(cmd *cobra.Command, args []string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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