Documentation ¶
Index ¶
- func BuildListProjectsOptions(optionsFuncs ...ListProjectOptionsFunc) *gitlab.ListProjectsOptions
- func WithInternalVisibility(opt *gitlab.ListProjectsOptions)
- func WithPaging(page, items int) gitlab.ListOptions
- func WithPrivateVisibility(opt *gitlab.ListProjectsOptions)
- func WithPublicVisibility(opt *gitlab.ListProjectsOptions)
- type Client
- type ListProjectOptionsFunc
- type Repository
- type RepositoryFilterEnv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildListProjectsOptions ¶
func BuildListProjectsOptions(optionsFuncs ...ListProjectOptionsFunc) *gitlab.ListProjectsOptions
func WithInternalVisibility ¶
func WithInternalVisibility(opt *gitlab.ListProjectsOptions)
func WithPaging ¶
func WithPaging(page, items int) gitlab.ListOptions
func WithPrivateVisibility ¶
func WithPrivateVisibility(opt *gitlab.ListProjectsOptions)
func WithPublicVisibility ¶
func WithPublicVisibility(opt *gitlab.ListProjectsOptions)
Types ¶
type Client ¶
type Client struct {
*gitlab.Client
}
func NewClientWithTokenAuth ¶
func (*Client) ListRepositories ¶
func (c *Client) ListRepositories(ctx context.Context, optionsFuncs ...ListProjectOptionsFunc) ([]Repository, error)
type ListProjectOptionsFunc ¶
type ListProjectOptionsFunc func(*gitlab.ListProjectsOptions)
func ConvertFiltersToListProjectOptions ¶
func ConvertFiltersToListProjectOptions(filter string) []ListProjectOptionsFunc
ConvertFiltersToListProjectOptions converts the filter expressions to ListProjectOptions
type Repository ¶
type Repository struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Owner string `json:"owner,omitempty"` URL string `json:"url,omitempty"` SSHURL string `json:"sshurl,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` LastActivityAt *time.Time `json:"last_activity_at,omitempty"` Visibility shared.Visibility `json:"visibility,omitempty"` }
func Map ¶
func Map(projects []*gitlab.Project) []Repository
func Reduce ¶
func Reduce(repositories []Repository, filter string) ([]Repository, error)
Reduce filters the repositories based on the given filter
func (Repository) CreatedSince ¶
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) 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) LastActivitySince ¶
func (r Repository) LastActivitySince(date string) bool
LastActivitySince indicates if a repository has been active 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.