attributes

package
v0.6.20 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAttributesFromContext

func GetAttributesFromContext(ctx context.Context) (map[string]any, bool)

func SetContextWithAttributes

func SetContextWithAttributes(ctx context.Context, requestAttributes map[string]any) context.Context

Types

type Attributes

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

func New

func New(
	log log.Logger,
	next http.Handler,
	identityProxyHeaderKey string,
	projectService ProjectService,
) *Attributes

func (Attributes) Info

func (*Attributes) ServeHTTP

func (a *Attributes) ServeHTTP(rw http.ResponseWriter, req *http.Request)

type Config

type Config struct {
	Attributes map[string]middleware.Attribute `yaml:"attributes" mapstructure:"attributes"`
}

type ProjectService

type ProjectService interface {
	Get(ctx context.Context, id string) (project.Project, error)
}

Jump to

Keyboard shortcuts

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