README
¶
REPOSITORY MOVED TO https://github.com/docker/go-plugins-helpers/tree/master/authz
Credits
Inspired by David's awesome dkvolume and adapted for the authZ api.
Docker authz extension api.
Go handler to create external authz extensions for Docker.
Usage
This library is designed to be integrated in your program.
- Implement the
dkauthz.Plugin
interface. - Initialize a
dkauthz.Handler
with your implementation. - Call either
ServeTCP
orServeUnix
from thedkauthz.Handler
.
Example using TCP sockets:
p := MyAuthZPlugin{}
h := dkauthz.NewHandler(p)
h.ServeTCP("test_plugin", ":8080")
Example using Unix sockets:
p := MyAuthZPlugin{}
h := dkauthz.NewHandler(p)
h.ServeUnix("root", "test_plugin")
Full example plugins
License
MIT
Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler forwards requests and responses between the docker daemon and the plugin.
func NewHandler ¶
NewHandler initializes the request handler with a plugin implementation.
type Request ¶
type Request authorization.Request
type Response ¶
type Response authorization.Response
Click to show internal directories.
Click to hide internal directories.