service

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2016 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxResults int = 1000
)

Variables

This section is empty.

Functions

func AddAnswerToFormGallery added in v0.3.4

func AddAnswerToFormGallery(context *web.AppContext) (*model.FormGallery, *web.AppError)

add an answer to a form gallery

func AddFlagToFormSubmission added in v0.3.4

func AddFlagToFormSubmission(context *web.AppContext) (*model.FormSubmission, *web.AppError)

func CalculateStats added in v0.3.4

func CalculateStats()

CalculateStats calculate stats as a service to use in the cron scheduler

func CreateFormGallery added in v0.3.4

func CreateFormGallery(context *web.AppContext) (*model.FormGallery, *web.AppError)

** consider implementing this as a method on FormGallery **

func CreateFormSubmission added in v0.3.4

func CreateFormSubmission(context *web.AppContext) (*model.FormSubmission, *web.AppError)

func CreateIndex

func CreateIndex(context *web.AppContext) *web.AppError

CreateIndex creates indexes to various entities

func CreateNote

func CreateNote(context *web.AppContext) (*model.Note, *web.AppError)

CreateNote creates a new note resource

func CreateTagTargets

func CreateTagTargets(db *db.MongoDB, tags []string, tt *model.TagTarget) error

CreateTagTargets creates TagTarget entries for various tags on an entity

func CreateUpdateAction added in v0.3.4

func CreateUpdateAction(context *web.AppContext) (*model.Action, *web.AppError)

CreateUpdateAction creates/updates an action

func CreateUpdateAsset

func CreateUpdateAsset(context *web.AppContext) (*model.Asset, *web.AppError)

CreateUpdateAsset creates/updates an asset resource

func CreateUpdateAuthor added in v0.3.4

func CreateUpdateAuthor(context *web.AppContext) (*model.Author, *web.AppError)

CreateUpdateAuthor creates/updates an author resource

func CreateUpdateComment

func CreateUpdateComment(context *web.AppContext) (*model.Comment, *web.AppError)

CreateUpdateComment creates/updates a comment resource

func CreateUpdateForm added in v0.3.4

func CreateUpdateForm(context *web.AppContext) (*model.Form, *web.AppError)

func CreateUpdateSearch added in v0.3.4

func CreateUpdateSearch(context *web.AppContext) (*model.Search, *web.AppError)

CreateUpdateSearch upserts a Search

func CreateUpdateSection added in v0.3.4

func CreateUpdateSection(context *web.AppContext) (*model.Section, *web.AppError)

CreateUpdateSection creates/updates a Section

func CreateUpdateTag

func CreateUpdateTag(context *web.AppContext) (*model.Tag, *web.AppError)

CreateUpdateTag adds or updates a tag

func CreateUpdateUser

func CreateUpdateUser(context *web.AppContext) (*model.User, *web.AppError)

CreateUpdateUser creates/updates a user resource

func CreateUserAction

func CreateUserAction(context *web.AppContext) *web.AppError

CreateUserAction inserts an activity by the user

func DeleteForm added in v0.3.4

func DeleteForm(c *web.AppContext) *web.AppError

DeleteForm deletes a Form

func DeleteFormGallery added in v0.3.4

func DeleteFormGallery(c *web.AppContext) *web.AppError

DeleteFormGallery deletes a FormGallery

func DeleteFormSubmission added in v0.3.4

func DeleteFormSubmission(c *web.AppContext) *web.AppError

DeleteFormSubmission deletes a FormSubmission

func DeleteSearch added in v0.3.4

func DeleteSearch(context *web.AppContext) *web.AppError

DeleteSearch deletes a Search

func DeleteTag

func DeleteTag(context *web.AppContext) *web.AppError

DeleteTag deletes a tag

func EditFormSubmissionAnswer added in v0.3.4

func EditFormSubmissionAnswer(c *web.AppContext) (*model.FormSubmission, *web.AppError)

func GetForm added in v0.3.4

func GetForm(c *web.AppContext) (model.Form, *web.AppError)

GetForms returns a single form by id

func GetFormGalleriesByForm added in v0.3.4

func GetFormGalleriesByForm(c *web.AppContext) ([]model.FormGallery, *web.AppError)

GetFormGallerys returns an array of FormGallerys

func GetFormGallery added in v0.3.4

func GetFormGallery(c *web.AppContext) (model.FormGallery, *web.AppError)

GetFormGallerys returns a single FormGallery by id

func GetFormSubmission added in v0.3.4

func GetFormSubmission(c *web.AppContext) (model.FormSubmission, *web.AppError)

GetFormSubmissions returns a single FormSubmission by id

func GetFormSubmissionsByForm added in v0.3.4

func GetFormSubmissionsByForm(c *web.AppContext) (map[string]interface{}, *web.AppError)

GetFormSubmissions returns an array of FormSubmissions

func GetForms added in v0.3.4

func GetForms(context *web.AppContext) ([]model.Form, *web.AppError)

GetForms returns an array of Forms

func GetSearch added in v0.3.4

func GetSearch(context *web.AppContext) (*model.Search, *web.AppError)

GetSearch returns one Search

func GetSearches added in v0.3.4

func GetSearches(context *web.AppContext) ([]model.Search, *web.AppError)

GetSearches returns the list of all Search items in the system

func GetSections added in v0.3.4

func GetSections(context *web.AppContext) ([]model.Section, *web.AppError)

GetSections returns an array of Sections

func GetTags

func GetTags(context *web.AppContext) ([]model.Tag, *web.AppError)

GetTags returns an array of tags

func ImportAction added in v0.3.4

func ImportAction(context *web.AppContext) (*model.Action, *web.AppError)

ImportAction imports a new action resource

func ImportAsset added in v0.3.4

func ImportAsset(context *web.AppContext) (*model.Asset, *web.AppError)

ImportAsset imports a new asset into Coral

func ImportComment added in v0.3.4

func ImportComment(context *web.AppContext) (*model.Comment, *web.AppError)

ImportComment imports a new comment resource

func ImportUser added in v0.3.4

func ImportUser(context *web.AppContext) (*model.User, *web.AppError)

ImportUser imports a new user resource

func PublishEvent added in v0.3.4

func PublishEvent(c *web.AppContext, object interface{}, payload interface{})

func RemoveAnswerFromFormGallery added in v0.3.4

func RemoveAnswerFromFormGallery(context *web.AppContext) (*model.FormGallery, *web.AppError)

remove an answer from a form gallery

func RemoveFlagFromFormSubmission added in v0.3.4

func RemoveFlagFromFormSubmission(context *web.AppContext) (*model.FormSubmission, *web.AppError)

Flag functionality specified here can be abstracted as Flaggabe behavior

func SearchFormSubmissions added in v0.3.4

func SearchFormSubmissions(c *web.AppContext) ([]model.FormSubmission, *web.AppError)

func UnmarshallAndValidate added in v0.3.4

func UnmarshallAndValidate(context *web.AppContext, m model.Model) *web.AppError

func UpdateFormGallery added in v0.3.4

func UpdateFormGallery(context *web.AppContext) (*model.FormGallery, *web.AppError)

UpdateFormGallery receives a form gallery and its gallery_id and updates it

func UpdateFormStatus added in v0.3.4

func UpdateFormStatus(context *web.AppContext) (*model.Form, *web.AppError)

given a form's id and a stats, update the form with the status

func UpdateFormSubmissionStatus added in v0.3.4

func UpdateFormSubmissionStatus(context *web.AppContext) (*model.FormSubmission, *web.AppError)

given a form's id and a stats, update the form with the status

func UpdateMetadata

func UpdateMetadata(context *web.AppContext) (interface{}, *web.AppError)

UpdateMetadata updates metadata for an entity

func UpdateSearch added in v0.3.4

func UpdateSearch()

Types

This section is empty.

Jump to

Keyboard shortcuts

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