Documentation ¶
Index ¶
- type Config
- type Mongo
- func (m *Mongo) AddOrganisation(name string) (impact.Organisation, error)
- func (m *Mongo) CompleteMeeting(meetingID string, u auth.User) (impact.Meeting, error)
- func (m *Mongo) DeleteCategory(outcomeSetID string, categoryID string, u auth.User) error
- func (m *Mongo) DeleteMeeting(meetingID string, u auth.User) error
- func (m *Mongo) DeleteOrganisation(id string) error
- func (m *Mongo) DeleteOutcomeSet(id string, u auth.User) error
- func (m *Mongo) DeleteQuestion(outcomeSetID string, questionID string, u auth.User) error
- func (m *Mongo) EditCategory(outcomeSetID string, categoryID string, name string, description string, ...) (impact.Category, error)
- func (m *Mongo) EditMeetingBeneficiary(meetingID, newBenID string, u auth.User) (impact.Meeting, error)
- func (m *Mongo) EditMeetingDate(meetingID string, conducted time.Time, u auth.User) (impact.Meeting, error)
- func (m *Mongo) EditMeetingTags(meetingID string, newTags []string, u auth.User) (impact.Meeting, error)
- func (m *Mongo) EditOutcomeSet(id string, name string, description string, instructions string, ...) (impact.OutcomeSet, error)
- func (m *Mongo) EditQuestion(outcomeSetID string, questionID string, question string, short string, ...) (impact.Question, error)
- func (m *Mongo) GetBeneficiaries(u auth.User) ([]string, error)
- func (m *Mongo) GetBeneficiary(id string, u auth.User) (impact.Beneficiary, error)
- func (m *Mongo) GetCategory(outcomeSetID string, categoryID string, u auth.User) (impact.Category, error)
- func (m *Mongo) GetExport(id string) (*impact.Export, error)
- func (m *Mongo) GetFilteredOSMeetingsForBeneficiaries(beneficiaries []string, outcomeSetID string, tags []string, or bool, ...) ([]impact.Meeting, error)
- func (m *Mongo) GetFilteredOSMeetingsInTimeRange(start time.Time, end time.Time, outcomeSetID string, tags []string, or bool, ...) ([]impact.Meeting, error)
- func (m *Mongo) GetIncompleteMeetingsForBeneficiary(beneficiary string, u auth.User) ([]impact.Meeting, error)
- func (m *Mongo) GetInvite(id string) (string, error)
- func (m *Mongo) GetJWT(jti string) (string, error)
- func (m *Mongo) GetMeeting(id string, u auth.User) (impact.Meeting, error)
- func (m *Mongo) GetMeetingsForBeneficiary(beneficiary string, u auth.User) ([]impact.Meeting, error)
- func (m *Mongo) GetOSMeetingsForBeneficiary(beneficiary string, outcomeSetID string, u auth.User) ([]impact.Meeting, error)
- func (m *Mongo) GetOSMeetingsInTimeRange(start time.Time, end time.Time, outcomeSetID string, u auth.User) ([]impact.Meeting, error)
- func (m *Mongo) GetOrganisation(id string) (impact.Organisation, error)
- func (m *Mongo) GetOrganisations(offset int, limit int) ([]impact.Organisation, error)
- func (m *Mongo) GetOutcomeSet(id string, u auth.User) (impact.OutcomeSet, error)
- func (m *Mongo) GetOutcomeSets(u auth.User) ([]impact.OutcomeSet, error)
- func (m *Mongo) GetQuestion(outcomeSetID string, questionID string, u auth.User) (impact.Question, error)
- func (m *Mongo) GetQuestionnaireTagSuggestions(qID string, u auth.User) ([]string, error)
- func (m *Mongo) GetRecentMeetings(limit int, page int, u auth.User) ([]impact.Meeting, error)
- func (m *Mongo) GetTagSuggestions(beneficiary string, u auth.User) ([]string, error)
- func (m *Mongo) GetTags(u auth.User) ([]string, error)
- func (m *Mongo) HasGeneratedReport(orgID string) (bool, error)
- func (m *Mongo) ImportOutcomeSet(os impact.OutcomeSet, u auth.User) (impact.OutcomeSet, error)
- func (m *Mongo) MoveQuestion(outcomeSetID string, questionID string, newIndex uint, u auth.User) error
- func (m *Mongo) NewAnswer(meetingID string, answer impact.Answer, allowOverwrite bool, u auth.User) (impact.Meeting, error)
- func (m *Mongo) NewCategory(outcomeSetID string, name string, description string, ...) (impact.Category, error)
- func (m *Mongo) NewMeeting(beneficiaryID string, outcomeSetID string, conducted time.Time, tags []string, ...) (impact.Meeting, error)
- func (m *Mongo) NewMeetingFromSummon(summon string, beneficiaryID string) (string, impact.Summon, error)
- func (m *Mongo) NewOutcomeSet(name string, description string, instructions string, skippable bool, ...) (impact.OutcomeSet, error)
- func (m *Mongo) NewQuestion(outcomeSetID string, question string, short string, description string, ...) (impact.Question, error)
- func (m *Mongo) NewSummon(questionnaire string, ttl time.Duration, u auth.User) (string, error)
- func (m *Mongo) RemoveCategory(outcomeSetID string, questionID string, u auth.User) (impact.Question, error)
- func (m *Mongo) SaveExport(e *impact.Export, ttl time.Duration, u auth.User) (string, error)
- func (m *Mongo) SaveInvite(ttl time.Duration, u auth.User) (string, error)
- func (m *Mongo) SaveJWT(jti string, jwt string, creatorUserID string) error
- func (m *Mongo) SaveReportRequest(start time.Time, end time.Time, qID string, tags []string, ...) error
- func (m *Mongo) SaveSummonAcceptance(beneficiaryID string, summonID string, meetingID string, jti string, ...) error
- func (m *Mongo) SetBeneficiaryTags(id string, tags []string, u auth.User) (impact.Beneficiary, error)
- func (m *Mongo) SetCategory(outcomeSetID string, questionID string, categoryID string, u auth.User) (impact.Question, error)
- func (m *Mongo) SetNotes(meetingID string, notes *string, u auth.User) (impact.Meeting, error)
- func (m *Mongo) UpdateSetting(orgID string, setting string, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // URI is the mongo database's URI connection string URI string `envconfig:"MONGO_URI" required:"true"` }
Config is the configuration required to connect to the mongo DB
type Mongo ¶
type Mongo struct {
// contains filtered or unexported fields
}
func (*Mongo) AddOrganisation ¶
func (m *Mongo) AddOrganisation(name string) (impact.Organisation, error)
func (*Mongo) CompleteMeeting ¶
func (*Mongo) DeleteCategory ¶
func (*Mongo) DeleteOrganisation ¶
func (*Mongo) DeleteQuestion ¶
func (*Mongo) EditCategory ¶
func (*Mongo) EditMeetingBeneficiary ¶
func (*Mongo) EditMeetingDate ¶
func (*Mongo) EditMeetingTags ¶
func (*Mongo) EditOutcomeSet ¶
func (*Mongo) EditQuestion ¶
func (*Mongo) GetBeneficiary ¶
func (*Mongo) GetCategory ¶
func (*Mongo) GetFilteredOSMeetingsForBeneficiaries ¶
func (*Mongo) GetFilteredOSMeetingsInTimeRange ¶
func (*Mongo) GetIncompleteMeetingsForBeneficiary ¶
func (*Mongo) GetMeeting ¶
func (*Mongo) GetMeetingsForBeneficiary ¶
func (*Mongo) GetOSMeetingsForBeneficiary ¶
func (*Mongo) GetOSMeetingsInTimeRange ¶
func (*Mongo) GetOrganisation ¶
func (m *Mongo) GetOrganisation(id string) (impact.Organisation, error)
func (*Mongo) GetOrganisations ¶
func (*Mongo) GetOutcomeSet ¶
func (*Mongo) GetOutcomeSets ¶
func (*Mongo) GetQuestion ¶
func (*Mongo) GetQuestionnaireTagSuggestions ¶
func (*Mongo) GetRecentMeetings ¶
func (*Mongo) GetTagSuggestions ¶
func (*Mongo) ImportOutcomeSet ¶
func (m *Mongo) ImportOutcomeSet(os impact.OutcomeSet, u auth.User) (impact.OutcomeSet, error)
func (*Mongo) MoveQuestion ¶
func (*Mongo) NewCategory ¶
func (*Mongo) NewMeeting ¶
func (*Mongo) NewMeetingFromSummon ¶
func (*Mongo) NewOutcomeSet ¶
func (*Mongo) NewQuestion ¶
func (*Mongo) RemoveCategory ¶
func (*Mongo) SaveExport ¶
func (*Mongo) SaveInvite ¶
func (*Mongo) SaveReportRequest ¶
func (*Mongo) SaveSummonAcceptance ¶
func (*Mongo) SetBeneficiaryTags ¶
func (*Mongo) SetCategory ¶
Click to show internal directories.
Click to hide internal directories.