core

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InputReaders []InputReader
View Source
var Marshallers []Marshaller
View Source
var OutputWriters []OutputWriter
View Source
var Unmarshallers []Unmarshaller

Functions

func Create

func Create(config Config) error

func NewStarterTemplate added in v0.7.0

func NewStarterTemplate(config Config, templateType types.StarterTemplateType) (*types.SecretTemplate, error)

func PostResolveData

func PostResolveData[T []byte | string](data map[string]interface{}, mapper func(interface{}) (T, error)) (map[string]T, error)

func PostResolveTls

func PostResolveTls(resolvedTls *types.ResolvedTls) (*types.PostResolvedTls, error)

func PreResolveData

func PreResolveData(data interface{}) (interface{}, error)

func PreResolveTls

func PreResolveTls(tls *types.Tls) (types.PreResolvedTls, error)

func ShowTemplate

func ShowTemplate(config Config) error

func StarterTemplate added in v0.7.0

func StarterTemplate(config Config, templateType types.StarterTemplateType) error

Types

type Config

type Config struct {
	InputFiles    []string
	InputReader   io.Reader // will be used if InputFiles contains "-"
	OutputFormats []types.Format
	InputFormat   types.Format // best effort determination of the input format, if there are multiple inputs with different formats then one of them is selected randomly

	// extra configuration for specific providers/outputs/...
	Extra map[string]interface{}
}

func NewConfig

func NewConfig() *Config

type InputReader

type InputReader interface {
	Read(inputFile string, config Config) (bool, []byte, error)
}

type Marshaller

type Marshaller interface {
	Marshal(config Config, secrets []interface{}) (bool, []byte, error)
}

type OutputWriter

type OutputWriter interface {
	Write([]byte) (bool, error)
}

type Unmarshaller

type Unmarshaller interface {
	Unmarshal([]byte) ([]types.SecretTemplate, types.Format, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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