generated from TrueCloudLab/basic
76372aac04
* Introduce GetOverride, RemoveOverride, ListOverrides * Implement them in inmemory struct Signed-off-by: aarifullin <aarifullin@yadro.com>
18 lines
772 B
Go
18 lines
772 B
Go
package policyengine
|
|
|
|
// CachedChainStorage ...
|
|
type CachedChainStorage interface {
|
|
Engine
|
|
// Adds a policy chain used for all operations with a specific resource.
|
|
AddResourceChain(name Name, resource string, c *Chain)
|
|
// Adds a policy chain used for all operations in the namespace.
|
|
AddNameSpaceChain(name Name, namespace string, c *Chain)
|
|
// Adds a local policy chain used for all operations with this service.
|
|
AddOverride(name Name, c *Chain)
|
|
// Gets the local override with given chain id.
|
|
GetOverride(name Name, chainID ChainID) (chain *Chain, found bool)
|
|
// Remove the local override with given chain id.
|
|
RemoveOverride(name Name, chainID ChainID) (removed bool)
|
|
// ListOverrides returns the list of local overrides.
|
|
ListOverrides(name Name) []*Chain
|
|
}
|