tokenmanager

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SecretTypeToken     = corev1.SecretType("github.as-code.io/token")
	SecretTypeBasicAuth = corev1.SecretType("github.as-code.io/basic-auth")
	BasicAuthUsername   = "x-access-token"
)

Variables

This section is empty.

Functions

func NewTokenSecret

func NewTokenSecret(key types.NamespacedName, owner TokenManager, controllerName string, options ...Option) *tokenSecret

Types

type Option

type Option func(*tokenSecret)

func WithClient added in v1.5.0

func WithClient(c client.Client) Option

func WithGHApp

func WithGHApp(g ghait.GHAIT) Option

func WithLogger

func WithLogger(logger logr.Logger) Option

func WithMetrics added in v1.3.0

func WithMetrics(m *metrics.Recorder) Option

type TokenManager added in v1.5.0

type TokenManager interface {
	client.Object

	GetType() string
	GetAppRef() *githubv1.AppReference
	GetSecretBasicAuth() bool
	GetInstallationID() int64
	GetRefreshInterval() time.Duration
	GetRetryInterval() time.Duration
	GetSecretNamespace() string
	GetSecretName() string
	GetSecretLabels() map[string]string
	GetSecretAnnotations() map[string]string
	GetInstallationTokenOptions() *github.InstallationTokenOptions
	GetManagedSecret() githubv1.ManagedSecret
	UpdateManagedSecret() (changed bool)
	GetStatusTimestamps() (createdAt, expiresAt time.Time)
	SetStatusTimestamps(expiresAt time.Time)
	GetStatusConditions() []metav1.Condition
	SetStatusCondition(condition metav1.Condition) (changed bool)
}

TokenManager provides a common interface for both namespaced Tokens and ClusterTokens.

Jump to

Keyboard shortcuts

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