Documentation
¶
Index ¶
- func NewRepository(db *sqlx.DB) repository
- type CLAUser
- type Provider
- type Repository
- type RepositoryDynamo
- func (repo RepositoryDynamo) GetClaManagerCorporateClaIDs(userID string) ([]string, error)
- func (repo RepositoryDynamo) GetUser(userID string) (User, error)
- func (repo RepositoryDynamo) GetUserAndProfilesByLFID(lfidUsername string) (CLAUser, error)
- func (repo RepositoryDynamo) GetUserCompanyIDs(userID string) ([]string, error)
- func (repo RepositoryDynamo) GetUserProjectIDs(userID string) ([]string, error)
- type RepositoryService
- type Service
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRepository ¶
NewRepository creates a new user repository
Types ¶
type CLAUser ¶
type CLAUser struct {
UserID string
Name string
Emails []string
LFEmail string
LFUsername string
LfidProvider Provider
GithubProvider Provider
ProjectIDs []string
ClaIDs []string
CompanyIDs []string
}
CLAUser data model
type Repository ¶
type Repository interface {
GetUserAndProfilesByLFID(lfidUsername string) (CLAUser, error)
GetUserProjectIDs(userID string) ([]string, error)
GetClaManagerCorporateClaIDs(userID string) ([]string, error)
}
Repository interface methods
type RepositoryDynamo ¶
RepositoryDynamo data model
func (RepositoryDynamo) GetClaManagerCorporateClaIDs ¶
func (repo RepositoryDynamo) GetClaManagerCorporateClaIDs(userID string) ([]string, error)
GetClaManagerCorporateClaIDs returns a list of corporate CLAs when provided the user ID
func (RepositoryDynamo) GetUser ¶
func (repo RepositoryDynamo) GetUser(userID string) (User, error)
GetUser returns the user model when provided the user ID
func (RepositoryDynamo) GetUserAndProfilesByLFID ¶
func (repo RepositoryDynamo) GetUserAndProfilesByLFID(lfidUsername string) (CLAUser, error)
GetUserAndProfilesByLFID returns the user profile by LFID
func (RepositoryDynamo) GetUserCompanyIDs ¶
func (repo RepositoryDynamo) GetUserCompanyIDs(userID string) ([]string, error)
GetUserCompanyIDs returns a list of company IDs associated with the specified user
func (RepositoryDynamo) GetUserProjectIDs ¶
func (repo RepositoryDynamo) GetUserProjectIDs(userID string) ([]string, error)
GetUserProjectIDs returns a list of user's projects when provided the user id
type RepositoryService ¶
type RepositoryService interface {
GetUserAndProfilesByLFID(lfidUsername string) (CLAUser, error)
GetUserProjectIDs(userID string) ([]string, error)
GetClaManagerCorporateClaIDs(userID string) ([]string, error)
GetUserCompanyIDs(userID string) ([]string, error)
GetUser(userID string) (User, error)
}
RepositoryService interface methods
func NewDynamoRepository ¶
func NewDynamoRepository(awsSession *session.Session, stage string) RepositoryService
NewDynamoRepository creates a new dynamo repository model
type Service ¶
type Service interface {
GetUserAndProfilesByLFID(lfidUsername string) (CLAUser, error)
GetUserProjectIDs(userID string) ([]string, error)
GetClaManagerCorporateClaIDs(userID string) ([]string, error)
}
Service interface defining the public functions
type User ¶
type User struct {
UserID string `json:"user_id"`
LFEmail string `json:"lf_email"`
LFUsername string `json:"lf_username"`
DateCreated string `json:"date_created"`
DateModified string `json:"date_modified"`
UserName string `json:"user_name"`
Version string `json:"version"`
UserEmails []string `json:"user_emails"`
UserGithubID string `json:"user_github_id"`
UserCompanyID string `json:"user_company_id"`
UserGithubUsername string `json:"user_github_username"`
}
User data model
Click to show internal directories.
Click to hide internal directories.