proxy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodContextKey ContextKey = "method"
	MaxLimit         uint64     = math.MaxInt64
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextKey

type ContextKey string

type Repository

type Repository interface {
	UpdateAttestationPolicy(ctx context.Context, policy []byte) error
	GetAttestationPolicy(ctx context.Context) ([]byte, error)
	CreateRoute(ctx context.Context, route *router.RouteRule) (*router.RouteRule, error)
	UpdateRoute(ctx context.Context, name string, route *router.RouteRule) (*router.RouteRule, error)
	DeleteRoute(ctx context.Context, name string) error
	GetRoute(ctx context.Context, name string) (*router.RouteRule, error)
	ListRoutes(ctx context.Context, offset, limit uint64) (routes []router.RouteRule, total uint64, err error)
}

type Service

type Service interface {
	ProxyRequest(ctx context.Context, session *authn.Session, path string) error
	Secure() string
	UpdateAttestationPolicy(ctx context.Context, session *authn.Session, policy []byte) error
	GetAttestationPolicy(ctx context.Context, session *authn.Session) ([]byte, error)
	CreateRoute(ctx context.Context, session *authn.Session, route *router.RouteRule) (*router.RouteRule, error)
	UpdateRoute(ctx context.Context, session *authn.Session, name string,
		route *router.RouteRule) (*router.RouteRule, error)
	DeleteRoute(ctx context.Context, session *authn.Session, name string) error
	GetRoute(ctx context.Context, session *authn.Session, name string) (*router.RouteRule, error)
	ListRoutes(ctx context.Context, session *authn.Session, offset,
		limit uint64) (routes []router.RouteRule, total uint64, err error)
}

func New

func New(config *clients.AttestedClientConfig, repo Repository) (Service, error)

func NewWithRouter

func NewWithRouter(config *clients.AttestedClientConfig, repo Repository, rter *router.Router) (Service, error)

NewWithRouter creates a new service with a router for dynamic route management.

Directories

Path Synopsis
Package api provides HTTP transport layer for the proxy service.
Package api provides HTTP transport layer for the proxy service.

Jump to

Keyboard shortcuts

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