Documentation
¶
Index ¶
- type Client
- func (c *Client) DownloadContents(ctx context.Context, owner, repo, filepath string) ([]byte, error)
- func (c *Client) FetchOrganizationRepositories(ctx context.Context, owner string) ([]Repository, error)
- func (c *Client) FetchOrganziationMembers(ctx context.Context, enterprise, organization string) ([]Member, error)
- func (c *Client) FetchRestRepositories(ctx context.Context, owner, repoType string) ([]*github.Repository, error)
- type Collaborator
- type Language
- type Member
- type MemberFilterEnv
- type Repository
- func (r Repository) CreatedSince(date string) bool
- func (r Repository) HasLanguage(language string) bool
- func (r Repository) HasTopic(topic string) bool
- func (r Repository) IsInternal() bool
- func (r Repository) IsPrivate() bool
- func (r Repository) IsPublic() bool
- func (r Repository) PushedSince(date string) bool
- func (r Repository) UpdatedSince(date string) bool
- type RepositoryFilterEnv
- type RestRepo
- type SamlIdentity
- type Topic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) DownloadContents ¶ added in v0.2.0
func (c *Client) DownloadContents(ctx context.Context, owner, repo, filepath string) ([]byte, error)
DownloadContents downloads file contents from the given filepath
func (*Client) FetchOrganizationRepositories ¶ added in v0.6.1
func (*Client) FetchOrganziationMembers ¶ added in v0.4.0
func (*Client) FetchRestRepositories ¶
type Collaborator ¶ added in v0.2.0
type Collaborator struct {
*graphql.Collaborator
}
type Member ¶ added in v0.4.0
type Member struct { ID string `json:"id,omitempty"` Login string `json:"login,omitempty"` Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` Organization string `json:"organization,omitempty"` SamlIdentity *SamlIdentity `json:"saml_identity,omitempty"` }
func MapIdentitiesToMembers ¶ added in v0.4.0
func MapIdentitiesToMembers(identities []graphql.ExternalIdentityNode) []Member
type MemberFilterEnv ¶ added in v0.4.0
type MemberFilterEnv struct {
Members []Member
}
MemberFilterEnv filter environment for members
func (MemberFilterEnv) Contains ¶ added in v0.4.0
func (MemberFilterEnv) Contains(s, substring string) bool
Contains reports wether substring is in s.
type Repository ¶
type Repository struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` URL string `json:"url,omitempty"` SSHURL string `json:"ssh_url,omitempty"` Owner string `json:"owner,omitempty"` Visibility shared.Visibility `json:"visibility"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` PushedAt time.Time `json:"pushed_at,omitempty"` ForkCount int `json:"fork_count,omitempty"` StargazerCount int `json:"stargazer_count,omitempty"` WatcherCount int `json:"watcher_count,omitempty"` Topics []Topic `json:"topics,omitempty"` Languages []Language `json:"languages,omitempty"` Collaborators []Collaborator `json:"collaborators,omitempty"` }
func Map ¶
func Map(repositories []graphql.Repository, privateRepositories []*github.Repository) ([]Repository, error)
func ReduceRepositories ¶ added in v0.4.0
func ReduceRepositories(repositories []Repository, filter string) ([]Repository, error)
ReduceRepositories filters the repositories based on the given filter
func (Repository) CreatedSince ¶ added in v0.2.0
func (r Repository) CreatedSince(date string) bool
CreatedSince indicates if a repository has been created since the given date. Date has to be given in RFC3339 format, e.g. `2006-01-02T15:04:05Z07:00`.
func (Repository) HasLanguage ¶ added in v0.2.0
func (r Repository) HasLanguage(language string) bool
HasLanguage indicates if a repository has a given language.
func (Repository) HasTopic ¶ added in v0.2.0
func (r Repository) HasTopic(topic string) bool
HasTopic indicates if a repository has a given topic.
func (Repository) IsInternal ¶
func (r Repository) IsInternal() bool
IsInternal indicates if a repository has internal visibility.
func (Repository) IsPrivate ¶
func (r Repository) IsPrivate() bool
IsPrivate indicates if a repository has private visibility.
func (Repository) IsPublic ¶
func (r Repository) IsPublic() bool
IsPublic indicates if a repository has public visibility.
func (Repository) PushedSince ¶ added in v0.2.0
func (r Repository) PushedSince(date string) bool
PushedSince indicates if a repository has been pushed since the given date. Date has to be given in RFC3339 format, e.g. `2006-01-02T15:04:05Z07:00`.
func (Repository) UpdatedSince ¶ added in v0.2.0
func (r Repository) UpdatedSince(date string) bool
UpdatedSince indicates if a repository has been updated since the given date. Date has to be given in RFC3339 format, e.g. `2006-01-02T15:04:05Z07:00`.
type RepositoryFilterEnv ¶
type RepositoryFilterEnv struct {
Repositories []Repository
}
RepositoryFilterEnv filter environment for repositories
func (RepositoryFilterEnv) Contains ¶
func (RepositoryFilterEnv) Contains(s, substring string) bool
Contains reports wether substring is in s.
type SamlIdentity ¶ added in v0.4.0
type SamlIdentity struct {
ID string `json:"id,omitempty"`
}