Documentation ¶
Index ¶
- Constants
- type PostgresAccountRepository
- func (repo PostgresAccountRepository) CreateAccount(account *businesslogic.Account) error
- func (repo PostgresAccountRepository) DeleteAccount(account businesslogic.Account) error
- func (repo PostgresAccountRepository) SearchAccount(criteria businesslogic.SearchAccountCriteria) ([]businesslogic.Account, error)
- func (repo PostgresAccountRepository) UpdateAccount(account businesslogic.Account) error
- type PostgresAccountRoleRepository
- type PostgresAccountStatusRepository
- type PostgresAccountTypeRepository
- type PostgresAthleteProfileRepository
- type PostgresRoleApplicationRepository
- func (repo PostgresRoleApplicationRepository) CreateApplication(application *businesslogic.RoleApplication) error
- func (repo PostgresRoleApplicationRepository) SearchApplication(criteria businesslogic.SearchRoleApplicationCriteria) ([]businesslogic.RoleApplication, error)
- func (repo PostgresRoleApplicationRepository) UpdateApplication(application businesslogic.RoleApplication) error
- type PostgresRoleApplicationStatusRepository
- type PostgresUserPreferenceRepository
- func (repo PostgresUserPreferenceRepository) CreatePreference(preference *businesslogic.UserPreference) error
- func (repo PostgresUserPreferenceRepository) SearchPreference(criteria businesslogic.SearchUserPreferenceCriteria) ([]businesslogic.UserPreference, error)
- func (repo PostgresUserPreferenceRepository) UpdatePreference(preference businesslogic.UserPreference) error
Constants ¶
const ( DasUserAccountTable = "DAS.ACCOUNT" DAS_USER_ACCOUNT_COL_USER_STATUS_ID = "ACCOUNT_STATUS_ID" DAS_USER_ACCOUNT_COL_USER_GENDER_ID = "USER_GENDER_ID" DAS_USER_ACCOUNT_COL_LAST_NAME = "LAST_NAME" DAS_USER_ACCOUNT_COL_MIDDLE_NAMES = "MIDDLE_NAMES" DAS_USER_ACCOUNT_COL_FIRST_NAME = "FIRST_NAME" DAS_USER_ACCOUNT_COL_DATE_OF_BIRTH = "DATE_OF_BIRTH" DAS_USER_ACCOUNT_COL_EMAIL = "EMAIL" DAS_USER_ACCOUNT_COL_PHONE = "PHONE" DAS_USER_ACCOUNT_COL_DATETIME_CREATED = "DATETIME_CREATED" DAS_USER_ACCOUNT_COL_DATETIME_UPDATED = "DATETIME_UPDATED" DAS_USER_ACCOUNT_COL_TOS_ACCEPTED = "TOS_ACCEPTED" DAS_USER_ACCOUNT_COL_PP_ACCEPTED = "PP_ACCEPTED" DAS_USER_ACCOUNT_COL_BY_GUARDIAN = "BY_GUARDIAN" DAS_USER_ACCOUNT_COL_GUARDIAN_SIGNATURE = "GUARDIAN_SIGNATURE" )
const (
DAS_ACCOUNT_ROLE_APPLICATION_STATUS = "DAS.ACCOUNT_ROLE_APPLICATION_STATUS"
)
const DAS_ACCOUNT_ROLE_TABLE = "DAS.ACCOUNT_ROLE"
const (
DAS_ACCOUNT_TYPE_TABLE = "DAS.ACCOUNT_TYPE"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresAccountRepository ¶
type PostgresAccountRepository struct { Database *sql.DB SQLBuilder squirrel.StatementBuilderType }
func (PostgresAccountRepository) CreateAccount ¶
func (repo PostgresAccountRepository) CreateAccount(account *businesslogic.Account) error
func (PostgresAccountRepository) DeleteAccount ¶
func (repo PostgresAccountRepository) DeleteAccount(account businesslogic.Account) error
func (PostgresAccountRepository) SearchAccount ¶
func (repo PostgresAccountRepository) SearchAccount(criteria businesslogic.SearchAccountCriteria) ([]businesslogic.Account, error)
func (PostgresAccountRepository) UpdateAccount ¶
func (repo PostgresAccountRepository) UpdateAccount(account businesslogic.Account) error
type PostgresAccountRoleRepository ¶
type PostgresAccountRoleRepository struct { Database *sql.DB SQLBuilder squirrel.StatementBuilderType }
func (PostgresAccountRoleRepository) CreateAccountRole ¶
func (repo PostgresAccountRoleRepository) CreateAccountRole(role *businesslogic.AccountRole) error
func (PostgresAccountRoleRepository) SearchAccountRole ¶
func (repo PostgresAccountRoleRepository) SearchAccountRole(criteria businesslogic.SearchAccountRoleCriteria) ([]businesslogic.AccountRole, error)
type PostgresAccountStatusRepository ¶
type PostgresAccountStatusRepository struct { Database *sql.DB SqlBuilder squirrel.StatementBuilderType }
func (PostgresAccountStatusRepository) GetAccountStatus ¶
func (repo PostgresAccountStatusRepository) GetAccountStatus() ([]businesslogic.AccountStatus, error)
type PostgresAccountTypeRepository ¶
type PostgresAccountTypeRepository struct { Database *sql.DB SqlBuilder squirrel.StatementBuilderType }
func (PostgresAccountTypeRepository) GetAccountTypes ¶
func (repo PostgresAccountTypeRepository) GetAccountTypes() ([]businesslogic.AccountType, error)
type PostgresAthleteProfileRepository ¶
type PostgresAthleteProfileRepository struct { Database *sql.DB SQLBuilder squirrel.StatementBuilderType }
func (PostgresAthleteProfileRepository) GetAthleteProfile ¶
func (repo PostgresAthleteProfileRepository) GetAthleteProfile(sid string) (businesslogic.AthleteProfile, error)
type PostgresRoleApplicationRepository ¶
type PostgresRoleApplicationRepository struct { Database *sql.DB SQLBuilder squirrel.StatementBuilderType }
PostgresRoleApplicationRepository implements IRoleApplicationRepository
func (PostgresRoleApplicationRepository) CreateApplication ¶
func (repo PostgresRoleApplicationRepository) CreateApplication(application *businesslogic.RoleApplication) error
CreateApplication creates a RoleApplication in a Postgres database
func (PostgresRoleApplicationRepository) SearchApplication ¶
func (repo PostgresRoleApplicationRepository) SearchApplication(criteria businesslogic.SearchRoleApplicationCriteria) ([]businesslogic.RoleApplication, error)
SearchApplication searches RoleApplications from a Postgres database with the given criteria. The returned applications can be nil or a concrete slice. The returned error can be either nil or concrete error
func (PostgresRoleApplicationRepository) UpdateApplication ¶
func (repo PostgresRoleApplicationRepository) UpdateApplication(application businesslogic.RoleApplication) error
UpdateApplication update the RoleApplication of the same ID to the given application. This mostly update the user who made the change as well as time stamps. The returned error could be either nil or a concrete error
type PostgresRoleApplicationStatusRepository ¶
type PostgresRoleApplicationStatusRepository struct { Database *sql.DB SqlBulder squirrel.StatementBuilderType }
func (PostgresRoleApplicationStatusRepository) GetAllRoleApplicationStatus ¶
func (repo PostgresRoleApplicationStatusRepository) GetAllRoleApplicationStatus() ([]businesslogic.RoleApplicationStatus, error)
type PostgresUserPreferenceRepository ¶
type PostgresUserPreferenceRepository struct { Database *sql.DB SQLBuilder squirrel.StatementBuilderType }
PostgresUserPreferenceRepository implements the IUserPreferenceRepository with a Postgres database
func (PostgresUserPreferenceRepository) CreatePreference ¶
func (repo PostgresUserPreferenceRepository) CreatePreference(preference *businesslogic.UserPreference) error
CreatePreference inserts a User Preference object into a Postgres database
func (PostgresUserPreferenceRepository) SearchPreference ¶
func (repo PostgresUserPreferenceRepository) SearchPreference(criteria businesslogic.SearchUserPreferenceCriteria) ([]businesslogic.UserPreference, error)
SearchPreference searches User Preference object from a Postgres database using the provided criteria
func (PostgresUserPreferenceRepository) UpdatePreference ¶
func (repo PostgresUserPreferenceRepository) UpdatePreference(preference businesslogic.UserPreference) error
UpdatePreference updates a User Preference object in a Postgres database to the provided preference object