Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Title string FirstName string LastName string Email mail.Address Password string AddressLine1 string AddressLine2 string County string TownOrCity string Postcode string Country string }
Account represents a JustGiving user account
func (Account) HasValidCountry ¶
func (acc Account) HasValidCountry(vs AccountValidationService) (bool, error)
HasValidCountry checks the Country is in the published JustGiving Countries list
func (Account) PlainEmail ¶
PlainEmail returns a plainer email address (mail.Address stores email in the format <rob@golang.org>, this simply removes the `<` `>`
type AccountValidationService ¶
AccountValidationService defines the validation methods requiring calls to the JustGiving API.
For an implementation see justin.Service
type FundraisingPageForEvent ¶
type FundraisingPageForEvent struct { CharityID uint EventID uint PageShortName string PageTitle string PageStory string Images []Image CustomCodes [6]string // TargetAmount for this fundraising effort expressed as a valid currency amount e.g. "999.99" or "9999" TargetAmount string // CurrencyCode CurrencyCode string CharityFunded bool JustGivingOptIn bool CharityOptIn bool TeamID uint }
FundraisingPageForEvent represents a JustGiving fundraising page for a pre-defined JustGiving event
func (FundraisingPageForEvent) HasValidCurrencyCode ¶
func (fp FundraisingPageForEvent) HasValidCurrencyCode(vs FundraisingPageForEventValidationService) (bool, error)
HasValidCurrencyCode checks the CurrencyCode is in the published JustGiving currency code list
func (FundraisingPageForEvent) HasValidTargetAmount ¶
func (fp FundraisingPageForEvent) HasValidTargetAmount() bool
HasValidTargetAmount performs basic validation on the TargetAmount
type FundraisingPageForEventValidationService ¶
type FundraisingPageForEventValidationService interface {
IsValidCurrencyCode(currencyCode string) (bool, error)
}
FundraisingPageForEventValidationService defines the validation methods requiring calls to the JustGiving API.
For an implementation see justin.Service