policies

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// Policy is returned as the output to GetPolicy if a Policy
	// for id is not in PolicyMap
	Policy *Policy

	// PolicyMap is returned is used to look up Policies in
	PolicyMap map[string]policies.Policy

	// SubManagers is used for the return value of Manager
	SubManagersMap map[string]*Manager
}

Manager is a mock implementation of the policies.Manager interface

func (*Manager) GetPolicy

func (m *Manager) GetPolicy(id string) (policies.Policy, bool)

GetPolicy returns the value of Manager.Policy and whether it was nil or not

func (*Manager) Manager

func (m *Manager) Manager(path []string) (policies.Manager, bool)

Manager returns the Manager from SubManagers for the last component of the path

type Policy

type Policy struct {
	// Err is the error returned by Evaluate
	Err error
}

Policy is a mock implementation of the policies.Policy interface

func (*Policy) Evaluate

func (p *Policy) Evaluate(signatureSet []*cb.SignedData) error

Evaluate returns the Err set in Policy

Jump to

Keyboard shortcuts

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