fabric: github.com/hyperledger/fabric/common/mocks/policies Index | Files

package policies

import "github.com/hyperledger/fabric/common/mocks/policies"

Index

Package Files

policies.go

type Manager Uses

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 Uses

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 Uses

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

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

type Policy Uses

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 Uses

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

Evaluate returns the Err set in Policy

Package policies imports 2 packages (graph) and is imported by 12 packages. Updated 2018-03-21. Refresh now. Tools for package owners.