router

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegoOption

type RegoOption = func(r *rego.Rego)

type RegoRouter

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

func New

func New(name, module string, options ...RegoRouterOption) (_ *RegoRouter, err error)

func (*RegoRouter) Decision

func (rr *RegoRouter) Decision(req *http.Request, registry distribution.Namespace) (*Result, error)

type RegoRouterOption

type RegoRouterOption func(r *RegoRouter) error

func WithBodyLimit added in v0.0.21

func WithBodyLimit(limit int64) RegoRouterOption

func WithData

func WithData(dataReader io.Reader) RegoRouterOption

func WithOption

func WithOption(option RegoOption) RegoRouterOption

type Result

type Result struct {
	Repository  string
	RedirectURL string
	Found       bool
}

Jump to

Keyboard shortcuts

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