Documentation
¶
Index ¶
- func RegisterClientAPIs()
- func TestBB()
- func TestGL()
- type ClientAPI
- type Comments
- type CommentsHandler
- type Domain
- type Engine
- type Issues
- type Repository
- type SingleRepoHandler
- func GetAppendIssueClientAPIEngine(clientAPI string) (SingleRepoHandler, error)
- func GetPostIssueClientAPIEngine(clientAPI string) (SingleRepoHandler, error)
- func GetSingleClientAPIEngine(clientAPI string) (SingleRepoHandler, error)
- func RegisterAppendIssueGithubAPI() SingleRepoHandler
- func RegisterPostIssueGithubAPI() SingleRepoHandler
- func RegisterSingleGithubAPI() SingleRepoHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterClientAPIs ¶
func RegisterClientAPIs()
RegisterClientAPIs register all the client APIs for all the clients.
Types ¶
type ClientAPI ¶
type ClientAPI struct {
Single SingleRepoHandler
PostIssue SingleRepoHandler
AppendIssue SingleRepoHandler
}
ClientAPI contains all the API function in a single Client.
type CommentsHandler ¶
CommentsHandler ...
type Domain ¶
type Domain struct {
// Domains.yml data
Host string `yaml:"host"`
BasicAuth []string `yaml:"basic-auth"`
}
Domain is a single code hosting service.
func ReadAndParseDomains ¶
ReadAndParseDomains read domainsFile and return the parsed content in a Domain slice.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is a helper class representing an engine.
func (*Engine) IdentifyVCS ¶
IdentifyVCS Will identify which VCS platform come the request and address it through correct engine this will handle vcs recognition and initiate with correct engine
func (*Engine) Start ¶
Start will get go API request and populate Event struct
- urlString is a string representing URL pointing to publiccode.yml but will accept also repo url
- valid is a bool representing publiccode validation status
- valErrors is a string in JSON format that will be deserialized it contains all validation errors
type Repository ¶
type Repository struct {
Name string
Hostname string
FileRawURL string
GitCloneURL string
GitBranch string
Domain Domain
Headers map[string]string
Metadata []byte
}
Repository is a single code repository. FileRawURL contains the direct url to the raw file.
type SingleRepoHandler ¶
SingleRepoHandler returns the client handler for an a single repository (every domain has a different handler implementation).
func GetAppendIssueClientAPIEngine ¶
func GetAppendIssueClientAPIEngine(clientAPI string) (SingleRepoHandler, error)
GetAppendIssueClientAPIEngine checks if the API client for the requested Post Issue clientAPI exists and return its handler.
func GetPostIssueClientAPIEngine ¶
func GetPostIssueClientAPIEngine(clientAPI string) (SingleRepoHandler, error)
GetPostIssueClientAPIEngine checks if the API client for the requested Post Issue clientAPI exists and return its handler.
func GetSingleClientAPIEngine ¶
func GetSingleClientAPIEngine(clientAPI string) (SingleRepoHandler, error)
GetSingleClientAPIEngine checks if the API client for the requested single repository clientAPI exists and return its handler.
func RegisterAppendIssueGithubAPI ¶
func RegisterAppendIssueGithubAPI() SingleRepoHandler
RegisterAppendIssueGithubAPI register API that will post an issue for given validation errors using ghUsername user on GitHub
func RegisterPostIssueGithubAPI ¶
func RegisterPostIssueGithubAPI() SingleRepoHandler
RegisterPostIssueGithubAPI register API that will post an issue for given validation errors using ghUsername user on GitHub
func RegisterSingleGithubAPI ¶
func RegisterSingleGithubAPI() SingleRepoHandler
RegisterSingleGithubAPI register API to get all issues which have been created from ghUsername user on GitHub