transformations

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv added in v1.4.3

func GetEnv(input string) (string, error)

GetEnv gets the environment variable

func URLHost

func URLHost(input string) (string, error)

URLHost extracts host from the URL or returns "" if it's not set

func URLPassword

func URLPassword(input string) (string, error)

URLPassword extracts password from the URL or returns "" if it's not set

func URLPath

func URLPath(input string) (string, error)

URLPath extracts path from the URL or returns "" if it's not set

func URLScheme

func URLScheme(input string) (string, error)

URLScheme extracts password from the URL or returns "" if it's not set

func URLUser

func URLUser(input string) (string, error)

URLUser extracts user from the URL or returns "" if it's not set

Types

type DeleteTransformation

type DeleteTransformation struct {
	Action string
	Rule   []string
}

DeleteTransformation takes an input map and removes the specified keys

func (*DeleteTransformation) Transform

func (t *DeleteTransformation) Transform(source map[string]string) (map[string]string, error)

type RenameTransformation

type RenameTransformation struct {
	Action string
	Rule   map[string]string
}

RenameTransformation renames the keys in the input map

func (*RenameTransformation) Transform

func (t *RenameTransformation) Transform(source map[string]string) (map[string]string, error)

type TemplateTransformation

type TemplateTransformation struct {
	Action string
	Rule   map[string]string
}

TemlateTransformation renames the keys in the input map

func (*TemplateTransformation) Transform

func (t *TemplateTransformation) Transform(source map[string]string) (map[string]string, error)

type Transformation

type Transformation interface {
	Transform(map[string]string) (map[string]string, error)
}

Jump to

Keyboard shortcuts

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