discovery

package
v0.43.13 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Discover

func Discover(ctx context.Context, client *github.Client) ([]*github.Organization, error)

Discover retrieves all active GitHub organizations accessible by the token. An organization is considered active if it has at least one non-archived repository.

Types

type Config

type Config struct {
	Token string `json:"token"`
}

Config represents the JSON input configuration

type OrgDetail

type OrgDetail struct {
	Login string `json:"login,omitempty"`
	ID    int64  `json:"id,omitempty"`
	Name  string `json:"name,omitempty"`
}

OrgDetail defines the minimal information for each organization.

func GithubIntegrationDiscovery

func GithubIntegrationDiscovery(cfg Config) ([]OrgDetail, error)

type Output

type Output struct {
	Organizations []OrgDetail `json:"organizations,omitempty"`
	Error         string      `json:"error,omitempty"`
}

Output defines the structure of the JSON response.

Jump to

Keyboard shortcuts

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