permission_layer

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: GPL-3.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SpFilenames = struct {
	sync.RWMutex
	M map[string]*SafeFilename
}{M: make(map[string]*SafeFilename)}

Functions

This section is empty.

Types

type PermissionLayer

type PermissionLayer interface {
	ID() PermissionLayerID
	Permissioned() bool
	ValidatePeersPtrArr(bootstrapPeers []*peer.AddrInfo, timeout time.Duration) (res []*peer.AddrInfo, err error)
	ValidatePeers(bootstrapPeers []peer.AddrInfo, timeout time.Duration) (res []peer.AddrInfo, err error)
	ValidatePeer(pid peer.ID, timeout time.Duration) (bool, error)
	UpdateIndividualSPProfileCache(pid peer.ID)
	UpdateSPProfileCache(pids []peer.ID)
	CompareBlockHeights(lhs, rhs VersionData) (int, error)
	GetBlockHeight() (string, error)
	GetBlockHash(blockHeight string) (string, error)
	NewVersionData() (*VersionData, error)
}

type PermissionLayerID

type PermissionLayerID string
const (
	EthPermissionId PermissionLayerID = "ETH"
	NotPermissionId PermissionLayerID = "NON"
	NeoPermissionId PermissionLayerID = "NEO"
)

type SafeFilename

type SafeFilename struct {
	sync.RWMutex
}

type VersionData

type VersionData struct {
	BlockHeight string `json:block_height` // height and hash "time"
	BlockHash   string `json:block_hash`   // from upload
}

Jump to

Keyboard shortcuts

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