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 ¶
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.
Click to show internal directories.
Click to hide internal directories.