Documentation ¶
Index ¶
- type S
- func (s *S) AddOrganisation(name string) (impact.Organisation, error)
- func (s *S) CompleteMeeting(meetingID string, u auth.User) (impact.Meeting, error)
- func (s *S) DeleteCategory(outcomeSetID, categoryID string, u auth.User) error
- func (s *S) DeleteMeeting(meetingID string, u auth.User) error
- func (s *S) DeleteOrganisation(id string) error
- func (s *S) DeleteOutcomeSet(id string, u auth.User) error
- func (s *S) DeleteQuestion(outcomeSetID, questionID string, u auth.User) error
- func (s *S) EditCategory(outcomeSetID, categoryID string, name, description string, ...) (impact.Category, error)
- func (s *S) EditMeetingBeneficiary(meetingID, newBenID string, u auth.User) (impact.Meeting, error)
- func (s *S) EditMeetingDate(meetingID string, conducted time.Time, u auth.User) (impact.Meeting, error)
- func (s *S) EditMeetingTags(meetingID string, newTags []string, u auth.User) (impact.Meeting, error)
- func (s *S) EditOutcomeSet(id, name, description, instructions string, skippable bool, u auth.User) (impact.OutcomeSet, error)
- func (s *S) EditQuestion(outcomeSetID, questionID, question, short, description string, ...) (impact.Question, error)
- func (s *S) EnsureIndexes() error
- func (s *S) GetBeneficiaries(u auth.User) ([]string, error)
- func (s *S) GetBeneficiary(id string, u auth.User) (impact.Beneficiary, error)
- func (s *S) GetCategory(outcomeSetID, categoryID string, u auth.User) (impact.Category, error)
- func (s *S) GetExport(id string) (*impact.Export, error)
- func (s *S) GetFilteredOSMeetingsForBeneficiaries(beneficiaries []string, outcomeSetID string, tags []string, or bool, ...) ([]impact.Meeting, error)
- func (s *S) GetFilteredOSMeetingsInTimeRange(start, end time.Time, outcomeSetID string, tags []string, or bool, u auth.User) ([]impact.Meeting, error)
- func (s *S) GetIncompleteMeetingsForBeneficiary(beneficiary string, u auth.User) ([]impact.Meeting, error)
- func (s *S) GetInvite(id string) (string, error)
- func (s *S) GetJWT(jti string) (string, error)
- func (s *S) GetMeeting(id string, u auth.User) (impact.Meeting, error)
- func (s *S) GetMeetingsForBeneficiary(beneficiary string, u auth.User) ([]impact.Meeting, error)
- func (s *S) GetOSMeetingsForBeneficiary(beneficiary string, outcomeSetID string, u auth.User) ([]impact.Meeting, error)
- func (s *S) GetOSMeetingsInTimeRange(start, end time.Time, outcomeSetID string, u auth.User) ([]impact.Meeting, error)
- func (s *S) GetOrganisation(id string) (impact.Organisation, error)
- func (s *S) GetOrganisations(offset, limit int) ([]impact.Organisation, error)
- func (s *S) GetOutcomeSet(id string, u auth.User) (impact.OutcomeSet, error)
- func (s *S) GetOutcomeSets(u auth.User) ([]impact.OutcomeSet, error)
- func (s *S) GetQuestion(outcomeSetID string, questionID string, u auth.User) (impact.Question, error)
- func (s *S) GetQuestionnaireTagSuggestions(qID string, u auth.User) ([]string, error)
- func (s *S) GetRecentMeetings(limit, page int, u auth.User) ([]impact.Meeting, error)
- func (s *S) GetTagSuggestions(beneficiary string, u auth.User) ([]string, error)
- func (s *S) GetTags(u auth.User) ([]string, error)
- func (s *S) HasGeneratedReport(orgID string) (bool, error)
- func (s *S) ImportOutcomeSet(os impact.OutcomeSet, u auth.User) (impact.OutcomeSet, error)
- func (s *S) MoveQuestion(outcomeSetID, questionID string, newIndex uint, u auth.User) error
- func (s *S) NewAnswer(meetingID string, answer impact.Answer, allowOverwrite bool, u auth.User) (impact.Meeting, error)
- func (s *S) NewCategory(outcomeSetID, name, description string, aggregation impact.Aggregation, ...) (impact.Category, error)
- func (s *S) NewMeeting(beneficiaryID, outcomeSetID string, conducted time.Time, tags []string, ...) (impact.Meeting, error)
- func (s *S) NewMeetingFromSummon(summonID string, beneficiaryID string) (string, impact.Summon, error)
- func (s *S) NewOutcomeSet(name, description, instructions string, skippable bool, u auth.User) (impact.OutcomeSet, error)
- func (s *S) NewQuestion(outcomeSetID, question, short, description string, ...) (impact.Question, error)
- func (s *S) NewSummon(questionnaire string, ttl time.Duration, u auth.User) (string, error)
- func (s *S) RemoveCategory(outcomeSetID, questionID string, u auth.User) (impact.Question, error)
- func (s *S) SaveExport(e *impact.Export, ttl time.Duration, u auth.User) (string, error)
- func (s *S) SaveInvite(ttl time.Duration, u auth.User) (string, error)
- func (s *S) SaveJWT(jti, jwt, creatorUserID string) error
- func (s *S) SaveReportRequest(start, end time.Time, qID string, tags []string, other map[string]interface{}, ...) error
- func (s *S) SaveSummonAcceptance(beneficiaryID string, summonID string, meetingID string, jti string, ...) error
- func (s *S) SetBeneficiaryTags(id string, tags []string, u auth.User) (impact.Beneficiary, error)
- func (s *S) SetCategory(outcomeSetID, questionID, categoryID string, u auth.User) (impact.Question, error)
- func (s *S) SetNotes(meetingID string, notes *string, u auth.User) (impact.Meeting, error)
- func (s *S) UpdateSetting(orgID, setting string, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S ¶
type S struct {
*mgo.Session
}
S is a mongo session
func (*S) AddOrganisation ¶
func (s *S) AddOrganisation(name string) (impact.Organisation, error)
func (*S) CompleteMeeting ¶
func (*S) DeleteCategory ¶
func (*S) DeleteOrganisation ¶
func (*S) DeleteQuestion ¶
func (*S) EditCategory ¶
func (*S) EditMeetingBeneficiary ¶
func (*S) EditMeetingDate ¶
func (*S) EditMeetingTags ¶
func (*S) EditOutcomeSet ¶
func (*S) EditQuestion ¶
func (*S) EnsureIndexes ¶
EnsureIndexes creates the required indexes on the mongo database
func (*S) GetBeneficiary ¶
GetBeneficiary gets a beneficiary's details. Beneficiary information is optional, as such, we first check the beneficiary collection then fall back to see if the beneficiary has registered meetings.
func (*S) GetCategory ¶
func (*S) GetFilteredOSMeetingsForBeneficiaries ¶
func (*S) GetFilteredOSMeetingsInTimeRange ¶
func (*S) GetIncompleteMeetingsForBeneficiary ¶
func (*S) GetMeetingsForBeneficiary ¶
func (*S) GetOSMeetingsForBeneficiary ¶
func (*S) GetOSMeetingsInTimeRange ¶
func (*S) GetOrganisation ¶
func (s *S) GetOrganisation(id string) (impact.Organisation, error)
func (*S) GetOrganisations ¶
func (s *S) GetOrganisations(offset, limit int) ([]impact.Organisation, error)
func (*S) GetOutcomeSet ¶
func (*S) GetOutcomeSets ¶
func (*S) GetQuestion ¶
func (*S) GetQuestionnaireTagSuggestions ¶
func (*S) GetRecentMeetings ¶
func (*S) GetTagSuggestions ¶
func (*S) ImportOutcomeSet ¶
func (s *S) ImportOutcomeSet(os impact.OutcomeSet, u auth.User) (impact.OutcomeSet, error)
func (*S) MoveQuestion ¶
func (*S) NewCategory ¶
func (*S) NewMeeting ¶
func (*S) NewMeetingFromSummon ¶
func (*S) NewOutcomeSet ¶
func (*S) NewQuestion ¶
func (*S) RemoveCategory ¶
func (*S) SaveExport ¶
func (*S) SaveReportRequest ¶
func (*S) SaveSummonAcceptance ¶
func (*S) SetBeneficiaryTags ¶
func (*S) SetCategory ¶
func (*S) UpdateSetting ¶
Click to show internal directories.
Click to hide internal directories.