org

package
v0.1.3-pre-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrgStats

type OrgStats struct {
	CoreStats     *types.OrgCoreStats
	Collaborators []types.UserLogin
	Webhooks      map[types.WebhookID]types.Webhook
	Installations map[types.InstallID]types.Install
	Runners       map[types.RunnerID]types.Runner
}

type Organization

type Organization struct {
	CoreStats     *types.OrgCoreStats
	Users         map[types.UserLogin]types.User
	Collaborators map[types.UserLogin]types.User
	Repositories  map[types.RepoName]repo.Repository
	Webhooks      map[types.WebhookID]types.Webhook
	Installations map[types.InstallID]types.Install
	Runners       map[types.RunnerID]types.Runner
	// contains filtered or unexported fields
}

func NewOrganization

func NewOrganization(
	ctx context.Context,
	client *github.Client,
	backoff *backoff.Backoff,
	name string) (*Organization, error)

func (*Organization) Audit

func (org *Organization) Audit(
	ctx context.Context,
	enableStats bool,
) ([]issue.Issue, map[issue.IssueID]error, error)

func (*Organization) Audit2FA

func (org *Organization) Audit2FA(
	ctx context.Context) ([]issue.Issue, map[issue.IssueID]error, error)

func (*Organization) AuditCoreStats

func (org *Organization) AuditCoreStats(
	ctx context.Context) ([]issue.Issue, map[issue.IssueID]error, error)

func (*Organization) AuditMemberPermissions

func (org *Organization) AuditMemberPermissions(
	ctx context.Context) ([]issue.Issue, map[issue.IssueID]error, error)

func (*Organization) AuditWebhooks

func (org *Organization) AuditWebhooks(
	ctx context.Context) ([]issue.Issue, map[issue.IssueID]error, error)

func (*Organization) GetActionRunners

func (org *Organization) GetActionRunners(
	ctx context.Context) (map[types.RunnerID]types.Runner, error)

func (*Organization) GetCollaborators

func (org *Organization) GetCollaborators(ctx context.Context) (
	map[types.UserLogin]types.User, error)

GetCollaborators returns the outside collaborators for a given org. Upon first call, it lazily updates the Organization with the user information

func (*Organization) GetInstalls

func (org *Organization) GetInstalls(
	ctx context.Context) (map[types.InstallID]types.Install, error)

func (*Organization) GetRepositories

func (org *Organization) GetRepositories(ctx context.Context) (
	map[types.RepoName]repo.Repository, error)

GetRepositories returns the repositories for a given org. Upon first call, it lazily updates the Organization with the repository information

func (*Organization) GetUsers

func (org *Organization) GetUsers(ctx context.Context) (
	map[types.UserLogin]types.User, error)

GetUsers returns the users for a given org. Upon first call, it lazily updates the Organization with the user information

func (*Organization) GetWebhooks

func (org *Organization) GetWebhooks(
	ctx context.Context) (map[types.WebhookID]types.Webhook, error)

GetWebhook returns the webhooks for a given org. Upon first call, it lazily updates the Organization with the webhook information

func (*Organization) Summarize

func (org *Organization) Summarize() *types.OrgCoreStats

Summarize provides generic statistics for a given org and serializes them to disc

Jump to

Keyboard shortcuts

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