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 WithAPIReader ¶ added in v1.6.0
WithAPIReader supplies an uncached reader used to resolve extraData ConfigMap/Secret sources live on every reconcile, rather than starting a cluster-wide watch/cache for objects the operator otherwise never touches.
func WithClient ¶ added in v1.5.0
func WithEventRecorder ¶ added in v1.6.0
func WithEventRecorder(r record.EventRecorder) Option
WithEventRecorder supplies the recorder used to surface non-fatal extraData issues (reserved/shadowed keys) as Warning events on the owner.
func WithLogger ¶
func WithMetrics ¶ added in v1.3.0
type TokenManager ¶ added in v1.5.0
type TokenManager interface {
client.Object
GetType() string
GetAppRef() *githubv1.AppReference
GetSecretBasicAuth() bool
GetSecretDataSources() []githubv1.SecretDataSource
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)
RemoveStatusCondition(conditionType string) (changed bool)
}
TokenManager provides a common interface for both namespaced Tokens and ClusterTokens.
Click to show internal directories.
Click to hide internal directories.