Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
func Configure(api *operations.ClaAPI, service Service)
Configure setups handlers on api with service
Types ¶
type DBUser ¶
type DBUser 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"`
}
DBUser data model
type Repository ¶
type Repository interface {
CreateUser(user *models.User) (*models.User, error)
GetUser(userID string) (*models.User, error)
GetUserByUserName(userName string, fullMatch bool) (*models.User, error)
SearchUsers(searchField string, searchTerm string, fullMatch bool) (*models.Users, error)
}
Repository interface defines the functions for the users service
func NewRepository ¶
func NewRepository(awsSession *session.Session, stage string) Repository
NewRepository creates a new instance of the whitelist service
type Service ¶
type Service interface {
CreateUser(user *models.User) (*models.User, error)
GetUser(userID string) (*models.User, error)
GetUserByUserName(userName string, fullMatch bool) (*models.User, error)
SearchUsers(field string, searchTerm string, fullMatch bool) (*models.Users, error)
}
Service interface for users
func NewService ¶
func NewService(repo Repository) Service
NewService creates a new whitelist service
Click to show internal directories.
Click to hide internal directories.