Documentation ¶
Index ¶
- Variables
- func BootstrapDB(schemaFolder string, DB *sql.DB) error
- func LastInsertID(db *sql.DB) (int, error)
- func SeedRepositories(repoCsv string, DB *sql.DB) error
- type Expert
- type ExpertDAOImpl
- type Finding
- type FindingDaoImpl
- type Gopher
- type GopherDAOImpl
- type Issue
- type IssueDAOImpl
- type Md5Sum
- type RepoState
- type Repository
- type RepositoryDaoImpl
Constants ¶
This section is empty.
Variables ¶
View Source
var RepositoryDAO = RepositoryDaoImpl{}
Functions ¶
func BootstrapDB ¶
BootstrapDB attempts to execute all files ending in .sql from the provided directory against the provided database, in alphabetical order by filename. If no files are found, an error is returned.
func LastInsertID ¶
LastInsertID retrieves the last insert ID. Its use is prone to race-conditions in case multiple queries are being executed simultaneously.
Types ¶
type Expert ¶
type Expert struct { Username string `prof:"username"` AssessmentCount int `prof:"assessment_count"` }
Expert is a GitHub user marked as an expert
type ExpertDAOImpl ¶
type ExpertDAOImpl struct { Upsert func(ctx context.Context, q proteus.ContextExecutor, e Expert) (int64, error) `proq:"q:upsert" prop:"e"` FindByUsername func(ctx context.Context, q proteus.ContextQuerier, username string) (Expert, error) `proq:"q:findByUsername" prop:"username"` }
var ExpertDAO ExpertDAOImpl
type Finding ¶
type Finding struct { ID int64 `prof:"id"` GithubOwner string `prof:"github_owner"` GithubRepo string `prof:"github_repo"` Filepath string `prof:"filepath"` RootCommitID string `prof:"root_commit_id"` Quote string `prof:"quote"` QuoteMD5Sum Md5Sum `prof:"quote_md5sum"` StartLine int `prof:"start_line"` EndLine int `prof:"end_line"` Message string `prof:"message"` ExtraInfo string `prof:"extra_info"` }
type FindingDaoImpl ¶
type FindingDaoImpl struct { Create func(ctx context.Context, e proteus.ContextExecutor, f Finding) (int64, error) `proq:"q:create" prop:"f"` FindByID func(ctx context.Context, q proteus.ContextQuerier, id int64) (Finding, error) `proq:"q:findById" prop:"id"` ListChecksums func(ctx context.Context, q proteus.ContextQuerier) ([]Md5Sum, error) `proq:"q:listChecksums"` }
var FindingDAO FindingDaoImpl
type GopherDAOImpl ¶
type GopherDAOImpl struct { Upsert func(ctx context.Context, q proteus.ContextExecutor, g Gopher) (int64, error) `proq:"q:upsert" prop:"g"` FindByUsername func(ctx context.Context, q proteus.ContextQuerier, username string) (Gopher, error) `proq:"q:findByUsername" prop:"username"` }
var GopherDAO GopherDAOImpl
type Issue ¶
type Issue struct { FindingID int `prof:"finding_id"` GithubOwner string `prof:"github_owner"` GithubRepo string `prof:"github_repo"` GithubID int `prof:"github_id"` ExpertAssessment string `prof:"expert_assessment"` ExpertDisagreement int `prof:"expert_disagreement"` }
func (*Issue) ExpertsDisagree ¶
func (*Issue) SetExpertsDisagree ¶
type IssueDAOImpl ¶
type IssueDAOImpl struct { FindByCoordinates func(ctx context.Context, q proteus.ContextQuerier, owner, repo string, githubID int) (Issue, error) `proq:"q:findByFindingID" prop:"owner,repo,githubID"` Upsert func(ctx context.Context, q proteus.ContextExecutor, i Issue) (int64, error) `proq:"q:upsert" prop:"i"` }
var IssueDAO IssueDAOImpl
type Repository ¶
type Repository struct { GithubOwner string `prof:"github_owner"` GithubRepo string `prof:"github_repo"` State RepoState `prof:"state"` }
func NewRepository ¶
func NewRepository(owner, repo string) Repository
type RepositoryDaoImpl ¶
type RepositoryDaoImpl struct { FindByID func(ctx context.Context, q proteus.ContextQuerier, owner, repo string) (Repository, error) `proq:"q:findByID" prop:"owner,repo"` ListByState func(ctx context.Context, q proteus.ContextQuerier, state RepoState) ([]Repository, error) `proq:"q:listByState" prop:"state"` Upsert func(ctx context.Context, e proteus.ContextExecutor, r Repository) (int64, error) `proq:"q:upsert" prop:"r"` CountAll func(ctx context.Context, q proteus.ContextQuerier) (int64, error) `proq:"q:count"` }
Click to show internal directories.
Click to hide internal directories.