data

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIGetter

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

func NewAPIGetter

func NewAPIGetter(gqlClient api.GQLClient, restClient api.RESTClient) *APIGetter

func (*APIGetter) GetOrgActionSecrets

func (g *APIGetter) GetOrgActionSecrets(owner string) ([]byte, error)

func (*APIGetter) GetOrgCodespacesSecrets

func (g *APIGetter) GetOrgCodespacesSecrets(owner string) ([]byte, error)

func (*APIGetter) GetOrgDependabotSecrets

func (g *APIGetter) GetOrgDependabotSecrets(owner string) ([]byte, error)

func (*APIGetter) GetRepo

func (g *APIGetter) GetRepo(owner string, name string) (*RepoQuery, error)

func (*APIGetter) GetRepoActionSecrets

func (g *APIGetter) GetRepoActionSecrets(owner string, repo string) ([]byte, error)

func (*APIGetter) GetRepoCodespacesSecrets

func (g *APIGetter) GetRepoCodespacesSecrets(owner string, repo string) ([]byte, error)

func (*APIGetter) GetRepoDependabotSecrets

func (g *APIGetter) GetRepoDependabotSecrets(owner string, repo string) ([]byte, error)

func (*APIGetter) GetReposList

func (g *APIGetter) GetReposList(owner string, endCursor *string) (*ReposQuery, error)

func (*APIGetter) GetScopedOrgActionSecrets

func (g *APIGetter) GetScopedOrgActionSecrets(owner string, secret string) ([]byte, error)

func (*APIGetter) GetScopedOrgCodespacesSecrets

func (g *APIGetter) GetScopedOrgCodespacesSecrets(owner string, secret string) ([]byte, error)

func (*APIGetter) GetScopedOrgDependabotSecrets

func (g *APIGetter) GetScopedOrgDependabotSecrets(owner string, secret string) ([]byte, error)

type Getter

type Getter interface {
	GetReposList(owner string, endCursor *string) ([]ReposQuery, error)
	GetRepo(owner string, name string) ([]RepoQuery, error)
	GetOrgActionSecrets(owner string) ([]byte, error)
	GetRepoActionSecrets(owner string, repo string) ([]byte, error)
	GetScopedOrgActionSecrets(owner string, secret string) ([]byte, error)
	GetOrgDependabotSecrets(owner string) ([]byte, error)
	GetRepoDependabotSecrets(owner string, repo string) ([]byte, error)
	GetScopedOrgDependabotSecrets(owner string, secret string) ([]byte, error)
	GetOrgCodespacesSecrets(owner string) ([]byte, error)
	GetRepoCodespacesSecrets(owner string, repo string) ([]byte, error)
	GetScopedOrgCodespacesSecrets(owner string, secret string) ([]byte, error)
}

type RepoInfo

type RepoInfo struct {
	DatabaseId int       `json:"databaseId"`
	Name       string    `json:"name"`
	UpdatedAt  time.Time `json:"updatedAt"`
	Visibility string    `json:"visibility"`
}

type RepoQuery

type RepoQuery struct {
	Repository RepoInfo `graphql:"repository(owner: $owner, name: $name)"`
}

type ReposQuery

type ReposQuery struct {
	Organization struct {
		Repositories struct {
			TotalCount int
			Nodes      []RepoInfo
			PageInfo   struct {
				EndCursor   string
				HasNextPage bool
			}
		} `graphql:"repositories(first: 100, after: $endCursor)"`
	} `graphql:"organization(login: $owner)"`
}

type ScopedRepository

type ScopedRepository struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type ScopedSecretsResponse

type ScopedSecretsResponse struct {
	TotalCount   int                `json:"total_count"`
	Repositories []ScopedRepository `json:"repositories"`
}

type Secret

type Secret struct {
	Name          string    `json:"name"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
	Visibility    string    `json:"visibility"`
	SelectedRepos string    `json:"selected_repositories_url"`
}

type SecretExport

type SecretExport struct {
	SecretLevel    string
	SecretType     string
	SecretName     string
	SecretAccess   string
	RepositoryName string
	RepositoryID   int
}

type SecretsResponse

type SecretsResponse struct {
	TotalCount int      `json:"total_count"`
	Secrets    []Secret `json:"secrets"`
}

Jump to

Keyboard shortcuts

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