Documentation ¶
Index ¶
- Constants
- type MongoStoreBuilder
- type Store
- func (s *Store) CreateFunction(function *pms.Function) (*pms.Function, error)
- func (s *Store) CreatePolicy(serviceName string, policy *pms.Policy) (*pms.Policy, error)
- func (s *Store) CreateRolePolicy(serviceName string, rolePolicy *pms.RolePolicy) (*pms.RolePolicy, error)
- func (s *Store) CreateService(service *pms.Service) error
- func (s *Store) DeleteFunction(funcName string) error
- func (s *Store) DeleteFunctions() error
- func (s *Store) DeletePolicies(serviceName string) error
- func (s *Store) DeletePolicy(serviceName string, id string) error
- func (s *Store) DeleteRolePolicies(serviceName string) error
- func (s *Store) DeleteRolePolicy(serviceName string, id string) error
- func (s *Store) DeleteService(serviceName string) error
- func (s *Store) DeleteServices() error
- func (s *Store) GetFunction(funcName string) (*pms.Function, error)
- func (s *Store) GetFunctionCount() (int64, error)
- func (s *Store) GetPolicy(serviceName string, id string) (*pms.Policy, error)
- func (s *Store) GetPolicyAndRolePolicyCounts() (map[string]*pms.PolicyAndRolePolicyCount, error)
- func (s *Store) GetPolicyCount(serviceName string) (int64, error)
- func (s *Store) GetRolePolicy(serviceName string, id string) (*pms.RolePolicy, error)
- func (s *Store) GetRolePolicyCount(serviceName string) (int64, error)
- func (s *Store) GetService(serviceName string) (*pms.Service, error)
- func (s *Store) GetServiceCount() (int64, error)
- func (s *Store) GetServiceNames() ([]string, error)
- func (s *Store) ListAllFunctions(filter string) ([]*pms.Function, error)
- func (s *Store) ListAllPolicies(serviceName string, filter string) ([]*pms.Policy, error)
- func (s *Store) ListAllRolePolicies(serviceName string, filter string) ([]*pms.RolePolicy, error)
- func (s *Store) ListAllServices() ([]*pms.Service, error)
- func (s *Store) ReadPolicyStore() (*pms.PolicyStore, error)
- func (s *Store) StopWatch()
- func (s *Store) Type() string
- func (s *Store) Watch() (pms.StorageChangeChannel, error)
- func (s *Store) WritePolicyStore(ps *pms.PolicyStore) error
Constants ¶
View Source
const ( StoreType = "mongodb" //Following are keys of mongodb store properties MongoURIKey = "MongoURI" MongoDatabaseNameKey = "MongoDatabase" MongoURIFlag = "mongostore_uri" MongoDatabaseNameFlag = "mongostore_database" //default property values DefaultURI = "mongodb://localhost:27017" DefaultDatabaseName = "speedleplus" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoStoreBuilder ¶
type MongoStoreBuilder struct{}
func (MongoStoreBuilder) GetStoreParams ¶
func (msb MongoStoreBuilder) GetStoreParams() map[string]string
func (MongoStoreBuilder) NewStore ¶
func (msb MongoStoreBuilder) NewStore(config map[string]interface{}) (pms.PolicyStoreManager, error)
type Store ¶
type Store struct { Database string // contains filtered or unexported fields }
func (*Store) CreateFunction ¶
func (*Store) CreatePolicy ¶
func (*Store) CreateRolePolicy ¶
func (s *Store) CreateRolePolicy(serviceName string, rolePolicy *pms.RolePolicy) (*pms.RolePolicy, error)
func (*Store) CreateService ¶
CreateService creates a new service
func (*Store) DeleteFunction ¶
func (*Store) DeleteFunctions ¶
func (*Store) DeletePolicies ¶
func (*Store) DeleteRolePolicies ¶
func (*Store) DeleteRolePolicy ¶
func (*Store) DeleteService ¶
DeleteService deletes a service named ${serviceName} from a file
func (*Store) DeleteServices ¶
DeleteServices deletes all services from a file
func (*Store) GetFunctionCount ¶
func (*Store) GetPolicyAndRolePolicyCounts ¶
func (s *Store) GetPolicyAndRolePolicyCounts() (map[string]*pms.PolicyAndRolePolicyCount, error)
GetPolicyAndRolePolicyCounts returns a map, in which the key is the service name, and the value is the count of both policies and role policies in the service.
func (*Store) GetRolePolicy ¶
func (*Store) GetRolePolicyCount ¶
func (*Store) GetService ¶
GetService gets the detailed info of a service
func (*Store) GetServiceCount ¶
GetServiceCount gets the service count
func (*Store) GetServiceNames ¶
GetServiceNames reads all the service names
func (*Store) ListAllFunctions ¶
func (*Store) ListAllPolicies ¶
For policy manager
func (*Store) ListAllRolePolicies ¶
For role policy manager
func (*Store) ListAllServices ¶
ListAllServices lists all the services
func (*Store) ReadPolicyStore ¶
func (s *Store) ReadPolicyStore() (*pms.PolicyStore, error)
ReadPolicyStore reads policy store from a file
func (*Store) WritePolicyStore ¶
func (s *Store) WritePolicyStore(ps *pms.PolicyStore) error
WritePolicyStore writes policies to a file
Click to show internal directories.
Click to hide internal directories.