gitstrap

package
v0.0.0-...-8cf1ac8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gitstrap

type Gitstrap struct {
	// contains filtered or unexported fields
}

Gitstrap - main context

func New

func New(ctx context.Context, token string, debug bool) (*Gitstrap, error)

New gitstrap context

func (*Gitstrap) Apply

func (g *Gitstrap) Apply(m *spec.Model) error

Apply specification

func (*Gitstrap) Create

func (g *Gitstrap) Create(m *spec.Model) error

func (*Gitstrap) Delete

func (g *Gitstrap) Delete(m *spec.Model) error

func (*Gitstrap) GetHooks

func (g *Gitstrap) GetHooks(owner, name string) (<-chan *spec.Model, <-chan error)

func (*Gitstrap) GetOrg

func (g *Gitstrap) GetOrg(name string) (*spec.Model, error)

func (*Gitstrap) GetProtection

func (g *Gitstrap) GetProtection(owner, repo, branch string) (*spec.Model, error)

func (*Gitstrap) GetRepo

func (g *Gitstrap) GetRepo(name string, owner string) (*spec.Model, error)

GetRepo repository resource

func (*Gitstrap) GetTeams

func (g *Gitstrap) GetTeams(org string) (<-chan *spec.Model, <-chan error)

GetTeams fetches organization teams definitions into spec channel

func (*Gitstrap) ListRepos

func (g *Gitstrap) ListRepos(filter ListFilter, owner string, errs chan<- error) <-chan *RepoInfo

ListRepos lists repositories

type LfStarsCriteria

type LfStarsCriteria func(int) bool

LfStarsCriteria - criteria of repository stars for filtering

func LfStarsGt

func LfStarsGt(val int) LfStarsCriteria

LfStarsGt - list filter stars criteria: greater than `val`

func LfStarsLt

func LfStarsLt(val int) LfStarsCriteria

LfStarsLt - list filter stars criteria: less than `val`

type ListFilter

type ListFilter interface {
	// contains filtered or unexported methods
}

ListFilter for list results

var LfNop ListFilter = &lfNop{}

LfNop - list filter does nothing

func LfForks

func LfForks(origin ListFilter, fork bool) ListFilter

LfForks - list filter by fork criteria

func LfStars

func LfStars(origin ListFilter, criteria LfStarsCriteria) ListFilter

LfStars - list filter by stars count

type RepoInfo

type RepoInfo struct {
	// contains filtered or unexported fields
}

func (*RepoInfo) WriteTo

func (r *RepoInfo) WriteTo(w io.Writer) (int64, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL