resource

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

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 ParseVolume

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

ParseVolume will parse a volume 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"
)

Jump to

Keyboard shortcuts

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