Documentation ¶
Index ¶
- func NewAccountRepository(postgresCtx interfaces.PostgresContext, stripeCtx interfaces.StripeContext) interfaces.AccountRepository
- func NewBalanceRepository(stripeCtx interfaces.StripeContext) interfaces.BalanceRepository
- func NewBillingDetailsRepository() interfaces.BillingDetailsRepository
- func NewCourseRepository(postgresCtx interfaces.PostgresContext) interfaces.CourseRepository
- func NewCustomerRepository(postgresContext interfaces.PostgresContext, ...) interfaces.CustomerRepository
- func NewEnrollmentRepository() interfaces.EnrollmentRepository
- func NewPaymentMethodRepository(postgresContext interfaces.PostgresContext, ...) interfaces.PaymentMethodRepository
- func NewScheduleRepository() interfaces.ScheduleRepository
- func NewStudentRepository() interfaces.StudentRepository
- func NewUserRepository(cognitoIdentityCtx interfaces.CognitoIdentityContext, ...) interfaces.UserRepository
- type AccountRepository
- func (repo *AccountRepository) Add(params *models.AddAccountParameters) (*models.AddAccountResult, error)
- func (repo *AccountRepository) GetByID(params *models.GetAccountByIDParameters) (*models.GetAccountByIDResult, error)
- func (repo *AccountRepository) GetByStripeID(params *models.GetAccountByStripeIDParameters) (*models.GetAccountByStripeIDResult, error)
- func (repo *AccountRepository) Remove(params *models.RemoveAccountParameters) (*models.RemoveAccountResult, error)
- func (repo *AccountRepository) Update(params *models.UpdateAccountParameters) (*models.UpdateAccountResult, error)
- type BalanceRepository
- type BillingDetailsRepository
- func (repo *BillingDetailsRepository) Add(params *models.AddBillingDetailsParameters) (*models.AddBillingDetailsResult, error)
- func (repo *BillingDetailsRepository) GetByID(params *models.GetBillingDetailsByIDParameters) (*models.GetBillingDetailsByIDResult, error)
- func (repo *BillingDetailsRepository) GetByPaymentMethodID(params *models.GetBillingDetailsByPaymentMethodIDParameters) (*models.GetBillingDetailsByPaymentMethodIDResult, error)
- func (repo *BillingDetailsRepository) Remove(params *models.RemoveBillingDetailsParameters) (*models.RemoveBillingDetailsResult, error)
- type CourseRepository
- func (repo *CourseRepository) Add(params *models.AddCourseParameters) (*models.AddCourseResult, error)
- func (repo *CourseRepository) GetByID(params *models.GetCourseByIDParameters) (*models.GetCourseByIDResult, error)
- func (repo *CourseRepository) GetByOrganizationID(params *models.GetCoursesByOrganizationIDParameters) (*models.GetCoursesByOrganizationIDResult, error)
- func (repo *CourseRepository) Remove(params *models.RemoveCourseParameters) (*models.RemoveCourseResult, error)
- func (repo *CourseRepository) Update(params *models.UpdateCourseParameters) (*models.UpdateCourseResult, error)
- type CustomerRepository
- func (repository *CustomerRepository) Add(parameters *models.AddCustomerParameters) (*models.AddCustomerResult, error)
- func (repository *CustomerRepository) GetByID(parameters *models.GetCustomerByIDParameters) (*models.GetCustomerByIDResult, error)
- func (repository *CustomerRepository) GetByUserID(parameters *models.GetCustomerByUserIDParameters) (*models.GetCustomerByUserIDResult, error)
- func (repository *CustomerRepository) Remove(parameters *models.RemoveCustomerParameters) (*models.RemoveCustomerResult, error)
- func (repository *CustomerRepository) Update(parameters *models.UpdateCustomerParameters) (*models.UpdateCustomerResult, error)
- type EnrollmentRepository
- func (repository *EnrollmentRepository) Add(parameters *models.AddEnrollmentParameters) (*models.AddEnrollmentResult, error)
- func (repository *EnrollmentRepository) GetByID(parameters *models.GetEnrollmentByIDParameters) (*models.GetEnrollmentByIDResult, error)
- func (repository *EnrollmentRepository) GetByScheduleID(parameters *models.GetEnrollmentsByScheduleIDParameters) (*models.GetEnrollmentsByScheduleIDResult, error)
- func (repository *EnrollmentRepository) GetByStudentID(parameters *models.GetEnrollmentsByStudentIDParameters) (*models.GetEnrollmentsByStudentIDResult, error)
- func (repository *EnrollmentRepository) Remove(parameters *models.RemoveEnrollmentParameters) (*models.RemoveEnrollmentResult, error)
- func (repository *EnrollmentRepository) Update(parameters *models.UpdateEnrollmentParameters) (*models.UpdateEnrollmentResult, error)
- type FamilyMemberRepository
- type InstructorRepository
- type PaymentMethodRepository
- func (repository *PaymentMethodRepository) Add(parameters *models.AddPaymentMethodParameters) (*models.AddPaymentMethodResult, error)
- func (repository *PaymentMethodRepository) GetByCustomerID(customerID *string) ([]*entities.PaymentMethod, error)
- func (repository *PaymentMethodRepository) GetByID(id *string) (*entities.PaymentMethod, error)
- type ScheduleRepository
- type StudentRepository
- type SubscriptionRepository
- type UserRepository
- func (repo *UserRepository) Add(params *models.AddUserParameters) (*models.AddUserResult, error)
- func (repo *UserRepository) GetByID(params *models.GetUserByIDParameters) (*models.GetUserByIDResult, error)
- func (repo *UserRepository) GetByUsername(params *models.GetUserByUsernameParameters) (*models.GetUserByUsernameResult, error)
- func (repo *UserRepository) Remove(params *models.RemoveUserParameters) (*models.RemoveUserResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccountRepository ¶
func NewAccountRepository(postgresCtx interfaces.PostgresContext, stripeCtx interfaces.StripeContext) interfaces.AccountRepository
NewAccountRepository ...
func NewBalanceRepository ¶
func NewBalanceRepository(stripeCtx interfaces.StripeContext) interfaces.BalanceRepository
NewBalanceRepository ...
func NewBillingDetailsRepository ¶
func NewBillingDetailsRepository() interfaces.BillingDetailsRepository
NewBillingDetailsRepository ...
func NewCourseRepository ¶
func NewCourseRepository(postgresCtx interfaces.PostgresContext) interfaces.CourseRepository
NewCourseRepository ...
func NewCustomerRepository ¶
func NewCustomerRepository(postgresContext interfaces.PostgresContext, stripeContext interfaces.StripeContext) interfaces.CustomerRepository
NewCustomerRepository ...
func NewEnrollmentRepository ¶
func NewEnrollmentRepository() interfaces.EnrollmentRepository
NewEnrollmentRepository ...
func NewPaymentMethodRepository ¶
func NewPaymentMethodRepository(postgresContext interfaces.PostgresContext, stripeContext interfaces.StripeContext) interfaces.PaymentMethodRepository
NewPaymentMethodRepository ...
func NewScheduleRepository ¶
func NewScheduleRepository() interfaces.ScheduleRepository
NewScheduleRepository ...
func NewStudentRepository ¶
func NewStudentRepository() interfaces.StudentRepository
NewStudentRepository ...
func NewUserRepository ¶
func NewUserRepository(cognitoIdentityCtx interfaces.CognitoIdentityContext, postgresCtx interfaces.PostgresContext) interfaces.UserRepository
NewUserRepository ...
Types ¶
type AccountRepository ¶
type AccountRepository struct {
// contains filtered or unexported fields
}
AccountRepository ...
func (*AccountRepository) Add ¶
func (repo *AccountRepository) Add(params *models.AddAccountParameters) (*models.AddAccountResult, error)
Add creates a new Stripe Account, and also inserts a new account record into PostgreSQL.
func (*AccountRepository) GetByID ¶
func (repo *AccountRepository) GetByID(params *models.GetAccountByIDParameters) (*models.GetAccountByIDResult, error)
GetByID retrieves Account by 'id' from Stripe and updates the PostgreSQL record.
func (*AccountRepository) GetByStripeID ¶
func (repo *AccountRepository) GetByStripeID(params *models.GetAccountByStripeIDParameters) (*models.GetAccountByStripeIDResult, error)
GetByStripeID retrieves Account by 'id' from Stripe and updates the PostgreSQL record.
func (*AccountRepository) Remove ¶
func (repo *AccountRepository) Remove(params *models.RemoveAccountParameters) (*models.RemoveAccountResult, error)
Remove ...
func (*AccountRepository) Update ¶
func (repo *AccountRepository) Update(params *models.UpdateAccountParameters) (*models.UpdateAccountResult, error)
Update ...
type BalanceRepository ¶
type BalanceRepository struct {
// contains filtered or unexported fields
}
BalanceRepository ...
func (*BalanceRepository) Get ¶
func (repo *BalanceRepository) Get(params *models.GetBalanceParameters) (*models.GetBalanceResult, error)
Get ...
type BillingDetailsRepository ¶
type BillingDetailsRepository struct{}
BillingDetailsRepository ...
func (*BillingDetailsRepository) Add ¶
func (repo *BillingDetailsRepository) Add(params *models.AddBillingDetailsParameters) (*models.AddBillingDetailsResult, error)
Add ...
func (*BillingDetailsRepository) GetByID ¶
func (repo *BillingDetailsRepository) GetByID(params *models.GetBillingDetailsByIDParameters) (*models.GetBillingDetailsByIDResult, error)
GetByID ...
func (*BillingDetailsRepository) GetByPaymentMethodID ¶
func (repo *BillingDetailsRepository) GetByPaymentMethodID(params *models.GetBillingDetailsByPaymentMethodIDParameters) (*models.GetBillingDetailsByPaymentMethodIDResult, error)
GetByPaymentMethodID ...
func (*BillingDetailsRepository) Remove ¶
func (repo *BillingDetailsRepository) Remove(params *models.RemoveBillingDetailsParameters) (*models.RemoveBillingDetailsResult, error)
Remove ...
type CourseRepository ¶
type CourseRepository struct {
// contains filtered or unexported fields
}
CourseRepository ...
func (*CourseRepository) Add ¶
func (repo *CourseRepository) Add(params *models.AddCourseParameters) (*models.AddCourseResult, error)
Add ...
func (*CourseRepository) GetByID ¶
func (repo *CourseRepository) GetByID(params *models.GetCourseByIDParameters) (*models.GetCourseByIDResult, error)
GetByID ...
func (*CourseRepository) GetByOrganizationID ¶
func (repo *CourseRepository) GetByOrganizationID(params *models.GetCoursesByOrganizationIDParameters) (*models.GetCoursesByOrganizationIDResult, error)
GetByOrganizationID ...
func (*CourseRepository) Remove ¶
func (repo *CourseRepository) Remove(params *models.RemoveCourseParameters) (*models.RemoveCourseResult, error)
Remove ...
func (*CourseRepository) Update ¶
func (repo *CourseRepository) Update(params *models.UpdateCourseParameters) (*models.UpdateCourseResult, error)
Update ...
type CustomerRepository ¶
type CustomerRepository struct {
// contains filtered or unexported fields
}
CustomerRepository ...
func (*CustomerRepository) Add ¶
func (repository *CustomerRepository) Add(parameters *models.AddCustomerParameters) (*models.AddCustomerResult, error)
Add ...
func (*CustomerRepository) GetByID ¶
func (repository *CustomerRepository) GetByID(parameters *models.GetCustomerByIDParameters) (*models.GetCustomerByIDResult, error)
GetByID ...
func (*CustomerRepository) GetByUserID ¶
func (repository *CustomerRepository) GetByUserID(parameters *models.GetCustomerByUserIDParameters) (*models.GetCustomerByUserIDResult, error)
GetByUserID ...
func (*CustomerRepository) Remove ¶
func (repository *CustomerRepository) Remove(parameters *models.RemoveCustomerParameters) (*models.RemoveCustomerResult, error)
Remove ...
func (*CustomerRepository) Update ¶
func (repository *CustomerRepository) Update(parameters *models.UpdateCustomerParameters) (*models.UpdateCustomerResult, error)
Update ...
type EnrollmentRepository ¶
type EnrollmentRepository struct{}
EnrollmentRepository ...
func (*EnrollmentRepository) Add ¶
func (repository *EnrollmentRepository) Add(parameters *models.AddEnrollmentParameters) (*models.AddEnrollmentResult, error)
Add ...
func (*EnrollmentRepository) GetByID ¶
func (repository *EnrollmentRepository) GetByID(parameters *models.GetEnrollmentByIDParameters) (*models.GetEnrollmentByIDResult, error)
GetByID ...
func (*EnrollmentRepository) GetByScheduleID ¶
func (repository *EnrollmentRepository) GetByScheduleID(parameters *models.GetEnrollmentsByScheduleIDParameters) (*models.GetEnrollmentsByScheduleIDResult, error)
GetByScheduleID ...
func (*EnrollmentRepository) GetByStudentID ¶
func (repository *EnrollmentRepository) GetByStudentID(parameters *models.GetEnrollmentsByStudentIDParameters) (*models.GetEnrollmentsByStudentIDResult, error)
GetByStudentID ...
func (*EnrollmentRepository) Remove ¶
func (repository *EnrollmentRepository) Remove(parameters *models.RemoveEnrollmentParameters) (*models.RemoveEnrollmentResult, error)
Remove ...
func (*EnrollmentRepository) Update ¶
func (repository *EnrollmentRepository) Update(parameters *models.UpdateEnrollmentParameters) (*models.UpdateEnrollmentResult, error)
Update ...
type PaymentMethodRepository ¶
type PaymentMethodRepository struct {
// contains filtered or unexported fields
}
PaymentMethodRepository ...
func (*PaymentMethodRepository) Add ¶
func (repository *PaymentMethodRepository) Add(parameters *models.AddPaymentMethodParameters) (*models.AddPaymentMethodResult, error)
Add ...
func (*PaymentMethodRepository) GetByCustomerID ¶
func (repository *PaymentMethodRepository) GetByCustomerID(customerID *string) ([]*entities.PaymentMethod, error)
GetByCustomerID ...
func (*PaymentMethodRepository) GetByID ¶
func (repository *PaymentMethodRepository) GetByID(id *string) (*entities.PaymentMethod, error)
GetByID ...
type ScheduleRepository ¶
type ScheduleRepository struct { }
ScheduleRepository ...
func (*ScheduleRepository) Add ¶
func (repository *ScheduleRepository) Add(schedule *entities.Schedule) error
Add ...
func (*ScheduleRepository) Get ¶
func (repository *ScheduleRepository) Get() ([]*entities.Schedule, error)
Get ...
func (*ScheduleRepository) GetByID ¶
func (repository *ScheduleRepository) GetByID(id *string) (*entities.Schedule, error)
GetByID ...
func (*ScheduleRepository) Remove ¶
func (repository *ScheduleRepository) Remove(id *string) error
Remove ...
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
UserRepository ...
func (*UserRepository) Add ¶
func (repo *UserRepository) Add(params *models.AddUserParameters) (*models.AddUserResult, error)
Add ...
func (*UserRepository) GetByID ¶
func (repo *UserRepository) GetByID(params *models.GetUserByIDParameters) (*models.GetUserByIDResult, error)
GetByID ...
func (*UserRepository) GetByUsername ¶
func (repo *UserRepository) GetByUsername(params *models.GetUserByUsernameParameters) (*models.GetUserByUsernameResult, error)
GetByUsername ...
func (*UserRepository) Remove ¶
func (repo *UserRepository) Remove(params *models.RemoveUserParameters) (*models.RemoveUserResult, error)
Remove ...
Source Files ¶
- account_repository.go
- balance_repository.go
- billing_details_repository.go
- course_repository.go
- customer_repository.go
- enrollment_repository.go
- family_member_repository.go
- instructor_repository.go
- payment_method_repository.go
- schedule_repository.go
- student_repository.go
- subscription_repository.go
- user_repository.go