resourceconfig

package
v0.0.0-...-d3ccc4f Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package resourceconfig contains the resource config related helper functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeAPIResourceConfigs

func MergeAPIResourceConfigs(
	defaultAPIResourceConfig *serverstore.ResourceConfig,
	resourceConfigOverrides utilflag.ConfigurationMap,
	registry GroupVersionRegistry,
) (*serverstore.ResourceConfig, error)

MergeAPIResourceConfigs merges the given defaultAPIResourceConfig with the given resourceConfigOverrides. Exclude the groups not registered in registry, and check if version is not registered in group, then it will fail.

func MergeGroupEncodingConfigs

func MergeGroupEncodingConfigs(
	defaultResourceEncoding *serverstore.DefaultResourceEncodingConfig,
	storageEncodingOverrides map[string]schema.GroupVersion,
) *serverstore.DefaultResourceEncodingConfig

MergeGroupEncodingConfigs merges the given defaultResourceConfig with specific GroupVersion overrides.

func MergeResourceEncodingConfigs

func MergeResourceEncodingConfigs(
	defaultResourceEncoding *serverstore.DefaultResourceEncodingConfig,
	resourceEncodingOverrides []schema.GroupVersionResource,
) *serverstore.DefaultResourceEncodingConfig

MergeResourceEncodingConfigs merges the given defaultResourceConfig with specific GroupVersionResource overrides.

func ParseGroups

func ParseGroups(resourceConfig utilflag.ConfigurationMap) ([]string, error)

ParseGroups takes in resourceConfig and returns parsed groups.

Types

type GroupVersionRegistry

type GroupVersionRegistry interface {
	// IsGroupRegistered returns true if given group is registered.
	IsGroupRegistered(group string) bool
	// IsVersionRegistered returns true if given version is registered.
	IsVersionRegistered(v schema.GroupVersion) bool
	// PrioritizedVersionsAllGroups returns all registered group versions.
	PrioritizedVersionsAllGroups() []schema.GroupVersion
}

GroupVersionRegistry provides access to registered group versions.

Jump to

Keyboard shortcuts

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