utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrgDependabotSecretData

func CreateOrgDependabotSecretData(secret data.ImportedSecret, keyID string, encryptedValue string) *data.CreateOrgDepSecret

Separate function to address that the Dependabot Org Secret API is an array of strings instead of an array of integers

func CreateOrgSecretData

func CreateOrgSecretData(secret data.ImportedSecret, keyID string, encryptedValue string) *data.CreateOrgSecret

func CreateOrgSourceVariableData

func CreateOrgSourceVariableData(variable data.Variable) *data.CreateVariableAll

func CreateOrgVariableData

func CreateOrgVariableData(variable data.ImportedVariable) *data.CreateOrgVariable

func CreateRepoSecretData

func CreateRepoSecretData(keyID string, encryptedValue string) *data.CreateRepoSecret

func CreateRepoVariableData

func CreateRepoVariableData(variable data.ImportedVariable) *data.CreateRepoVariable

func GetScopedSourceOrgActionVariables

func GetScopedSourceOrgActionVariables(owner string, secret string, g *sourceAPIGetter) ([]byte, error)

func GetSourceOrganizationVariables

func GetSourceOrganizationVariables(owner string, g *sourceAPIGetter) ([]byte, error)

func NewSourceAPIGetter

func NewSourceAPIGetter(restClient api.RESTClient) *sourceAPIGetter

Types

type APIGetter

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

func NewAPIGetter

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

func (*APIGetter) CreateOrgActionSecret

func (g *APIGetter) CreateOrgActionSecret(owner string, secret string, data io.Reader) error

func (*APIGetter) CreateOrgCodespacesSecret

func (g *APIGetter) CreateOrgCodespacesSecret(owner string, secret string, data io.Reader) error

func (*APIGetter) CreateOrgDependabotSecret

func (g *APIGetter) CreateOrgDependabotSecret(owner string, secret string, data io.Reader) error

func (*APIGetter) CreateOrganizationVariable

func (g *APIGetter) CreateOrganizationVariable(owner string, data io.Reader) error

func (*APIGetter) CreateRepoActionSecret

func (g *APIGetter) CreateRepoActionSecret(owner string, repo string, secret string, data io.Reader) error

func (*APIGetter) CreateRepoCodespacesSecret

func (g *APIGetter) CreateRepoCodespacesSecret(owner string, repo string, secret string, data io.Reader) error

func (*APIGetter) CreateRepoDependabotSecret

func (g *APIGetter) CreateRepoDependabotSecret(owner string, repo string, secret string, data io.Reader) error

func (*APIGetter) CreateRepoVariable

func (g *APIGetter) CreateRepoVariable(owner string, repo string, data io.Reader) error

func (*APIGetter) CreateSecretsList

func (g *APIGetter) CreateSecretsList(filedata [][]string) []data.ImportedSecret

func (*APIGetter) CreateVariableList

func (g *APIGetter) CreateVariableList(filedata [][]string) []data.ImportedVariable

func (*APIGetter) EncryptSecret

func (g *APIGetter) EncryptSecret(publickey string, secret string) (string, error)

func (*APIGetter) GetOrgActionPublicKey

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

func (*APIGetter) GetOrgActionSecrets

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

func (*APIGetter) GetOrgActionVariables

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

func (*APIGetter) GetOrgCodespacesPublicKey

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

func (*APIGetter) GetOrgCodespacesSecrets

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

func (*APIGetter) GetOrgDependabotPublicKey

func (g *APIGetter) GetOrgDependabotPublicKey(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) (*data.RepoSingleQuery, error)

func (*APIGetter) GetRepoActionPublicKey

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

func (*APIGetter) GetRepoActionSecrets

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

func (*APIGetter) GetRepoActionVariables

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

func (*APIGetter) GetRepoCodespacesPublicKey

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

func (*APIGetter) GetRepoCodespacesSecrets

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

func (*APIGetter) GetRepoDependabotPublicKey

func (g *APIGetter) GetRepoDependabotPublicKey(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) (*data.ReposQuery, error)

func (*APIGetter) GetScopedOrgActionSecrets

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

func (*APIGetter) GetScopedOrgActionVariables

func (g *APIGetter) GetScopedOrgActionVariables(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) ([]data.ReposQuery, error)
	GetRepo(owner string, name string) ([]data.RepoSingleQuery, 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)
	CreateSecretsList(data [][]string) []data.ImportedSecret
	GetOrgActionPublicKey(owner string) ([]byte, error)
	GetRepoActionPublicKey(owner string, repo string) ([]byte, error)
	GetOrgCodespacesPublicKey(owner string) ([]byte, error)
	GetRepoCodespacesPublicKey(owner string, repo string) ([]byte, error)
	GetOrgDependabotPublicKey(owner string) ([]byte, error)
	GetRepoDependabotPublicKey(owner string, repo string) ([]byte, error)
	EncryptSecret(publickey string, secret string) (string, error)
	CreateOrgActionSecret(owner string, secret string, data io.Reader) error
	CreateRepoActionSecret(owner string, repo string, secret string, data io.Reader) error
	CreateOrgCodespacesSecret(owner string, secret string, data io.Reader) error
	CreateRepoCodespacesSecret(owner string, repo string, secret string, data io.Reader) error
	CreateOrgDependabotSecret(owner string, secret string, data io.Reader) error
	CreateRepoDependabotSecret(owner string, repo string, secret string, data io.Reader) error
	GetOrgActionVariables(owner string) ([]byte, error)
	GetRepoActionVariables(owner string, repo string) ([]byte, error)
	GetScopedOrgActionVariables(owner string, secret string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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