concurrency

package
v0.0.0-...-6db64f3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChannelMerger

func ChannelMerger(output chan<- interface{}, inputs ...<-chan interface{})

ChannelMerger merges the output of n channel into one

func GetGithubItemsFromCfg

func GetGithubItemsFromCfg(cfg Config) ([]Group, []Project, []string)

func GetGitlabItemsFromCfg

func GetGitlabItemsFromCfg(cfg Config) ([]Group, []Project, []string)

Types

type Config

type Config struct {
	Github []githubConfig `yaml:"github"`
	Gitlab []gitlabConfig `yaml:"gitlab"`
	Anon   anonConfig     `yaml:"anon"`
}

type GithubOrgGroup

type GithubOrgGroup struct {
	Client   *github.Client
	Name     string
	Location string
	Token    string
}

func (*GithubOrgGroup) GetGroups

func (g *GithubOrgGroup) GetGroups() []Group

func (*GithubOrgGroup) GetProjects

func (g *GithubOrgGroup) GetProjects() []Project

type GithubTeamGroup

type GithubTeamGroup struct {
	Client   *github.Client
	Org      string
	Name     string
	Location string
	Token    string
}

func (*GithubTeamGroup) GetGroups

func (g *GithubTeamGroup) GetGroups() []Group

func (*GithubTeamGroup) GetProjects

func (g *GithubTeamGroup) GetProjects() []Project

type GithubUserGroup

type GithubUserGroup struct {
	Client   *github.Client
	Name     string
	Location string
	Token    string
}

func (*GithubUserGroup) GetGroups

func (g *GithubUserGroup) GetGroups() []Group

func (*GithubUserGroup) GetProjects

func (g *GithubUserGroup) GetProjects() []Project

type GitlabGroup

type GitlabGroup struct {
	Client       *gitlab.Client
	Token        string
	RootFullPath string
	Location     string
	ID           int
}

func (*GitlabGroup) GetGroups

func (g *GitlabGroup) GetGroups() []Group

func (*GitlabGroup) GetProjects

func (g *GitlabGroup) GetProjects() []Project

type Group

type Group interface {
	GetGroups() []Group
	GetProjects() []Project
}

type Manager

type Manager struct {
	GroupChan   chan error
	ProjectChan chan interface{}
	// contains filtered or unexported fields
}

func NewManager

func NewManager(projectAction projectActionFunc) Manager

func (Manager) Start

func (m Manager) Start(groups []Group, projects []Project)

type Project

type Project struct {
	URL      string `yaml:"url"`
	Location string `yaml:"location"`
	Token    string `yaml:"token"`
}

Jump to

Keyboard shortcuts

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