option

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package option provides a set of options for the providers.

Package option provides a set of options for the providers.

Index

Constants

View Source
const (
	// Camel is the camel case.
	Camel = "camel"

	// Kebab is the kebab case.
	Kebab = "kebab"

	// Lower is the lower case.
	Lower = "lower"

	// Snake is the snake case.
	Snake = "snake"

	// Upper is the upper case.
	Upper = "upper"
)

Variables

View Source
var AllowedCases = []string{Camel, Kebab, Lower, Snake, Upper}

AllowedCases is the list of allowed cases.

Functions

This section is empty.

Types

type LoadKeyFunc added in v1.2.0

type LoadKeyFunc func(key string) string

LoadKeyFunc allows to specify loading options.

func WithKeyCaser

func WithKeyCaser(caseType string) LoadKeyFunc

WithKeyCaser changes the case of the key using the `strcase` package.

SEE: github.com/iancoleman/strcase.

func WithKeyPrefixer

func WithKeyPrefixer(prefix string) LoadKeyFunc

WithKeyPrefixer adds a prefix to the key.

func WithKeyReplacer

func WithKeyReplacer(replacer LoadKeyFunc) LoadKeyFunc

WithKeyReplacer dynamically replaces the key.

func WithKeySuffixer added in v1.2.7

func WithKeySuffixer(suffix string) LoadKeyFunc

WithKeySuffixer adds a suffix to the key.

type Write added in v1.2.0

type Write struct {
	// Environment is the environment to be used.
	Environment string

	// HTTPVerb is the HTTP verb to be used.
	HTTPVerb string

	// Target to write configuration.
	Target string

	// Variable indicates it's a variable instead of secret.
	Variable bool
}

Write definition.

type WriteFunc added in v1.2.0

type WriteFunc func(o *Write) error

WriteFunc allows to specify loading options.

func WithEnvironment added in v1.2.0

func WithEnvironment(environment string) WriteFunc

WithEnvironment specifies the environment to be used.

func WithHTTPVerb added in v1.2.16

func WithHTTPVerb(httpVerb string) WriteFunc

WithHTTPVerb specifies the HTTP verb to be used.

func WithTarget added in v1.2.15

func WithTarget(target string) WriteFunc

func WithVariable added in v1.2.3

func WithVariable(variable bool) WriteFunc

WithVariable specifies that it's a variable instead of secret to be used.

Jump to

Keyboard shortcuts

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