Documentation
¶
Index ¶
- Constants
- func AveryLabels(pdffile io.Writer, addresses []addressFormatter)
- func Connect(ctx context.Context, uri string) error
- func Disconnect()
- func DoxologyEmailedDirect(ctx context.Context) ([]string, error)
- func DoxologyPrinted(ctx context.Context, w io.Writer) error
- func DoxologySync(ctx context.Context) error
- func FontEmailedDirect(ctx context.Context) ([]string, error)
- func FontSync(ctx context.Context) error
- func FormatAddress(m addressFormatter) (string, error)
- func FormatPhoneNumber(number string, country string) (string, error)
- func Friendzone(ctx context.Context) error
- func ReportAllEmail(ctx context.Context, w io.Writer) error
- func ReportAllSubscribers(ctx context.Context, w io.Writer) error
- func ReportAnnual(ctx context.Context, w io.Writer) error
- func ReportAvery(ctx context.Context, w io.Writer) error
- func ReportBarb(ctx context.Context, w io.Writer) error
- func ReportExpired(ctx context.Context, w io.Writer) error
- func ReportLife(ctx context.Context, w io.Writer) error
- func ReportLifeCheckinFormMerge(ctx context.Context, w io.Writer) error
- func ReportReaffirmationFormMerge(ctx context.Context, w io.Writer) error
- func SetMeField(ctx context.Context, id MemberID, field string, value string) error
- type Authname
- type ChangeLogEntry
- type Chapter
- type ChapterID
- type Commemoration
- type Dashboard_t
- type GivingRecord
- type Locality
- type Member
- func Leadership(ctx context.Context, category string) ([]*Member, error)
- func LocalityMembers(ctx context.Context, country string, locality string) ([]*Member, error)
- func Necrology(ctx context.Context) ([]*Member, error)
- func SearchBirthday(ctx context.Context, month time.Month, day int) ([]*Member, error)
- func (m *Member) Changelog() ([]*ChangeLogEntry, error)
- func (n *Member) CleanUnlisted()
- func (m *Member) ISOCountry() string
- func (n *Member) OSLName() string
- func (n *Member) OSLShortName() string
- func (m *Member) SetChapters(ctx context.Context, incoming ...int) error
- func (m *Member) WriteVCard(w io.Writer) error
- type MemberID
- func ActiveMemberIDs(ctx context.Context) ([]MemberID, error)
- func ActiveMemberIDsUS(ctx context.Context) ([]MemberID, error)
- func AnnualMemberIDs(ctx context.Context) ([]MemberID, error)
- func Create(firstname, lastname string) (MemberID, error)
- func FriendIDs(ctx context.Context) ([]MemberID, error)
- func JustMemberIDsUS(ctx context.Context) ([]MemberID, error)
- func LifeMemberIDs(ctx context.Context) ([]MemberID, error)
- func NecrologyIDs(ctx context.Context) ([]MemberID, error)
- func NewMemberIDs(ctx context.Context) ([]MemberID, error)
- func ReminderAnnual(ctx context.Context) ([]MemberID, error)
- func TestMemberIDs() ([]MemberID, error)
- func (id MemberID) ChangeLogStore(c ChangeLogEntry) error
- func (id MemberID) Get(ctx context.Context) (*Member, error)
- func (id MemberID) GetChapters() ([]int, error)
- func (m MemberID) GetNotes() ([]*Note, error)
- func (id MemberID) GivingRecords() ([]*GivingRecord, error)
- func (id MemberID) SetMemberField(ctx context.Context, field string, value string, changer MemberID) error
- func (id MemberID) SubscribeAllChapters(ctx context.Context) error
- func (id MemberID) SubscribeChapter(ctx context.Context, chapterid ChapterID) error
- func (id MemberID) SubscribeDoxology(ctx context.Context) error
- func (id MemberID) SubscribeFont(ctx context.Context) error
- func (id MemberID) UnsubscribeAllChapters(ctx context.Context) error
- func (id MemberID) UnsubscribeChapter(ctx context.Context, chapterid ChapterID) error
- func (id MemberID) UnsubscribeDoxology(ctx context.Context) error
- func (id MemberID) UnsubscribeFont(ctx context.Context) error
- type Note
- type NoteID
- type SearchResult
- type SubSearchResult
- type Subscriber
- type SubscriberID
Constants ¶
const ANNUAL = "Annual Vows"
const DECEASED = "Deceased"
const ELECTRONIC communicationPref = "electronic"
const FRIEND = "Friend"
const LIFE = "Life Vows"
const MAILED communicationPref = "mailed"
const NONE communicationPref = "none"
const REMOVED = "Removed"
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
Connect tries to establish a connection to a MySQL/MariaDB database under the given URI and initializes the tables if they don"t exist yet.
func Disconnect ¶
func Disconnect()
Disconnect closes the database connection called only at server shutdown
func DoxologyEmailedDirect ¶
DoxologyEmailedDirect returns a list of addresses for direct API processing, so we can dump the CSV stuff
func DoxologySync ¶
func FontEmailedDirect ¶
FontEmailedDirect returns a list of addresses for direct google groups API processing
func FormatAddress ¶
Make sure that addresses for mailing are properly formatted - handle both members and subscribers
func Friendzone ¶
Friendzone moves all members who have not reaffirmed vows in the past friendzoneMinDays and converts them to friends
Types ¶
type ChangeLogEntry ¶
type Commemoration ¶
func Commemorations ¶
type Dashboard_t ¶
type Dashboard_t struct {
LifevowCount int
AnnualCount int
FriendCount int
SubscriberCount int
ThisYearGiving string
LastYearGiving string
AnnualVowsWhoGave int
LifeVowsWhoGave int
AnnualVowsReaffirmed int
LifeVowsCheckin int
}
Dashboard is the format sent to the UI
func Dashboard ¶
func Dashboard() (Dashboard_t, error)
type GivingRecord ¶
type GivingRecord struct {
EntryID int
ID MemberID
Amount float64
Check int
Transaction string
Description string
Date time.Time
}
func (*GivingRecord) Store ¶
func (n *GivingRecord) Store() error
type Member ¶
type Member struct {
ID MemberID
MemberStatus string
FirstName string
MiddleName string
LastName string
PreferredName string
Title string
LifevowName string
Suffix string
Address string
AddressLine2 string
City string
State string
Country string
PostalCode string
PrimaryPhone string
SecondaryPhone string
PrimaryEmail string
SecondaryEmail string
BirthDate time.Time
DateRecordCreated time.Time
DateFirstVows time.Time
DateReaffirmation time.Time
DateRemoved time.Time
DateDeceased time.Time
DateNovitiate time.Time
DateLifeVows time.Time
Status string
Leadership string
HowJoined string
HowRemoved string
ListInDirectory bool
ListAddress bool
ListPrimaryPhone bool
ListSecondaryPhone bool
ListPrimaryEmail bool
ListSecondaryEmail bool
Doxology communicationPref
Newsletter communicationPref
Communication communicationPref
Occupation string
Employer string
Denomination string
Benefactor bool
FormattedAddr string // only populated for export to webui
}
Member is the format sent to the UI
func LocalityMembers ¶
func SearchBirthday ¶
func (*Member) Changelog ¶
func (m *Member) Changelog() ([]*ChangeLogEntry, error)
func (*Member) CleanUnlisted ¶
func (n *Member) CleanUnlisted()
func (*Member) ISOCountry ¶
func (*Member) OSLShortName ¶
func (*Member) SetChapters ¶
type MemberID ¶
type MemberID int
func ActiveMemberIDs ¶
ActiveMemberIDs returns All Annual Vows, Life Vows and Friends
func ActiveMemberIDsUS ¶
ActiveMemberIDsUS returns All Annual Vows, Life Vows and Friends in the US
func AnnualMemberIDs ¶
AnnualMemberIDs does what it says
func JustMemberIDsUS ¶
JustMemberIDsUS returns All Annual Vows and Life Vows in the US
func LifeMemberIDs ¶
LifeMemberIDs does what it says
func NecrologyIDs ¶
NecrologyIDs does what it says
func NewMemberIDs ¶
NewMemberIDs does what it says
func ReminderAnnual ¶
ReminderAnnual returns those who have not reaffirmed in the past year
func TestMemberIDs ¶
func (MemberID) ChangeLogStore ¶
func (id MemberID) ChangeLogStore(c ChangeLogEntry) error
func (MemberID) GetChapters ¶
func (MemberID) GivingRecords ¶
func (id MemberID) GivingRecords() ([]*GivingRecord, error)
func (MemberID) SetMemberField ¶
func (MemberID) SubscribeAllChapters ¶
func (MemberID) SubscribeChapter ¶
func (MemberID) UnsubscribeAllChapters ¶
func (MemberID) UnsubscribeChapter ¶
func (MemberID) UnsubscribeDoxology ¶
type SearchResult ¶
type SearchResult struct {
ID MemberID
MemberStatus string
FirstName string
LastName string
PreferredName string
ListInDirectory bool
}
SearchResult is the format sent to the UI
func SearchEmail ¶
type SubSearchResult ¶
type SubSearchResult struct {
ID SubscriberID
Name string
Attn string
}
SearchResult is the format sent to the UI
func SubscriberSearch ¶
func SubscriberSearch(ctx context.Context, query string) ([]*SubSearchResult, error)
GetMember returns a populated Member struct, NULLs converted to ""
func SubscriberSearchEmail ¶
func SubscriberSearchEmail(ctx context.Context, query string) ([]*SubSearchResult, error)
type Subscriber ¶
type Subscriber struct {
ID SubscriberID
Name string
Attn string
Address string
AddressLine2 string
City string
State string
Country string
PostalCode string
PrimaryPhone string
SecondaryPhone string
PrimaryEmail string
SecondaryEmail string
DateRecordCreated time.Time
DatePaid time.Time
Doxology communicationPref
Newsletter communicationPref
Communication communicationPref
FormattedAddr string
}
func (*Subscriber) ISOCountry ¶
func (s *Subscriber) ISOCountry() string
type SubscriberID ¶
type SubscriberID int
func (SubscriberID) Get ¶
func (id SubscriberID) Get(ctx context.Context) (*Subscriber, error)
Source Files
¶
- addressmember.go
- addresssubscriber.go
- auth.go
- avery.go
- birthday.go
- changelog.go
- chapter.go
- chaptersync.go
- dashboard.go
- database.go
- doxologysync.go
- fontsync.go
- formataddress.go
- friend.go
- giving.go
- leadership.go
- localities.go
- me.go
- member.go
- necrology.go
- note.go
- phone.go
- report.go
- search.go
- subscriber.go
- subscribersearch.go
- vcard.go