driverutil

package
v0.12.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Target_name = map[int32]string{
		0: "ActiveConfiguration",
		1: "DefaultConfiguration",
	}
	Target_value = map[string]int32{
		"ActiveConfiguration":  0,
		"DefaultConfiguration": 1,
	}
)

Enum value maps for Target.

View Source
var (
	Action_name = map[int32]string{
		0: "NoAction",
		1: "Set",
		2: "Reset",
	}
	Action_value = map[string]int32{
		"NoAction": 0,
		"Set":      1,
		"Reset":    2,
	}
)

Enum value maps for Action.

View Source
var (
	InstallState_name = map[int32]string{
		0: "NotInstalled",
		1: "Installed",
		2: "Uninstalling",
	}
	InstallState_value = map[string]int32{
		"NotInstalled": 0,
		"Installed":    1,
		"Uninstalling": 2,
	}
)

Enum value maps for InstallState.

View Source
var (
	ConfigurationState_name = map[int32]string{
		0: "NotConfigured",
		1: "Configured",
	}
	ConfigurationState_value = map[string]int32{
		"NotConfigured": 0,
		"Configured":    1,
	}
)

Enum value maps for ConfigurationState.

View Source
var (
	ApplicationState_name = map[int32]string{
		0: "NotRunning",
		1: "Pending",
		2: "Running",
		3: "Failed",
	}
	ApplicationState_value = map[string]int32{
		"NotRunning": 0,
		"Pending":    1,
		"Running":    2,
		"Failed":     3,
	}
)

Enum value maps for ApplicationState.

View Source
var (
	ValidationError_Severity_name = map[int32]string{
		0: "Unknown",
		1: "Warning",
		2: "Error",
	}
	ValidationError_Severity_value = map[string]int32{
		"Unknown": 0,
		"Warning": 1,
		"Error":   2,
	}
)

Enum value maps for ValidationError_Severity.

View Source
var File_github_com_rancher_opni_pkg_plugins_driverutil_types_proto protoreflect.FileDescriptor

Functions

func ApplyOptions

func ApplyOptions(dest any, opts ...Option) error

func CopyRevision added in v0.12.0

func CopyRevision[T Revisioner](dst, src T)

func DiffStat added in v0.12.0

func DiffStat(diff string, opts ...jsondiff.Options) string

func GetRevisionFieldIndex added in v0.12.0

func GetRevisionFieldIndex[T Revisioner]() int

func MarshalConfigJson added in v0.12.0

func MarshalConfigJson(t proto.Message) []byte

func RenderJsonDiff added in v0.12.0

func RenderJsonDiff[T proto.Message](old, new T, opts jsondiff.Options) (string, bool)

func SetRevision added in v0.12.0

func SetRevision[T Revisioner](t T, value int64, maybeTimestamp ...time.Time)

func UnsetRevision added in v0.12.0

func UnsetRevision[T Revisioner](t T)

Types

type Action added in v0.12.0

type Action int32
const (
	Action_NoAction Action = 0
	Action_Set      Action = 1
	Action_Reset    Action = 2
)

func (Action) Descriptor added in v0.12.0

func (Action) Descriptor() protoreflect.EnumDescriptor

func (Action) Enum added in v0.12.0

func (x Action) Enum() *Action

func (Action) EnumDescriptor deprecated added in v0.12.0

func (Action) EnumDescriptor() ([]byte, []int)

Deprecated: Use Action.Descriptor instead.

func (Action) Number added in v0.12.0

func (x Action) Number() protoreflect.EnumNumber

func (Action) String added in v0.12.0

func (x Action) String() string

func (Action) Type added in v0.12.0

func (Action) Type() protoreflect.EnumType

type ApplicationState added in v0.12.0

type ApplicationState int32
const (
	ApplicationState_NotRunning ApplicationState = 0
	ApplicationState_Pending    ApplicationState = 1
	ApplicationState_Running    ApplicationState = 2
	ApplicationState_Failed     ApplicationState = 3
)

func (ApplicationState) Descriptor added in v0.12.0

func (ApplicationState) Enum added in v0.12.0

func (ApplicationState) EnumDescriptor deprecated added in v0.12.0

func (ApplicationState) EnumDescriptor() ([]byte, []int)

Deprecated: Use ApplicationState.Descriptor instead.

func (ApplicationState) Number added in v0.12.0

func (ApplicationState) String added in v0.12.0

func (x ApplicationState) String() string

func (ApplicationState) Type added in v0.12.0

type BaseConfigServer added in v0.12.0

type BaseConfigServer[
	R ResetRequestType[T],
	HR HistoryResponseType[T],
	T InstallableConfigType[T],
] struct {
	// contains filtered or unexported fields
}

func NewBaseConfigServer added in v0.12.0

func NewBaseConfigServer[
	R ResetRequestType[T],
	HR HistoryResponseType[T],
	T InstallableConfigType[T],
](
	defaultStore, activeStore storage.ValueStoreT[T],
	loadDefaultsFunc DefaultLoaderFunc[T],
) *BaseConfigServer[R, HR, T]

Implements a subset of methods usually required by a driver which uses a DefaultingConfigTracker to manage its configuration. These implementations should not vary between drivers, so they are provided here as a convenience.

Usage example:

type Driver struct {
	foo.UnsafeFooServer

	// package foo;
	// message GetRequest {
	//   core.Revision revision = 1;
	// }
	*driverutil.BaseConfigServer[*foo.ResetRequest, *foo.HistoryResponse, T]
}

func NewDriver() *Driver {
	defaultStore := ...
	activeStore := ...
	return &Driver{
		BaseConfigServer: driverutil.NewBaseConfigServer[*foo.ResetRequest, *foo.HistoryResponse](defaultStore, activeStore, flagutil.LoadDefaults)
	}
}

func (*BaseConfigServer[R, HR, T]) ConfigurationHistory added in v0.12.0

func (s *BaseConfigServer[R, HR, T]) ConfigurationHistory(ctx context.Context, req *ConfigurationHistoryRequest) (HR, error)

func (*BaseConfigServer[R, HR, T]) GetConfiguration added in v0.12.0

func (s *BaseConfigServer[R, HR, T]) GetConfiguration(ctx context.Context, in *GetRequest) (T, error)

GetConfiguration implements ConfigurableServerInterface.

func (*BaseConfigServer[R, HR, T]) GetDefaultConfiguration added in v0.12.0

func (s *BaseConfigServer[R, HR, T]) GetDefaultConfiguration(ctx context.Context, in *GetRequest) (T, error)

GetDefaultConfiguration implements ConfigurableServerInterface.

func (*BaseConfigServer[R, HR, T]) Install added in v0.12.0

func (s *BaseConfigServer[R, HR, T]) Install(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)

Install implements ConfigurableServerInterface.

func (*BaseConfigServer[R, HR, T]) ResetConfiguration added in v0.12.0

func (s *BaseConfigServer[R, HR, T]) ResetConfiguration(ctx context.Context, in R) (*emptypb.Empty, error)

ResetConfiguration implements ConfigurableServerInterface.

func (*BaseConfigServer[R, HR, T]) ResetDefaultConfiguration added in v0.12.0

func (s *BaseConfigServer[R, HR, T]) ResetDefaultConfiguration(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)

ResetDefaultConfiguration implements ConfigurableServerInterface.

func (*BaseConfigServer[R, HR, T]) SetConfiguration added in v0.12.0

func (s *BaseConfigServer[R, HR, T]) SetConfiguration(ctx context.Context, t T) (*emptypb.Empty, error)

SetConfiguration implements ConfigurableServerInterface.

func (*BaseConfigServer[R, HR, T]) SetDefaultConfiguration added in v0.12.0

func (s *BaseConfigServer[R, HR, T]) SetDefaultConfiguration(ctx context.Context, t T) (*emptypb.Empty, error)

SetDefaultConfiguration implements ConfigurableServerInterface.

func (*BaseConfigServer[R, HR, T]) Tracker added in v0.12.0

func (s *BaseConfigServer[R, HR, T]) Tracker() *DefaultingConfigTracker[T]

func (*BaseConfigServer[R, HR, T]) Uninstall added in v0.12.0

func (s *BaseConfigServer[R, HR, T]) Uninstall(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)

Uninstall implements ConfigurableServerInterface.

type BasicClientInterface added in v0.12.0

type BasicClientInterface[
	T ConfigType[T],
	R ResetRequestType[T],
] interface {
	GetDefaultConfiguration(context.Context, *GetRequest, ...grpc.CallOption) (T, error)
	SetDefaultConfiguration(context.Context, T, ...grpc.CallOption) (*emptypb.Empty, error)
	ResetDefaultConfiguration(context.Context, *emptypb.Empty, ...grpc.CallOption) (*emptypb.Empty, error)
	GetConfiguration(context.Context, *GetRequest, ...grpc.CallOption) (T, error)
	SetConfiguration(context.Context, T, ...grpc.CallOption) (*emptypb.Empty, error)
	ResetConfiguration(context.Context, R, ...grpc.CallOption) (*emptypb.Empty, error)
}

type BasicServer added in v0.12.0

type BasicServer[
	T ConfigType[T],
] interface {
	GetDefaultConfiguration(context.Context, *GetRequest) (T, error)
	SetDefaultConfiguration(context.Context, T) (*emptypb.Empty, error)
	GetConfiguration(context.Context, *GetRequest) (T, error)
	SetConfiguration(context.Context, T) (*emptypb.Empty, error)
}

type Client added in v0.12.0

type ConfigServer added in v0.12.0

type ConfigServer[
	T ConfigType[T],
	R ResetRequestType[T],
	HR HistoryResponseType[T],
] interface {
	BasicServer[T]
	ResetServer[T, R]
	HistoryServer[T, HR]
}

type ConfigType added in v0.12.0

type ConfigType[T any] interface {
	proto.Message
	Revisioner
	SecretsRedactor[T]
}

func WithNoopSecretsRedactor added in v0.12.0

func WithNoopSecretsRedactor[U Revisioner, T any](partial U) ConfigType[T]

type ConfigurationHistoryRequest added in v0.12.0

type ConfigurationHistoryRequest struct {

	// The configuration type to return history for.
	Target Target `protobuf:"varint,1,opt,name=target,proto3,enum=driverutil.Target" json:"target,omitempty"`
	// The latest modification revision to include in the returned history.
	Revision *v1.Revision `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
	// If set, will include the values of the configuration in the response.
	// Otherwise, only the revision field of each entry will be populated.
	IncludeValues bool `protobuf:"varint,3,opt,name=includeValues,proto3" json:"includeValues,omitempty"`
	// contains filtered or unexported fields
}

History request options. See also: pkg/storage.HistoryOptions

func (*ConfigurationHistoryRequest) Descriptor deprecated added in v0.12.0

func (*ConfigurationHistoryRequest) Descriptor() ([]byte, []int)

Deprecated: Use ConfigurationHistoryRequest.ProtoReflect.Descriptor instead.

func (*ConfigurationHistoryRequest) FlagSet added in v0.12.0

func (in *ConfigurationHistoryRequest) FlagSet(prefix ...string) *pflag.FlagSet

func (*ConfigurationHistoryRequest) GetIncludeValues added in v0.12.0

func (x *ConfigurationHistoryRequest) GetIncludeValues() bool

func (*ConfigurationHistoryRequest) GetRevision added in v0.12.0

func (x *ConfigurationHistoryRequest) GetRevision() *v1.Revision

func (*ConfigurationHistoryRequest) GetTarget added in v0.12.0

func (x *ConfigurationHistoryRequest) GetTarget() Target

func (*ConfigurationHistoryRequest) ProtoMessage added in v0.12.0

func (*ConfigurationHistoryRequest) ProtoMessage()

func (*ConfigurationHistoryRequest) ProtoReflect added in v0.12.0

func (*ConfigurationHistoryRequest) Reset added in v0.12.0

func (x *ConfigurationHistoryRequest) Reset()

func (*ConfigurationHistoryRequest) String added in v0.12.0

func (x *ConfigurationHistoryRequest) String() string

type ConfigurationState added in v0.12.0

type ConfigurationState int32
const (
	ConfigurationState_NotConfigured ConfigurationState = 0
	ConfigurationState_Configured    ConfigurationState = 1
)

func (ConfigurationState) Descriptor added in v0.12.0

func (ConfigurationState) Enum added in v0.12.0

func (ConfigurationState) EnumDescriptor deprecated added in v0.12.0

func (ConfigurationState) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConfigurationState.Descriptor instead.

func (ConfigurationState) Number added in v0.12.0

func (ConfigurationState) String added in v0.12.0

func (x ConfigurationState) String() string

func (ConfigurationState) Type added in v0.12.0

type DefaultLoaderFunc added in v0.12.0

type DefaultLoaderFunc[T any] func(T)

type DefaultingConfigTracker added in v0.12.0

type DefaultingConfigTracker[T ConfigType[T]] struct {
	// contains filtered or unexported fields
}

func NewDefaultingConfigTracker added in v0.12.0

func NewDefaultingConfigTracker[T ConfigType[T]](
	defaultStore, activeStore storage.ValueStoreT[T],
	loadDefaultsFunc DefaultLoaderFunc[T],
) *DefaultingConfigTracker[T]

func (*DefaultingConfigTracker[T]) ApplyConfig added in v0.12.0

func (ct *DefaultingConfigTracker[T]) ApplyConfig(ctx context.Context, newConfig T) error

ApplyConfig sets the active config by merging the given config onto the existing active config, or onto the default config if no active config has been set.

func (*DefaultingConfigTracker[T]) DryRun added in v0.12.0

func (ct *DefaultingConfigTracker[T]) DryRun(ctx context.Context, req DryRunRequestType[T]) (*DryRunResults[T], error)

func (*DefaultingConfigTracker[T]) DryRunApplyConfig added in v0.12.0

func (ct *DefaultingConfigTracker[T]) DryRunApplyConfig(ctx context.Context, newConfig T) (DryRunResults[T], error)

func (*DefaultingConfigTracker[T]) DryRunResetConfig added in v0.12.0

func (ct *DefaultingConfigTracker[T]) DryRunResetConfig(ctx context.Context, mask *fieldmaskpb.FieldMask, patch T, atRevision ...*corev1.Revision) (DryRunResults[T], error)

func (*DefaultingConfigTracker[T]) DryRunResetDefaultConfig added in v0.12.0

func (ct *DefaultingConfigTracker[T]) DryRunResetDefaultConfig(ctx context.Context, atRevision ...*corev1.Revision) (DryRunResults[T], error)

func (*DefaultingConfigTracker[T]) DryRunSetDefaultConfig added in v0.12.0

func (ct *DefaultingConfigTracker[T]) DryRunSetDefaultConfig(ctx context.Context, newDefault T) (DryRunResults[T], error)

func (*DefaultingConfigTracker[T]) GetConfig added in v0.12.0

func (ct *DefaultingConfigTracker[T]) GetConfig(ctx context.Context, atRevision ...*corev1.Revision) (T, error)

Returns the active config if it has been set, otherwise returns a "not found" error. An optional revision can be provided to get the config at a specific revision.

func (*DefaultingConfigTracker[T]) GetConfigOrDefault added in v0.12.0

func (ct *DefaultingConfigTracker[T]) GetConfigOrDefault(ctx context.Context, atRevision ...*corev1.Revision) (T, error)

Returns the active config if it has been set, otherwise returns the default config. The optional revision only applies to the active config; if it does not exist, the default config will always be at the latest revision.

func (*DefaultingConfigTracker[T]) GetDefaultConfig added in v0.12.0

func (ct *DefaultingConfigTracker[T]) GetDefaultConfig(ctx context.Context, atRevision ...*corev1.Revision) (T, error)

Gets the default config if one has been set, otherwise returns a new default config as defined by the type.

func (*DefaultingConfigTracker[T]) History added in v0.12.0

func (ct *DefaultingConfigTracker[T]) History(ctx context.Context, target Target, opts ...storage.HistoryOpt) ([]storage.KeyRevision[T], error)

func (*DefaultingConfigTracker[T]) ResetConfig added in v0.12.0

func (ct *DefaultingConfigTracker[T]) ResetConfig(ctx context.Context, mask *fieldmaskpb.FieldMask, patch T, atRevision ...*corev1.Revision) error

Restores the active config to match the default config. An optional field mask can be provided to specify which fields to keep from the current config. If a nil mask is given, the active config (potentially including history) is deleted from the underlying store. If a non-nil mask is given, the active config is only modified (preserving history), not deleted.

func (*DefaultingConfigTracker[T]) ResetDefaultConfig added in v0.12.0

func (ct *DefaultingConfigTracker[T]) ResetDefaultConfig(ctx context.Context, atRevision ...*corev1.Revision) error

Deletes the default config, leaving it unset. Subsequent calls to GetDefaultConfig will return a new default config as defined by the type.

func (*DefaultingConfigTracker[T]) SetDefaultConfig added in v0.12.0

func (ct *DefaultingConfigTracker[T]) SetDefaultConfig(ctx context.Context, newDefault T) error

Sets the default config directly. No merging is performed.

type Driver added in v0.12.0

type Driver any

type DriverBuilder

type DriverBuilder[D Driver] func(ctx context.Context, opts ...Option) (D, error)

type DriverCache

type DriverCache[D Driver] interface {
	Register(name string, builder DriverBuilder[D])
	Unregister(name string)
	Get(name string) (DriverBuilder[D], bool)
	List() []string
}

func NewDriverCache

func NewDriverCache[D Driver]() DriverCache[D]

type DryRunClientInterface added in v0.12.0

type DryRunClientInterface[
	T ConfigType[T],
	D DryRunRequestType[T],
	DR DryRunResponseType[T],
] interface {
	DryRun(context.Context, D, ...grpc.CallOption) (DR, error)
}

type DryRunConfigServer added in v0.12.0

type DryRunConfigServer[
	T ConfigType[T],
	R ResetRequestType[T],
	HR HistoryResponseType[T],
	D DryRunRequestType[T],
	DR DryRunResponseType[T],
] interface {
	ConfigServer[T, R, HR]
	DryRunServer[T, D, DR]
}

type DryRunRequestType added in v0.12.0

type DryRunRequestType[
	T ConfigType[T],
] interface {
	proto.Message
	GetAction() Action
	GetTarget() Target
	GetSpec() T
	GetRevision() *corev1.Revision
	GetPatch() T
	GetMask() *fieldmaskpb.FieldMask
}

type DryRunResponseType added in v0.12.0

type DryRunResponseType[T ConfigType[T]] interface {
	proto.Message
	GetCurrent() T
	GetModified() T
	GetValidationErrors() []*ValidationError
}

type DryRunResults added in v0.12.0

type DryRunResults[T any] struct {
	Current  T
	Modified T
}

type DryRunServer added in v0.12.0

type DryRunServer[
	T ConfigType[T],
	D DryRunRequestType[T],
	DR DryRunResponseType[T],
] interface {
	DryRun(context.Context, D) (DR, error)
}

type GetRequest added in v0.12.0

type GetRequest struct {

	// If set, will return the config at the specified revision instead of
	// the current config.
	// This revision value can be obtained from the revision field of a
	// typed GetConfiguration/GetDefaultConfiguration response, or from one of
	// the history entries in a typed ConfigurationHistory response.
	Revision *v1.Revision `protobuf:"bytes,1,opt,name=revision,proto3" json:"revision,omitempty"`
	// contains filtered or unexported fields
}

Get request options. See also: pkg/storage.GetOptions

func (*GetRequest) Descriptor deprecated added in v0.12.0

func (*GetRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) FlagSet added in v0.12.0

func (in *GetRequest) FlagSet(prefix ...string) *pflag.FlagSet

func (*GetRequest) GetRevision added in v0.12.0

func (x *GetRequest) GetRevision() *v1.Revision

func (*GetRequest) ProtoMessage added in v0.12.0

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect added in v0.12.0

func (x *GetRequest) ProtoReflect() protoreflect.Message

func (*GetRequest) Reset added in v0.12.0

func (x *GetRequest) Reset()

func (*GetRequest) String added in v0.12.0

func (x *GetRequest) String() string

type HistoryClientInterface added in v0.12.0

type HistoryClientInterface[
	T ConfigType[T],
	HR HistoryResponseType[T],
] interface {
	ConfigurationHistory(context.Context, *ConfigurationHistoryRequest, ...grpc.CallOption) (HR, error)
}

type HistoryResponseType added in v0.12.0

type HistoryResponseType[T ConfigType[T]] interface {
	proto.Message
	GetEntries() []T
}

type HistoryServer added in v0.12.0

type HistoryServer[
	T ConfigType[T],
	HR HistoryResponseType[T],
] interface {
	ConfigurationHistory(context.Context, *ConfigurationHistoryRequest) (HR, error)
}

type InstallState added in v0.12.0

type InstallState int32
const (
	InstallState_NotInstalled InstallState = 0
	InstallState_Installed    InstallState = 1
	InstallState_Uninstalling InstallState = 2
)

func (InstallState) Descriptor added in v0.12.0

func (InstallState) Enum added in v0.12.0

func (x InstallState) Enum() *InstallState

func (InstallState) EnumDescriptor deprecated added in v0.12.0

func (InstallState) EnumDescriptor() ([]byte, []int)

Deprecated: Use InstallState.Descriptor instead.

func (InstallState) Number added in v0.12.0

func (InstallState) String added in v0.12.0

func (x InstallState) String() string

func (InstallState) Type added in v0.12.0

type InstallStatus added in v0.12.0

type InstallStatus struct {
	ConfigState  ConfigurationState `protobuf:"varint,1,opt,name=configState,proto3,enum=driverutil.ConfigurationState" json:"configState,omitempty"`
	InstallState InstallState       `protobuf:"varint,2,opt,name=installState,proto3,enum=driverutil.InstallState" json:"installState,omitempty"`
	AppState     ApplicationState   `protobuf:"varint,3,opt,name=appState,proto3,enum=driverutil.ApplicationState" json:"appState,omitempty"`
	Warnings     []string           `protobuf:"bytes,4,rep,name=warnings,proto3" json:"warnings,omitempty"`
	Version      string             `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
	Metadata     map[string]string  `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*InstallStatus) Descriptor deprecated added in v0.12.0

func (*InstallStatus) Descriptor() ([]byte, []int)

Deprecated: Use InstallStatus.ProtoReflect.Descriptor instead.

func (*InstallStatus) GetAppState added in v0.12.0

func (x *InstallStatus) GetAppState() ApplicationState

func (*InstallStatus) GetConfigState added in v0.12.0

func (x *InstallStatus) GetConfigState() ConfigurationState

func (*InstallStatus) GetInstallState added in v0.12.0

func (x *InstallStatus) GetInstallState() InstallState

func (*InstallStatus) GetMetadata added in v0.12.0

func (x *InstallStatus) GetMetadata() map[string]string

func (*InstallStatus) GetVersion added in v0.12.0

func (x *InstallStatus) GetVersion() string

func (*InstallStatus) GetWarnings added in v0.12.0

func (x *InstallStatus) GetWarnings() []string

func (*InstallStatus) ProtoMessage added in v0.12.0

func (*InstallStatus) ProtoMessage()

func (*InstallStatus) ProtoReflect added in v0.12.0

func (x *InstallStatus) ProtoReflect() protoreflect.Message

func (*InstallStatus) RenderText added in v0.12.0

func (s *InstallStatus) RenderText(out cli.Writer)

func (*InstallStatus) Reset added in v0.12.0

func (x *InstallStatus) Reset()

func (*InstallStatus) String added in v0.12.0

func (x *InstallStatus) String() string

type InstallableConfigType added in v0.12.0

type InstallableConfigType[T any] interface {
	ConfigType[T]
	GetEnabled() bool
}

type InstallerClient added in v0.12.0

type InstallerClient interface {
	Install(context.Context, *emptypb.Empty, ...grpc.CallOption) (*emptypb.Empty, error)
	Uninstall(context.Context, *emptypb.Empty, ...grpc.CallOption) (*emptypb.Empty, error)
	Status(context.Context, *emptypb.Empty, ...grpc.CallOption) (*InstallStatus, error)
}

type InstallerServer added in v0.12.0

type InstallerServer interface {
	Install(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	Uninstall(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	Status(context.Context, *emptypb.Empty) (*InstallStatus, error)
}

type ListType added in v0.12.0

type ListType[T any] interface {
	proto.Message
	GetItems() []T
}

type NoopSecretsRedactor added in v0.12.0

type NoopSecretsRedactor[T any] struct{}

func (NoopSecretsRedactor[T]) RedactSecrets added in v0.12.0

func (NoopSecretsRedactor[T]) RedactSecrets()

func (NoopSecretsRedactor[T]) UnredactSecrets added in v0.12.0

func (NoopSecretsRedactor[T]) UnredactSecrets(T) error

type Option

type Option interface {
	Apply(dest any) error
}

func NewOption

func NewOption[T any](key string, value T) Option

type PresetMetadata added in v0.12.0

type PresetMetadata struct {

	// A display name for the preset.
	DisplayName string `protobuf:"bytes,1,opt,name=displayName,proto3" json:"displayName,omitempty"`
	// Longer description of the preset.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Optional list of messages that should be displayed to the user when the
	// preset is used (determined at the client's discretion).
	// For example, this may contain additional information about requirements
	// or next steps that the user should be aware of.
	Notes []string `protobuf:"bytes,3,rep,name=notes,proto3" json:"notes,omitempty"`
	// contains filtered or unexported fields
}

func (*PresetMetadata) Descriptor deprecated added in v0.12.0

func (*PresetMetadata) Descriptor() ([]byte, []int)

Deprecated: Use PresetMetadata.ProtoReflect.Descriptor instead.

func (*PresetMetadata) GetDescription added in v0.12.0

func (x *PresetMetadata) GetDescription() string

func (*PresetMetadata) GetDisplayName added in v0.12.0

func (x *PresetMetadata) GetDisplayName() string

func (*PresetMetadata) GetNotes added in v0.12.0

func (x *PresetMetadata) GetNotes() []string

func (*PresetMetadata) ProtoMessage added in v0.12.0

func (*PresetMetadata) ProtoMessage()

func (*PresetMetadata) ProtoReflect added in v0.12.0

func (x *PresetMetadata) ProtoReflect() protoreflect.Message

func (*PresetMetadata) Reset added in v0.12.0

func (x *PresetMetadata) Reset()

func (*PresetMetadata) String added in v0.12.0

func (x *PresetMetadata) String() string

type PresetType added in v0.12.0

type PresetType[T any] interface {
	proto.Message
	GetId() *corev1.Reference
	GetMetadata() *PresetMetadata
	GetSpec() T
}

type ResetRequestType added in v0.12.0

type ResetRequestType[T ConfigType[T]] interface {
	proto.Message
	GetMask() *fieldmaskpb.FieldMask
	GetPatch() T
}

type ResetServer added in v0.12.0

type ResetServer[
	T ConfigType[T],
	R ResetRequestType[T],
] interface {
	ResetDefaultConfiguration(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	ResetConfiguration(context.Context, R) (*emptypb.Empty, error)
}

type Revisioner added in v0.12.0

type Revisioner interface {
	proto.Message
	GetRevision() *corev1.Revision
}

type SecretsRedactor added in v0.12.0

type SecretsRedactor[T any] interface {
	RedactSecrets()
	UnredactSecrets(T) error
}

type Target added in v0.12.0

type Target int32
const (
	Target_ActiveConfiguration  Target = 0
	Target_DefaultConfiguration Target = 1
)

func (Target) Descriptor added in v0.12.0

func (Target) Descriptor() protoreflect.EnumDescriptor

func (Target) Enum added in v0.12.0

func (x Target) Enum() *Target

func (Target) EnumDescriptor deprecated added in v0.12.0

func (Target) EnumDescriptor() ([]byte, []int)

Deprecated: Use Target.Descriptor instead.

func (Target) Number added in v0.12.0

func (x Target) Number() protoreflect.EnumNumber

func (Target) String added in v0.12.0

func (x Target) String() string

func (Target) Type added in v0.12.0

func (Target) Type() protoreflect.EnumType

type ValidationError added in v0.12.0

type ValidationError struct {
	Severity ValidationError_Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=driverutil.ValidationError_Severity" json:"severity,omitempty"`
	Message  string                   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Source   string                   `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidationError) Descriptor deprecated added in v0.12.0

func (*ValidationError) Descriptor() ([]byte, []int)

Deprecated: Use ValidationError.ProtoReflect.Descriptor instead.

func (*ValidationError) GetMessage added in v0.12.0

func (x *ValidationError) GetMessage() string

func (*ValidationError) GetSeverity added in v0.12.0

func (x *ValidationError) GetSeverity() ValidationError_Severity

func (*ValidationError) GetSource added in v0.12.0

func (x *ValidationError) GetSource() string

func (*ValidationError) ProtoMessage added in v0.12.0

func (*ValidationError) ProtoMessage()

func (*ValidationError) ProtoReflect added in v0.12.0

func (x *ValidationError) ProtoReflect() protoreflect.Message

func (*ValidationError) Reset added in v0.12.0

func (x *ValidationError) Reset()

func (*ValidationError) String added in v0.12.0

func (x *ValidationError) String() string

type ValidationError_Severity added in v0.12.0

type ValidationError_Severity int32
const (
	ValidationError_Unknown ValidationError_Severity = 0
	ValidationError_Warning ValidationError_Severity = 1
	ValidationError_Error   ValidationError_Severity = 2
)

func (ValidationError_Severity) Descriptor added in v0.12.0

func (ValidationError_Severity) Enum added in v0.12.0

func (ValidationError_Severity) EnumDescriptor deprecated added in v0.12.0

func (ValidationError_Severity) EnumDescriptor() ([]byte, []int)

Deprecated: Use ValidationError_Severity.Descriptor instead.

func (ValidationError_Severity) Number added in v0.12.0

func (ValidationError_Severity) String added in v0.12.0

func (x ValidationError_Severity) String() string

func (ValidationError_Severity) Type added in v0.12.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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