github

package module
v0.0.0-...-aaa9068 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package github provides a client for GitHub API interactions.

Package github implements a provider for GitHub secrets, allowing External Secrets to write secrets to GitHub Actions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaintenanceStatus

func MaintenanceStatus() esv1.MaintenanceStatus

MaintenanceStatus returns the maintenance status of the provider.

func NewProvider

func NewProvider() esv1.Provider

NewProvider creates a new Provider instance.

func ProviderSpec

func ProviderSpec() *esv1.SecretStoreProvider

ProviderSpec returns the provider specification for registration.

Types

type ActionsServiceClient

type ActionsServiceClient interface {
	// CreateOrUpdateOrgSecret creates or updates an organization secret.
	CreateOrUpdateOrgSecret(ctx context.Context, org string, eSecret *github.EncryptedSecret) (response *github.Response, err error)
	// GetOrgSecret retrieves an organization secret.
	GetOrgSecret(ctx context.Context, org string, name string) (*github.Secret, *github.Response, error)
	// ListOrgSecrets lists all organization secrets.
	ListOrgSecrets(ctx context.Context, org string, opts *github.ListOptions) (*github.Secrets, *github.Response, error)
}

ActionsServiceClient defines the interface for interacting with GitHub Actions secrets.

type Client

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

Client implements the External Secrets Kubernetes provider for GitHub Actions secrets.

func (*Client) AuthWithPrivateKey

func (g *Client) AuthWithPrivateKey(ctx context.Context) (*github.Client, error)

AuthWithPrivateKey creates a new GitHub client authenticated using a private key. It retrieves the private key from the secret referenced in the provider configuration and sets up GitHub App authentication.

func (*Client) Close

func (g *Client) Close(_ context.Context) error

Close cleans up any resources held by the client. No-op for this provider.

func (*Client) DeleteSecret

func (g *Client) DeleteSecret(ctx context.Context, remoteRef esv1.PushSecretRemoteRef) error

DeleteSecret deletes a secret from GitHub Actions.

func (*Client) GetAllSecrets

func (g *Client) GetAllSecrets(_ context.Context, _ esv1.ExternalSecretFind) (map[string][]byte, error)

GetAllSecrets is not implemented as this provider is write-only.

func (*Client) GetSecret

GetSecret is not implemented as this provider is write-only.

func (*Client) GetSecretMap

func (g *Client) GetSecretMap(_ context.Context, _ esv1.ExternalSecretDataRemoteRef) (map[string][]byte, error)

GetSecretMap is not implemented as this provider is write-only.

func (*Client) PushSecret

func (g *Client) PushSecret(ctx context.Context, secret *corev1.Secret, remoteRef esv1.PushSecretData) error

PushSecret pushes a new secret to GitHub Actions.

func (*Client) SecretExists

func (g *Client) SecretExists(ctx context.Context, ref esv1.PushSecretRemoteRef) (bool, error)

SecretExists checks if a secret exists in GitHub Actions.

func (*Client) Validate

func (g *Client) Validate() (esv1.ValidationResult, error)

Validate checks if the client is properly configured and has access to the GitHub Actions API.

type Provider

type Provider struct {
}

Provider implements the GitHub provider for managing secrets through GitHub Actions.

func (*Provider) Capabilities

func (p *Provider) Capabilities() esv1.SecretStoreCapabilities

Capabilities return the provider supported capabilities (ReadOnly, WriteOnly, ReadWrite).

func (*Provider) NewClient

func (p *Provider) NewClient(ctx context.Context, store esv1.GenericStore, kube client.Client, namespace string) (esv1.SecretsClient, error)

NewClient constructs a new secrets client based on the provided store.

func (*Provider) ValidateStore

func (p *Provider) ValidateStore(store esv1.GenericStore) (admission.Warnings, error)

ValidateStore validates the configuration of a GitHub secret store.

Jump to

Keyboard shortcuts

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