env

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ID              = "env"
	EnableByDefault = false
)
View Source
const (
	EnvPropertiesPrefix = "management.endpoint.env"
)

Variables

View Source
var (
	DefaultKeysToSanitize = utils.NewStringSet(
		`.*password.*`, `.*secret.*`,
		`key`, `.*credentials.*`,
		`vcap_services`, `sun.java.command`,
	)
)
View Source
var Module = &bootstrap.Module{
	Name:       "actuator-env",
	Precedence: actuator.MinActuatorPrecedence,
	Options: []fx.Option{
		fx.Provide(BindEnvProperties),
		fx.Invoke(register),
	},
}

Functions

func Register

func Register()

Types

type EnvDescriptor

type EnvDescriptor struct {
	ActiveProfiles  []string            `json:"activeProfiles,omitempty"`
	PropertySources []PSourceDescriptor `json:"propertySources,omitempty"`
}

type EnvEndpoint

type EnvEndpoint struct {
	actuator.WebEndpointBase
	// contains filtered or unexported fields
}

EnvEndpoint implements actuator.Endpoint, actuator.WebEndpoint

func (*EnvEndpoint) Read

func (ep *EnvEndpoint) Read(ctx context.Context, input *Input) (*EnvDescriptor, error)

Read never returns error

type EnvProperties

type EnvProperties struct {
	// KeysToSanitize holds list of regular expressions
	KeysToSanitize utils.StringSet `json:"keys-to-sanitize"`
}

func BindEnvProperties

func BindEnvProperties(ctx *bootstrap.ApplicationContext) EnvProperties

BindHealthProperties create and bind SessionProperties, with a optional prefix

func NewEnvProperties

func NewEnvProperties() *EnvProperties

NewSessionProperties create a SessionProperties with default values

type Input

type Input struct {
	Pattern string `form:"match"`
}

type PSourceDescriptor

type PSourceDescriptor struct {
	Name       string                      `json:"name"`
	Properties map[string]PValueDescriptor `json:"properties,omitempty"`
	// contains filtered or unexported fields
}

type PValueDescriptor

type PValueDescriptor struct {
	Value  interface{} `json:"value,omitempty"`
	Origin string      `json:"origin,omitempty"`
}

type Sanitizer

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

func NewSanitizer

func NewSanitizer(keyPatterns []string) *Sanitizer

func (Sanitizer) Sanitize

func (s Sanitizer) Sanitize(ctx context.Context, key string, value interface{}) interface{}

Jump to

Keyboard shortcuts

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