Documentation ¶
Index ¶
- type DonationService
- func (s *DonationService) Create(firstName string, lastName string, message string, amount string) models.Donation
- func (s *DonationService) DeleteByID(id int) (*models.Donation, error)
- func (s *DonationService) GetAll() []models.Donation
- func (s *DonationService) GetByID(id int) (*models.Donation, error)
- type GuestService
- func (s *GuestService) Create(firstName string, lastName string, i models.Invitation) models.Guest
- func (s *GuestService) DeleteByID(id int) (*models.Guest, error)
- func (s *GuestService) GetAll() []models.Guest
- func (s *GuestService) GetAllByInvitationID(id uint) ([]models.Guest, error)
- func (s *GuestService) GetByID(id int) (*models.Guest, error)
- func (s *GuestService) GetCountByInvitationID(id uint) int
- type InvitationService
- func (s *InvitationService) Create(name string, message string, email string, phone string, guestCount int) (*models.Invitation, error)
- func (s *InvitationService) DeclineById(id int) (*models.Invitation, error)
- func (s *InvitationService) DeleteByID(id int) (*models.Invitation, error)
- func (s *InvitationService) GetAll() []models.Invitation
- func (s *InvitationService) GetByEmail(email string) (*models.Invitation, error)
- func (s *InvitationService) GetByID(id int) (*models.Invitation, error)
- func (s *InvitationService) GetByPhone(phone string) (*models.Invitation, error)
- func (s *InvitationService) GetByRegistrationKey(key string) (*models.Invitation, error)
- func (s *InvitationService) Search(value string) (*models.Invitation, error)
- func (s *InvitationService) UpdateGuestCountById(id int, change int) (*models.Invitation, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DonationService ¶ added in v1.1.0
type DonationService struct {
// contains filtered or unexported fields
}
DonationService service for managing donations
func NewDonationService ¶ added in v1.1.0
func NewDonationService() *DonationService
NewDonationService creates an instance of the donation service
func (*DonationService) Create ¶ added in v1.1.0
func (s *DonationService) Create(firstName string, lastName string, message string, amount string) models.Donation
Create creates a new guest and returns it
func (*DonationService) DeleteByID ¶ added in v1.1.0
func (s *DonationService) DeleteByID(id int) (*models.Donation, error)
DeleteByID deletes a donation by its id and returns the deleted item and an error is it cannot be found
func (*DonationService) GetAll ¶ added in v1.1.0
func (s *DonationService) GetAll() []models.Donation
GetAll returns a list of all guests
type GuestService ¶
type GuestService struct {
// contains filtered or unexported fields
}
GuestService service for managing guests
func NewGuestService ¶
func NewGuestService() *GuestService
NewGuestService creates an instance of the guest service
func (*GuestService) Create ¶ added in v1.1.0
func (s *GuestService) Create(firstName string, lastName string, i models.Invitation) models.Guest
Create creates a new guest and returns it
func (*GuestService) DeleteByID ¶ added in v1.1.0
func (s *GuestService) DeleteByID(id int) (*models.Guest, error)
DeleteByID deletes a guest by its id and returns the deleted item and an error is it cannot be found
func (*GuestService) GetAll ¶ added in v1.1.0
func (s *GuestService) GetAll() []models.Guest
GetAll returns a list of all guests
func (*GuestService) GetAllByInvitationID ¶ added in v1.1.0
func (s *GuestService) GetAllByInvitationID(id uint) ([]models.Guest, error)
GetAllByInvitationID returns a list of all guests for a given invitation id
func (*GuestService) GetByID ¶ added in v1.1.0
func (s *GuestService) GetByID(id int) (*models.Guest, error)
GetByID returns a guest by its id and returns it and an error if not found
func (*GuestService) GetCountByInvitationID ¶ added in v1.1.0
func (s *GuestService) GetCountByInvitationID(id uint) int
GetCountByInvitationID returns a count of all guests for a given invitation id
type InvitationService ¶
type InvitationService struct {
// contains filtered or unexported fields
}
InvitationService service for managing invitations
func NewInvitationService ¶
func NewInvitationService() *InvitationService
NewInvitationService creates an instance of the invitation service
func (*InvitationService) Create ¶ added in v1.1.0
func (s *InvitationService) Create(name string, message string, email string, phone string, guestCount int) (*models.Invitation, error)
Create creates a new invitation and returns it
func (*InvitationService) DeclineById ¶ added in v1.1.1
func (s *InvitationService) DeclineById(id int) (*models.Invitation, error)
DeclineById decline an invitation by its id and returns the item or an error is it cannot be found
func (*InvitationService) DeleteByID ¶ added in v1.1.0
func (s *InvitationService) DeleteByID(id int) (*models.Invitation, error)
DeleteByID deletes an invitation by its id and returns the deleted item or an error is it cannot be found
func (*InvitationService) GetAll ¶ added in v1.1.0
func (s *InvitationService) GetAll() []models.Invitation
GetAll returns a list with all invitations
func (*InvitationService) GetByEmail ¶ added in v1.1.0
func (s *InvitationService) GetByEmail(email string) (*models.Invitation, error)
GetByEmail gets an invitation by email
func (*InvitationService) GetByID ¶ added in v1.1.0
func (s *InvitationService) GetByID(id int) (*models.Invitation, error)
GetByID returns an invitation by its id and an error is it cannot be found
func (*InvitationService) GetByPhone ¶ added in v1.1.0
func (s *InvitationService) GetByPhone(phone string) (*models.Invitation, error)
GetByPhone gets an invitation by phone
func (*InvitationService) GetByRegistrationKey ¶ added in v1.1.0
func (s *InvitationService) GetByRegistrationKey(key string) (*models.Invitation, error)
GetByRegistrationKey returns an invitation by its registration key and an error is it cannot be found
func (*InvitationService) Search ¶ added in v1.1.0
func (s *InvitationService) Search(value string) (*models.Invitation, error)
Search Attempts to find an invitation by phone email and registration key
func (*InvitationService) UpdateGuestCountById ¶ added in v1.2.0
func (s *InvitationService) UpdateGuestCountById(id int, change int) (*models.Invitation, error)
UpdateGuestCountById update an invitation guest count by its id and returns the item or an error is it cannot be found