Versions in this module Expand all Collapse all v0 v0.2.1 Mar 7, 2019 Changes in this version + var DATA_HOST string + var DATA_NAME string + var DATA_PATH string + var DATA_PORT int + var DATA_TYPE string + var Engine *xorm.Engine + var PASSWORD string + var SSL_MODE string + var USERNAME string + func Auth(username, password string) (bool, string, error) + func CancelReportById(id int64) (page int, err error) + func CancelReportsByRepo(id int64) (err error) + func ChangeReportsStatusByRepo(id int64, status int) (err error) + func ConfirmAppResult(id int64) (err error) + func ConfirmResultById(id int64) (err error) + func ConvertRuleType(id int64) (err error) + func DeleteAdminById(id int64) error + func DeleteAllInputInfo() error + func DeleteAllRepos() error + func DeleteFilterRuleById(id int64) (err error) + func DeleteInputInfoById(id int64) error + func DeleteRulesById(id int64) (err error) + func DeleteTokenById(id int64) error + func DisableRepoById(id int64) error + func DisableRepoByUrl(repoUrl string) error + func DisableRulesById(id int64) (err error) + func EditAdminById(id int64, username, password, role string) error + func EditFilterRuleById(id int64, ruleType int, ruleKey, ruleValue string) error + func EditInputInfoById(id int64, inputType, content, desc string) error + func EditRuleById(id int64, position, ruleType, pat, caption, desc string, status int) error + func EditTokenById(id int64, token, desc string) error + func EnableRepoById(id int64) error + func EnableRulesById(id int64) (err error) + func GetPageById(id int64) (int, error) + func IgnoreAppSearchResult(id int64) (err error) + func InitAdmin() + func InitRules() + func InsertBlacklistRules(filename string) error + func InsertRules(filename string) error + func NewDbEngine() (err error) + func UpdateRate(token string, response *github.Response) error + type Admin struct + Id int64 + Password string + Role string + Username string + func GetAdminById(id int64) (*Admin, bool, error) + func ListAdmins() ([]Admin, error) + func NewAdmin(username, password, role string) *Admin + func (u *Admin) Insert() (int64, error) + type AppSearchResult struct + AppUrl *string + CreatedTime time.Time + DeployDate *string + Description *string + Developer *string + Id int64 + Market *string + Name *string + Status int + UpdatedTime time.Time + Version *string + func ListAppSearchResultByPage(page int, status int) ([]AppSearchResult, int, int) + func (r *AppSearchResult) Exist() (bool, error) + func (r *AppSearchResult) Insert() (int64, error) + type CodeResult struct + CreatedTime time.Time + HTMLURL *string + Id int64 + Keyword *string + Name *string + Path *string + RepoName string + RepoPath *string + Repository *github.Repository + SHA *string + Score float32 + Status int + TextMatches []TextMatch + UpdatedTime time.Time + Version int + func GetReportById(id int64, omitRepo bool) (bool, *CodeResult, error) + func ListGithubSearchResultPage(page int, status int) ([]CodeResult, int, int) + func (r *CodeResult) Exist() (bool, error) + func (r *CodeResult) Insert() (int64, error) + type CodeResultDetail struct + Blog *string + Company *string + Email *string + Id int64 + Keyword *string + Lang *string + Location *string + MatchedTexts []TextMatch + OwnerCreatedAt string + OwnerName *string + OwnerURl *string + RepoCreatedAt *github.Timestamp + RepoName *string + RepoUpdatedAt *github.Timestamp + RepoUrl *string + Status int + Type *string + func GetCodeResultDetailById(id int64) (*CodeResultDetail, error) + type CodeSearchResult struct + CodeResults []CodeResult + IncompleteResults *bool + Total *int + type FilterRule struct + Id int64 + RuleKey string + RuleType int + RuleValue string + func GetFilterRuleById(id int64) (*FilterRule, bool, error) + func GetFilterRules() ([]FilterRule, error) + func GetFilterRulesPage(page int) ([]FilterRule, int, error) + func LoadBlackListRuleFromFile(filename string) ([]FilterRule, error) + func NewFilterRule(ruleType int, ruleKey, ruleValue string) *FilterRule + func (r *FilterRule) Insert() (err error) + type GithubToken struct + Desc string + Id int64 + Limit int + Remaining int + Reset time.Time + Token string + func GetTokenById(id int64) (*GithubToken, bool, error) + func ListTokens() ([]GithubToken, error) + func ListValidTokens() ([]GithubToken, error) + func NewGithubToken(token, desc string) *GithubToken + func (g *GithubToken) Exist() (bool, error) + func (g *GithubToken) Insert() (int64, error) + type InputInfo struct + Content string + CreatedTime time.Time + Desc string + Developer string + Id int64 + Type string + UpdatedTime time.Time + Version int + func GetInputInfoById(id int64) (*InputInfo, bool, error) + func ListInputInfo() ([]InputInfo, error) + func ListInputInfoPage(page int) ([]InputInfo, int, error) + func NewInputInfo(inputType, content, desc string) (info *InputInfo) + func (i *InputInfo) Exist(repoUrl string) (bool, error) + func (i *InputInfo) Insert() (int64, error) + type Match struct + Id int64 + Indices []int + Text *string + type MatchedText struct + EndIndex int + Keyword *string + StartIndex int + Text *string + type Repo struct + Id int64 + Name string + Status int + Url string + func ListEnableRepos() ([]Repo, error) + func ListReposPage(page int) ([]Repo, int, error) + func NewRepo(name, repoUrl string) (repo *Repo) + func (r *Repo) Exist() (bool, error) + func (r *Repo) Insert() (int64, error) + type Rule struct + Caption string + Description string + Id int64 + Pattern string + Position string + Status int + Type string + func GetRuleById(id int64) (*Rule, bool, error) + func GetRules() ([]Rule, error) + func GetRulesPage(page int) ([]Rule, int, error) + func GetValidRules() ([]Rule, error) + func GetValidRulesByType(Type string) ([]Rule, error) + func LoadRuleFromFile(filename string) ([]Rule, error) + func NewRule(ruleType, pat, caption, pos, desc string, status int) *Rule + func (r *Rule) Insert() (err error) + type TextMatch struct + Fragment *string + Id int64 + Matches []Match + ObjectType *string + ObjectURL *string + Property *string + func GetMatchedTexts(repoName string) []TextMatch