pmsimpl

package
v0.0.0-...-1643d90 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2020 License: UPL-1.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//The value <= 0 mean don't check the max number/size
	MaxServiceNum  = int64(-1) // Maximum number of service for a tenant
	MaxPolicyNum   = int64(-1) // Maximum number of Policy + RolePolicy per tenant
	MaxFunctionNum = int64(-1) //Maximum number of function defined by customer
	MaxPolicySize  = int64(-1) // Maximum size in bytes for a Policy or RolePolicy
)

Functions

func CheckFunction

func CheckFunction(function *pms.Function, policyStore pms.PolicyStoreManager) error

Check the following items:

  1. The maximum number of function;

func CheckPolicy

func CheckPolicy(serviceName string, policy *pms.Policy, policyStore pms.PolicyStoreManager) error

Check the following items:

  1. The maximum number of Policy + RolePolicy;
  2. The size of the Policy;
  3. If the effect field of policy is empty;

func CheckRolePolicy

func CheckRolePolicy(serviceName string, rolePolicy *pms.RolePolicy, policyStore pms.PolicyStoreManager) error

Check the following items:

  1. The maximum number of Policy + RolePolicy;
  2. The size of the RolePolicy;
  3. If the effect field of RolePolicy is empty;

func CheckService

func CheckService(service *pms.Service, policyStore pms.PolicyStoreManager) error

Check the following items:

  1. The maximum number of service;
  2. The maximum number of Policy + RolePolicy;
  3. The size of each Policy and RolePolicy;

Types

This section is empty.

Jump to

Keyboard shortcuts

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