gitsecret

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGitSecretAlreadyExists   = errors.New("git secret already exists")
	ErrGitSecretNotFound        = errors.New("git secret not found")
	ErrSecretStoreNotConfigured = errors.New("secret store not configured")
	ErrInvalidSecretType        = errors.New("secret type must be 'basic-auth' or 'ssh-auth'")
	ErrWorkflowPlaneNotFound    = errors.New("workflow plane not found")
)

Functions

This section is empty.

Types

type CreateGitSecretParams

type CreateGitSecretParams struct {
	SecretName        string
	SecretType        string
	Username          string
	Token             string
	SSHKey            string
	SSHKeyID          string
	WorkflowPlaneKind string
	WorkflowPlaneName string
}

CreateGitSecretParams holds the parameters for creating a git secret.

type GitSecretInfo

type GitSecretInfo struct {
	Name              string
	Namespace         string
	WorkflowPlaneKind string
	WorkflowPlaneName string
}

GitSecretInfo represents a git secret resource.

type Service

type Service interface {
	// ListGitSecrets returns all git secrets in a namespace.
	ListGitSecrets(ctx context.Context, namespaceName string) ([]GitSecretInfo, error)
	// CreateGitSecret creates a new git secret.
	CreateGitSecret(ctx context.Context, namespaceName string, req *CreateGitSecretParams) (*GitSecretInfo, error)
	// DeleteGitSecret deletes a git secret by name.
	DeleteGitSecret(ctx context.Context, namespaceName, secretName string) error
}

Service defines the git secret operations.

func NewService

func NewService(k8sClient client.Client, planeClientProvider kubernetesClient.WorkflowPlaneClientProvider, logger *slog.Logger) Service

NewService creates a new git secret service without authorization.

func NewServiceWithAuthz

func NewServiceWithAuthz(k8sClient client.Client, planeClientProvider kubernetesClient.WorkflowPlaneClientProvider, authzPDP authz.PDP, logger *slog.Logger) Service

NewServiceWithAuthz creates a new git secret service with authorization.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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