Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRegoMiddleware ¶ added in v0.18.0
func CreateRegoMiddleware(regoFilePath string, logger *flog.Logrus) (func(next http.Handler) http.Handler, error)
CreateRegoMiddleware dynamically parses the rego file at the path specified in options and return a function that allows or denies the request based on the policy. Will return a nil function and an error if the given file path is blank or invalid.
func New ¶
New creates a new router and registers the handlers to it. Returns a handler object The struct definitions of the HTTP responses come from https://github.com/moby/moby/tree/master/api/types.
Types ¶
type Options ¶
type Options struct {
Config *config.Config
ContainerService container.Service
ImageService image.Service
NetworkService network.Service
SystemService system.Service
BuilderService builder.Service
VolumeService volume.Service
ExecService exec.Service
DistributionService distribution.Service
CredentialService *credential.CredentialService
RegoFilePath string
// NerdctlWrapper wraps the interactions with nerdctl to build
NerdctlWrapper *backend.NerdctlWrapper
}
Options defines the router options to be passed into the handlers.
Click to show internal directories.
Click to hide internal directories.