Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitbucketMetadataFactory ¶
type BitbucketMetadataFactory func(repo bitbucket.Repository) Metadata
BitbucketMetadataFactory allows to provide a custom generated metadata
type GithubMetadataFactory ¶
type GithubMetadataFactory func(repo github.Repository) Metadata
GithubMetadataFactory allows to provide a custom generated metadata
type GithubProjectMatcher ¶
type GithubProjectMatcher struct {
Rules map[string]GithubProjectMatcherRule `json:"rules,omitempty"`
}
GithubProjectMatcher matches a repository with a project
func NewGithubProjectMatcherFromJSON ¶
func NewGithubProjectMatcherFromJSON(data io.Reader) (*GithubProjectMatcher, error)
NewGithubProjectMatcherFromJSON initializes GithubProjectMatcher from json
type GithubProjectMatcherRule ¶
type GithubProjectMatcherRule struct {
URL *Regexp `json:"url,omitempty"`
}
GithubProjectMatcherRule rule that matches a repository to a project
type Project ¶
type Project struct {
Metadata Metadata `json:"meta,omitempty"`
Git []string `json:"git,omitempty"`
Github []string `json:"github,omitempty"`
GithubRepo []string `json:"github:repo,omitempty"`
}
Project holds the project resources and metadata
type Projects ¶
Projects holds all projects to be loaded in Grimoirelab
func ConvertBitbucketToProjectsJSON ¶
func ConvertBitbucketToProjectsJSON(repos []bitbucket.Repository, metadataFactory BitbucketMetadataFactory) Projects
ConvertBitbucketToProjectsJSON converts the repositories into grimoirelab projects.json
func ConvertGithubToProjectsJSON ¶
func ConvertGithubToProjectsJSON(repos []github.Repository, metadataFactory GithubMetadataFactory, projectMatcher *GithubProjectMatcher) Projects
ConvertGithubToProjectsJSON converts the repositories into grimoirelab projects.json
type Regexp ¶
Regexp embeds a regexp.Regexp, and adds Text/JSON (un)marshaling.
func Compile ¶
Compile wraps the result of the standard library's regexp.Compile, for easy (un)marshaling.
func MustCompile ¶
MustCompile wraps the result of the standard library's regexp.Compile, for easy (un)marshaling.
func (*Regexp) MarshalText ¶
MarshalText satisfies the encoding.TextMarshaler interface, also used by json.Marshal.
func (*Regexp) UnmarshalText ¶
UnmarshalText satisfies the encoding.TextMarshaler interface, also used by json.Unmarshal.