rscc

package
v1.1.0-preview Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: Apache-2.0 Imports: 15 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

View Source
const (
	//CHANNEL name
	CHANNEL = "channel"

	//POLICY for the channel
	POLICY = "policy"

	//NOCHANNEL channel not found
	NOCHANNEL = "nochannel"

	//NOPOLICY policy not found for channel
	NOPOLICY = "nopolicy"

	//BADPOLICY bad policy
	BADPOLICY = "badpolicy"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidIdInfo

type InvalidIdInfo string

InvalidIdInfo

func (InvalidIdInfo) Error

func (e InvalidIdInfo) Error() string

type NoPolicyProviderInCache

type NoPolicyProviderInCache string

NoPolicyProviderInCache in cache for channel

func (NoPolicyProviderInCache) Error

func (e NoPolicyProviderInCache) Error() string

type PolicyNotFound

type PolicyNotFound string

PolicyNotFound cache for resource

func (PolicyNotFound) Error

func (e PolicyNotFound) Error() string

type PolicyProviderNotFound

type PolicyProviderNotFound string

PolicyProviderNotFound for channel

func (PolicyProviderNotFound) Error

func (e PolicyProviderNotFound) Error() string

type Rscc

type Rscc struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Rscc SCC implementing resouce->Policy mapping for the fabric

func NewRscc

func NewRscc() *Rscc

NewRscc get an initialzed new Rscc

func (*Rscc) CheckACL

func (rscc *Rscc) CheckACL(resName string, channelID string, idinfo interface{}) error

CheckACL rscc implements AClProvider's CheckACL interface. This is the key interface

. CheckACL works off the cache
. CheckACL uses two providers - the RSCC provider from channel config and default provider
  that implements 1.0 functions
. If a resource in RSCC Provider it'll use the policy defined there. Otherwise it'll defer
  to default provider

func (*Rscc) GenerateSimulationResults

func (rscc *Rscc) GenerateSimulationResults(txEnv *common.Envelope, sim ledger.TxSimulator) error

GenerateSimulationResults called to add config state. Currently only handles "join" requests. Note that this is just a ledger hook and does not modify RSCC data structures

func (*Rscc) Init

func (rscc *Rscc) Init(stub shim.ChaincodeStubInterface) pb.Response

Init RSCC - Init is just used to initialize policy assuming it is found in the channel ledger. Don't return error and get out. For example, we might still serve Invokes to set policy

func (*Rscc) Invoke

func (rscc *Rscc) Invoke(stub shim.ChaincodeStubInterface) pb.Response

Invoke - update policies

Source Files

  • rscc.go
  • rsccpolicy.go

Jump to

Keyboard shortcuts

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