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.
Click to show internal directories.
Click to hide internal directories.