testing

package
v0.0.0-...-03eeb13 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: GPL-3.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DevbotNamespace                              = "devbot"
	DevbotRepositoryControllerServiceAccountName = "devbot-controller"
)
View Source
const (
	GitHubOwner = "devbot-testing"
)

Variables

This section is empty.

Functions

func TraverseEmbeddedPath

func TraverseEmbeddedPath(fs embed.FS, path string, handler func(path string, data []byte) error) error

Types

type GClient

type GClient struct {
	Token string
	// contains filtered or unexported fields
}

func GH

func GH(ctx context.Context, t T) *GClient

func (*GClient) CloneRepository

func (gh *GClient) CloneRepository(t T, name string) (*GitHubRepositoryInfo, *git.Repository)

func (*GClient) CreateRepository

func (gh *GClient) CreateRepository(t T, fs embed.FS, embeddedPath string) *GitHubRepositoryInfo

type GitHubRepositoryInfo

type GitHubRepositoryInfo struct {
	Owner         string
	Name          string
	WebhookSecret string
	// contains filtered or unexported fields
}

func (*GitHubRepositoryInfo) CreateBranch

func (r *GitHubRepositoryInfo) CreateBranch(t T, branch string) string

func (*GitHubRepositoryInfo) CreateFile

func (r *GitHubRepositoryInfo) CreateFile(t T, branch string) string

func (*GitHubRepositoryInfo) Delete

func (r *GitHubRepositoryInfo) Delete(t T)

func (*GitHubRepositoryInfo) DeleteBranch

func (r *GitHubRepositoryInfo) DeleteBranch(t T, branch string)

func (*GitHubRepositoryInfo) GetBranchSHA

func (r *GitHubRepositoryInfo) GetBranchSHA(t T, branch string) string

func (*GitHubRepositoryInfo) SetupWebhook

func (r *GitHubRepositoryInfo) SetupWebhook(t T)

type KClient

type KClient struct {
	Client  client.Client
	Manager manager.Manager
	// contains filtered or unexported fields
}

func K

func K(ctx context.Context, t T) *KClient

func (*KClient) CreateNamespace

func (k *KClient) CreateNamespace(t T) *KNamespace

type KNamespace

type KNamespace struct {
	Name string
	// contains filtered or unexported fields
}

func (*KNamespace) CreateApplication

func (n *KNamespace) CreateApplication(t T, spec apiv1.ApplicationSpec) string

func (*KNamespace) CreateGitHubAuthSecret

func (n *KNamespace) CreateGitHubAuthSecret(t T, token string, restrictRole bool) (secretName, key string)

func (*KNamespace) CreateGitHubAuthSecretSpec

func (n *KNamespace) CreateGitHubAuthSecretSpec(t T, token string, restrictRole bool) *apiv1.GitHubRepositoryPersonalAccessToken

func (*KNamespace) CreateRepository

func (n *KNamespace) CreateRepository(t T, spec apiv1.RepositorySpec) string

Jump to

Keyboard shortcuts

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