registrar

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Method_Registrar      = "REGISTRAR.PUBLICKEY"
	Method_AdminRegistrar = "REGISTRAR.PUBLICKEYDIRECT"
	Method_Revoke         = "REGISTRAR.REVOKEPK"
	Method_Active         = "REGISTRAR.ENABLEPK"
	Method_Init           = "REGISTRAR.INIT"
)

Variables

This section is empty.

Functions

func ActivePkHandler

func ActivePkHandler(cfg RegistrarConfig) activePkHandler

func AdminRegistrarHandler

func AdminRegistrarHandler(cfg RegistrarConfig) adminRegistrarHandler

func GeneralInvokingTemplate

func GeneralInvokingTemplate(ccname string, cfg RegistrarConfig) (ret tx.CollectiveTxs)

func InitHandler

func InitHandler(cfg RegistrarConfig) initHandler

func QueryPkHandler

func QueryPkHandler(cfg RegistrarConfig) queryPkHandler

func RegistrarHandler

func RegistrarHandler(cfg RegistrarConfig) registrarHandler

func RegistrarPreHandler

func RegistrarPreHandler(cfg RegistrarConfig) *regPreHandler

func RevokePkHandler

func RevokePkHandler(cfg RegistrarConfig) revokePkHandler

Types

type GeneralCall

type GeneralCall struct {
	txgen.TxCaller
}

func (*GeneralCall) ActivePk

func (i *GeneralCall) ActivePk(key []byte) error

func (*GeneralCall) AdminRegistrar

func (i *GeneralCall) AdminRegistrar(pkbytes []byte) error

func (*GeneralCall) Global

func (i *GeneralCall) Global() (error, *pb.RegGlobalData)

don't need to call global methods in rpc

func (*GeneralCall) Init

func (i *GeneralCall) Init(enablePrivilege bool, managePriv string, regPriv string) error

func (*GeneralCall) InitDebugMode

func (i *GeneralCall) InitDebugMode() error

func (*GeneralCall) Pubkey

func (i *GeneralCall) Pubkey(key []byte) (error, *pb.RegData)

func (*GeneralCall) Registrar

func (i *GeneralCall) Registrar(pkbytes []byte, region string) error

func (*GeneralCall) RevokePk

func (i *GeneralCall) RevokePk(pk crypto.Verifier) error

type RegistrarConfig

type RegistrarConfig interface {
	NewTx(shim.ChaincodeStubInterface) RegistrarTxExt
}

type RegistrarTx

type RegistrarTx interface {
	Init(enablePrivilege bool, managePriv string, regPriv string) error
	AdminRegistrar(pkbyte []byte) error
	Registrar(pkbyte []byte, region string) error
	ActivePk(key []byte) error
	RevokePk(pk crypto.Verifier) error
	Pubkey(key []byte) (error, *pb.RegData)
	Global() (error, *pb.RegGlobalData)
}

type RegistrarTxExt

type RegistrarTxExt interface {
	RegistrarTx
	// contains filtered or unexported methods
}

type StandardRegistrarConfig

type StandardRegistrarConfig struct {
	Tag                string
	Readonly           bool
	ManagePrivAttrName string
	RegionAttrName     string
}

func (*StandardRegistrarConfig) NewTx

Directories

Path Synopsis
Package ccprotos is a generated protocol buffer package.
Package ccprotos is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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