resource

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFileValue

func ParseFileValue(value string) (string, string)

ParseFileValue will parse a file resource/config option to return the local path and the destination path expected.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config represents a config option.

func ParseConfig

func ParseConfig(item string) (*Config, error)

ParseConfig will parse a config and return a Config.

func ParseResource

func ParseResource(item string) (*Config, error)

ParseResource will parse a resource and return a Config.

func (*Config) ContentType

func (config *Config) ContentType() ContentType

ContentType is the type of content used for the configuration.

func (*Config) DestinationPath

func (config *Config) DestinationPath() string

DestinationPath is the location where the resource will be stored on destination.

func (*Config) Key

func (config *Config) Key() string

Key is the key specified for the resource.

func (*Config) Name

func (config *Config) Name() string

Name is the name of the resource.

func (*Config) StorageType

func (config *Config) StorageType() StorageType

StorageType is the type of storage used for the configuration.

func (*Config) String

func (config *Config) String() string

String represents the unparsed value of the resource.

type ContentType

type ContentType string

ContentType represent what kind of a content is, either data or purely text configuration.

const (
	// ContentTypeData can contain binary content, won't be parsed to look for user properties.
	ContentTypeData ContentType = "data"
	// ContentTypeText can't contain binary content, will be parsed to look for user properties.
	ContentTypeText ContentType = "text"
)

type StorageType

type StorageType string

StorageType represent a resource/config type such as configmap, secret or local file.

const (
	// StorageTypeConfigmap --.
	StorageTypeConfigmap StorageType = "configmap"
	// StorageTypeSecret --.
	StorageTypeSecret StorageType = "secret"
	// StorageTypePVC --.
	StorageTypePVC StorageType = "pvc"
	// StorageTypeEmptyDir --.
	StorageTypeEmptyDir StorageType = "emptyDir"
)

Jump to

Keyboard shortcuts

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