acl: Associate policy ID
This commit is contained in:
parent
edcd69019c
commit
4caff50607
|
@ -58,6 +58,7 @@ func (c *Cache) getPolicy(id, rules string) (*Policy, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
policy.ID = id
|
||||
c.policyCache.Add(id, policy)
|
||||
return policy, nil
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ const (
|
|||
// Policy is used to represent the policy specified by
|
||||
// an ACL configuration.
|
||||
type Policy struct {
|
||||
ID string `hcl:"-"`
|
||||
Keys []*KeyPolicy `hcl:"key"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue