ghs

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package ghs NOT generated by sqlc

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComplyB

func ComplyB(g *GithubStandard, truthy int)

func ComplyE

func ComplyE(g *GithubStandard, truthy int)

Types

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type FilterByIsArchivedAndTeamParams

type FilterByIsArchivedAndTeamParams struct {
	IsArchived int    `json:"is_archived"`
	Teams      string `json:"teams"`
}

type GithubStandard

type GithubStandard struct {
	ID                             int    `json:"id"`
	Ts                             string `json:"ts"`
	CompliantBaseline              int    `json:"compliant_baseline"`
	CompliantExtended              int    `json:"compliant_extended"`
	CountOfClones                  int    `json:"count_of_clones"`
	CountOfForks                   int    `json:"count_of_forks"`
	CountOfPullRequests            int    `json:"count_of_pull_requests"`
	CountOfWebHooks                int    `json:"count_of_web_hooks"`
	CreatedAt                      string `json:"created_at"`
	DefaultBranch                  string `json:"default_branch"`
	FullName                       string `json:"full_name"`
	HasCodeOfConduct               int    `json:"has_code_of_conduct"`
	HasCodeownerApprovalRequired   int    `json:"has_codeowner_approval_required"`
	HasContributingGuide           int    `json:"has_contributing_guide"`
	HasDefaultBranchOfMain         int    `json:"has_default_branch_of_main"`
	HasDefaultBranchProtection     int    `json:"has_default_branch_protection"`
	HasDeleteBranchOnMerge         int    `json:"has_delete_branch_on_merge"`
	HasDescription                 int    `json:"has_description"`
	HasDiscussions                 int    `json:"has_discussions"`
	HasDownloads                   int    `json:"has_downloads"`
	HasIssues                      int    `json:"has_issues"`
	HasLicense                     int    `json:"has_license"`
	HasPages                       int    `json:"has_pages"`
	HasPullRequestApprovalRequired int    `json:"has_pull_request_approval_required"`
	HasReadme                      int    `json:"has_readme"`
	HasRulesEnforcedForAdmins      int    `json:"has_rules_enforced_for_admins"`
	HasVulnerabilityAlerts         int    `json:"has_vulnerability_alerts"`
	HasWiki                        int    `json:"has_wiki"`
	IsArchived                     int    `json:"is_archived"`
	IsPrivate                      int    `json:"is_private"`
	License                        string `json:"license"`
	LastCommitDate                 string `json:"last_commit_date"`
	Name                           string `json:"name"`
	Owner                          string `json:"owner"`
	Teams                          string `json:"teams"`
}

func Fake

func Fake(id *int, owner *string) (gs *GithubStandard)

func (*GithubStandard) Baseline

func (g *GithubStandard) Baseline() map[string]bool

func (*GithubStandard) Extended

func (g *GithubStandard) Extended() map[string]bool

func (*GithubStandard) Info

func (g *GithubStandard) Info() map[string]string

func (*GithubStandard) Insertable

func (g *GithubStandard) Insertable() InsertParams

func (*GithubStandard) UpdateCompliance

func (g *GithubStandard) UpdateCompliance() (baseline int, extended int)

type GithubStandardsTracker

type GithubStandardsTracker struct {
	ID      int    `json:"id"`
	RunDate string `json:"run_date"`
}

type InsertParams

type InsertParams struct {
	Ts                             string `json:"ts"`
	DefaultBranch                  string `json:"default_branch"`
	FullName                       string `json:"full_name"`
	Name                           string `json:"name"`
	Owner                          string `json:"owner"`
	License                        string `json:"license"`
	LastCommitDate                 string `json:"last_commit_date"`
	CreatedAt                      string `json:"created_at"`
	CountOfClones                  int    `json:"count_of_clones"`
	CountOfForks                   int    `json:"count_of_forks"`
	CountOfPullRequests            int    `json:"count_of_pull_requests"`
	CountOfWebHooks                int    `json:"count_of_web_hooks"`
	HasCodeOfConduct               int    `json:"has_code_of_conduct"`
	HasCodeownerApprovalRequired   int    `json:"has_codeowner_approval_required"`
	HasContributingGuide           int    `json:"has_contributing_guide"`
	HasDefaultBranchOfMain         int    `json:"has_default_branch_of_main"`
	HasDefaultBranchProtection     int    `json:"has_default_branch_protection"`
	HasDeleteBranchOnMerge         int    `json:"has_delete_branch_on_merge"`
	HasDescription                 int    `json:"has_description"`
	HasDiscussions                 int    `json:"has_discussions"`
	HasDownloads                   int    `json:"has_downloads"`
	HasIssues                      int    `json:"has_issues"`
	HasLicense                     int    `json:"has_license"`
	HasPages                       int    `json:"has_pages"`
	HasPullRequestApprovalRequired int    `json:"has_pull_request_approval_required"`
	HasReadme                      int    `json:"has_readme"`
	HasRulesEnforcedForAdmins      int    `json:"has_rules_enforced_for_admins"`
	HasVulnerabilityAlerts         int    `json:"has_vulnerability_alerts"`
	HasWiki                        int    `json:"has_wiki"`
	IsArchived                     int    `json:"is_archived"`
	IsPrivate                      int    `json:"is_private"`
	CompliantBaseline              int    `json:"compliant_baseline"`
	CompliantExtended              int    `json:"compliant_extended"`
	Teams                          string `json:"teams"`
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) Age

func (q *Queries) Age(ctx context.Context) (string, error)

func (*Queries) All

func (q *Queries) All(ctx context.Context) ([]GithubStandard, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) Count

func (q *Queries) Count(ctx context.Context) (int64, error)

func (*Queries) FilterByIsArchived

func (q *Queries) FilterByIsArchived(ctx context.Context, isArchived int) ([]GithubStandard, error)

func (*Queries) FilterByIsArchivedAndTeam

func (q *Queries) FilterByIsArchivedAndTeam(ctx context.Context, arg FilterByIsArchivedAndTeamParams) ([]GithubStandard, error)

func (*Queries) FilterByTeam

func (q *Queries) FilterByTeam(ctx context.Context, teams string) ([]GithubStandard, error)

func (*Queries) Insert

func (q *Queries) Insert(ctx context.Context, arg InsertParams) (int, error)

func (*Queries) TotalCountCompliantBaseline

func (q *Queries) TotalCountCompliantBaseline(ctx context.Context) (int64, error)

func (*Queries) TotalCountCompliantExtended

func (q *Queries) TotalCountCompliantExtended(ctx context.Context) (int64, error)

func (*Queries) Track

func (q *Queries) Track(ctx context.Context, runDate string) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL