package
0.0.0-20170102144606-65a562254f78
Repository: https://github.com/stffabi/go-plugins-helpers.git
Documentation: pkg.go.dev

# README

Docker authorization extension api.

Go handler to create external authorization extensions for Docker.

Usage

This library is designed to be integrated in your program.

  1. Implement the authorization.Plugin interface.
  2. Initialize a authorization.Handler with your implementation.
  3. Call either ServeTCP or ServeUnix from the authorization.Handler.

Example using TCP sockets:

  p := MyAuthZPlugin{}
  h := authorization.NewHandler(p)
  h.ServeTCP("test_plugin", ":8080")

Example using Unix sockets:

  p := MyAuthZPlugin{}
  h := authorization.NewHandler(p)
  h.ServeUnix("root", "test_plugin")

Full example plugins

License

MIT

# Functions

NewHandler initializes the request handler with a plugin implementation.

# Structs

Handler forwards requests and responses between the docker daemon and the plugin.

# Interfaces

Plugin represent the interface a plugin must fulfill.

# Type aliases

Request is the structure that docker's requests are deserialized to.
Response is the strucutre that the plugin's responses are serialized to.