donationProviders

package
v0.0.0-...-519d529 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GDQDonationProvider

type GDQDonationProvider struct {
	// contains filtered or unexported fields
}

GDQDonationProvider represents a GDQDonationProvider

func NewGDQDonationProvider

func NewGDQDonationProvider(t, e, username, password string) (*GDQDonationProvider, error)

NewGDQDonationProvider will initialize and return a new GDQ Tracker Donation provider where t is the tracker URL and e is the event id

func (*GDQDonationProvider) GetDonations

func (gdq *GDQDonationProvider) GetDonations() ([]donations.Donation, error)

GetDonations will return all donations

func (*GDQDonationProvider) GetTotalAmount

func (gdq *GDQDonationProvider) GetTotalAmount() (float64, error)

GetTotalAmount will get the total donation amount

func (*GDQDonationProvider) GetTotalDonations

func (gdq *GDQDonationProvider) GetTotalDonations() (int, error)

GetTotalDonations will return the amount of donations

type MockDonationProvider

type MockDonationProvider struct {
	InitalValue float64
}

func (*MockDonationProvider) GetTotalAmount

func (m *MockDonationProvider) GetTotalAmount() float64

type SRComDonationProvider

type SRComDonationProvider struct {
	// contains filtered or unexported fields
}

SRComDonationProvider satisfies the DonationsInterface and can be used as a donation provider

func NewSRComDonationProvider

func NewSRComDonationProvider(ms string) (*SRComDonationProvider, error)

NewSRComDonationProvider will initialize and return a new SRCom Donation provider where ms is the marathon slug

func (*SRComDonationProvider) GetDonations

func (sr *SRComDonationProvider) GetDonations() ([]donations.Donation, error)

GetDonations will return all donations

func (*SRComDonationProvider) GetTotalAmount

func (sr *SRComDonationProvider) GetTotalAmount() (float64, error)

GetTotalAmount will get the total donation amount

func (*SRComDonationProvider) GetTotalDonations

func (sr *SRComDonationProvider) GetTotalDonations() (int, error)

GetTotalDonations will return the amount of donations

Jump to

Keyboard shortcuts

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