Documentation ¶
Overview ¶
Package policy implements the policy handlers.
Index ¶
- type PolicyController
- func (p *PolicyController) Create(c *gin.Context)
- func (p *PolicyController) Delete(c *gin.Context)
- func (p *PolicyController) DeleteCollection(c *gin.Context)
- func (p *PolicyController) Get(c *gin.Context)
- func (p *PolicyController) List(c *gin.Context)
- func (p *PolicyController) Update(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyController ¶ added in v1.0.5
type PolicyController struct {
// contains filtered or unexported fields
}
PolicyController create a policy handler used to handle request for policy resource.
func NewPolicyController ¶ added in v1.0.5
func NewPolicyController(store store.Factory) *PolicyController
NewPolicyController creates a policy handler.
func (*PolicyController) Create ¶ added in v1.0.5
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 ¶ added in v1.0.5
func (p *PolicyController) Delete(c *gin.Context)
Delete deletes the policy by the policy identifier.
func (*PolicyController) DeleteCollection ¶ added in v1.0.5
func (p *PolicyController) DeleteCollection(c *gin.Context)
DeleteCollection delete policies by policy names.
func (*PolicyController) Get ¶ added in v1.0.5
func (p *PolicyController) Get(c *gin.Context)
Get return policy by the policy identifier.
func (*PolicyController) List ¶ added in v1.0.5
func (p *PolicyController) List(c *gin.Context)
List return all policies.
func (*PolicyController) Update ¶ added in v1.0.5
func (p *PolicyController) Update(c *gin.Context)
Update updates policy by the policy identifier.
Click to show internal directories.
Click to hide internal directories.