policy

package
v0.0.0-...-3266887 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 10 Imported by: 0

Documentation

Overview

Package policy implements the policy handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PolicyController

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

PolicyController create a policy handler used to handle request for policy resource.

func NewPolicyController

func NewPolicyController(store store.Factory) *PolicyController

NewPolicyController creates a policy handler.

func (*PolicyController) Create

func (p *PolicyController) Create(c *gin.Context)

Create creates a new ladon policy. It will convert the policy to string and store it in the storage.

func (*PolicyController) Delete

func (p *PolicyController) Delete(c *gin.Context)

Delete deletes the policy by the policy identifier.

func (*PolicyController) DeleteCollection

func (p *PolicyController) DeleteCollection(c *gin.Context)

DeleteCollection delete policies by policy names.

func (*PolicyController) Get

func (p *PolicyController) Get(c *gin.Context)

Get return policy by the policy identifier.

func (*PolicyController) List

func (p *PolicyController) List(c *gin.Context)

List return all policies.

func (*PolicyController) Update

func (p *PolicyController) Update(c *gin.Context)

Update updates policy by the policy identifier.

Jump to

Keyboard shortcuts

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