Documentation ¶
Index ¶
- Constants
- Variables
- func CloneGitHubRepository(ctx context.Context, ghRepo *github.Repository) *git.Repository
- func CreateFileInGitHubRepositoryBranch(ctx context.Context, ghc *github.Client, ghRepo *github.Repository, ...) string
- func CreateGitHubRepository(ctx context.Context, ghc *github.Client, fs embed.FS, embeddedPath string) *github.Repository
- func CreateGitHubRepositoryBranch(ctx context.Context, ghc *github.Client, ghRepo *github.Repository, ...)
- func CreateGitHubWebhookTunnel() string
- func CreateK8sApplication(ctx context.Context, c client.Client, ns string, spec apiv1.ApplicationSpec) string
- func CreateK8sGitOpsServiceAccount(ctx context.Context, c client.Client, ns string) string
- func CreateK8sNamespace(ctx context.Context, c client.Client) string
- func CreateK8sRepository(ctx context.Context, c client.Client, ns string, spec apiv1.RepositorySpec) string
- func CreateK8sSecretWithGitHubAuthToken(ctx context.Context, c client.Client, ns, token string) (string, string)
- func DeleteGitHubRepositoryBranch(ctx context.Context, ghc *github.Client, ghRepo *github.Repository, ...)
- func GetGitHubRepositoryBranchNamesAndSHA(ctx context.Context, ghc *github.Client, ghRepo *github.Repository) map[string]string
- func GetGitHubRepositoryBranchSHA(ctx context.Context, ghc *github.Client, ghRepo *github.Repository, ...) string
- func GetGitHubToken() string
- func GitHubRepositoryBranchExists(ctx context.Context, ghc *github.Client, ghRepo *github.Repository, ...) bool
- func GrantK8sAccessToAllSecrets(ctx context.Context, c client.Client, ns string)
- func GrantK8sAccessToSecret(ctx context.Context, c client.Client, ns, secretName string)
- func NewGitHubClient(ctx context.Context) *github.Client
- func NewK8sClient() (client.Client, *rest.Config)
- func PatchK8sObject(ctx context.Context, c client.Client, obj client.Object, ...)
- func PrintK8sDebugInfo(ctx SpecContext, c client.Client, cfg *rest.Config, nsName string)
- func TraverseEmbeddedPath(fs embed.FS, path string, handler func(path string, data []byte) error) error
- type JSONPatchItem
- type JSONPatchOperation
Constants ¶
View Source
const (
GitHubOwner = "devbot-testing"
)
Variables ¶
View Source
var ( DevbotNamespace = "devbot" DevbotControllerServiceAccountName = "devbot-controller" )
Functions ¶
func CloneGitHubRepository ¶
func CloneGitHubRepository(ctx context.Context, ghRepo *github.Repository) *git.Repository
func CreateGitHubRepository ¶
func CreateGitHubWebhookTunnel ¶
func CreateGitHubWebhookTunnel() string
func CreateK8sApplication ¶
func CreateK8sRepository ¶
func GetGitHubToken ¶
func GetGitHubToken() string
func GrantK8sAccessToSecret ¶
func PatchK8sObject ¶
func PrintK8sDebugInfo ¶
Types ¶
type JSONPatchItem ¶
type JSONPatchItem struct { Op JSONPatchOperation `json:"op"` Path string `json:"path"` Value any `json:"value"` }
type JSONPatchOperation ¶
type JSONPatchOperation string
const ( JSONPatchOperationAdd JSONPatchOperation = "add" JSONPatchOperationRemove JSONPatchOperation = "remove" JSONPatchOperationReplace JSONPatchOperation = "replace" JSONPatchOperationCopy JSONPatchOperation = "copy" JSONPatchOperationMove JSONPatchOperation = "move" JSONPatchOperationTest JSONPatchOperation = "test" )
Click to show internal directories.
Click to hide internal directories.