policy

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPManager

type HTTPManager struct {
	Endpoint *url.URL
	Dry      bool
	Client   *http.Client
}

func (*HTTPManager) Create

func (m *HTTPManager) Create(policy ladon.Policy) error

Create persists the policy.

func (*HTTPManager) Delete

func (m *HTTPManager) Delete(id string) error

Delete removes a policy.

func (*HTTPManager) FindPoliciesForSubject

func (m *HTTPManager) FindPoliciesForSubject(subject string) (ladon.Policies, error)

Finds all policies associated with the subject.

func (*HTTPManager) Get

func (m *HTTPManager) Get(id string) (ladon.Policy, error)

Get retrieves a policy.

type Handler

type Handler struct {
	Manager ladon.Manager
	H       herodot.Herodot
	W       firewall.Firewall
}

func (*Handler) Create

func (h *Handler) Create(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

func (*Handler) Delete

func (h *Handler) Delete(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*Handler) Find

func (*Handler) Get

func (*Handler) SetRoutes

func (h *Handler) SetRoutes(r *httprouter.Router)

Jump to

Keyboard shortcuts

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