config

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Groups = map[string]*GroupConfig{}

Functions

func GetRegistryOptions

func GetRegistryOptions(ctx context.Context, typ StorageType) (*options.Options, error)

func Register

func Register(groupName string, addToScheme func(s *runtime.Scheme) error, befn BackendFn, applybefn ApplyStorageToBackendFn, resources []*ResourceConfig)

Types

type ApplyStorageToBackendFn

type ApplyStorageToBackendFn func(ctx context.Context, be bebackend.Backend, apiServer *builder.Server) error

type BackendFn

type BackendFn func() bebackend.Backend

type GroupConfig

type GroupConfig struct {
	AddToScheme             func(s *runtime.Scheme) error
	BackendFn               BackendFn
	ApplyStorageToBackendFn ApplyStorageToBackendFn
	Resources               []*ResourceConfig
}

type KuidConfig

type KuidConfig struct {
	Storage StorageType        `json:"Storage"`
	Groups  []*KuidGroupConfig `json:"groups"`
}

func GetKuidConfig

func GetKuidConfig() (*KuidConfig, error)

type KuidGroupConfig

type KuidGroupConfig struct {
	Group   string `json:"Group"`
	Enabled bool   `json:"Enabled"`
	Sync    bool   `json:"Mode"` // Sync or Async -> only possible with
}

type ResourceConfig

type ResourceConfig struct {
	StorageProviderFn StorageProviderFn
	Internal          resource.InternalObject
	ResourceVersions  []resource.Object
}

type StorageProviderFn

type StorageProviderFn func(ctx context.Context, obj resource.InternalObject, be bebackend.Backend, sync bool, options *options.Options) *rest.StorageProvider

type StorageType

type StorageType string
const (
	StorageType_Memory   StorageType = "memory"
	StorageType_File     StorageType = "file"
	StorageType_Git      StorageType = "git"
	StorageType_Badgerdb StorageType = "badgerdb"
	StorageType_Etcd     StorageType = "etcd"
)

Jump to

Keyboard shortcuts

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