qlight

package
v0.0.0-...-1d3cd56 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTLSConfig

func NewTLSConfig(config *TLSConfig) (*tls.Config, error)

Types

type AuthManagerProvider

type AuthManagerProvider func() security.AuthenticationManager

type AuthProvider

type AuthProvider interface {
	Initialize() error
	Authorize(token string, psi string) error
}

func NewAuthProvider

func NewAuthProvider(privateStateManager mps.PrivateStateManager, authManagerProvider AuthManagerProvider) AuthProvider

type BlockPrivateData

type BlockPrivateData struct {
	BlockHash           common.Hash
	PSI                 types.PrivateStateIdentifier
	PrivateStateRoot    common.Hash
	PrivateTransactions []PrivateTransactionData
}

type CacheWithEmpty

type CacheWithEmpty interface {
	Cache(privateTxData *qlightptm.CachablePrivateTransactionData) error
	CheckAndAddEmptyToCache(hash common.EncryptedPayloadHash)
}

type JWT

type JWT struct {
	ExpireAt int64 `json:"exp"`
}

type PrivateBlockDataResolver

type PrivateBlockDataResolver interface {
	PrepareBlockPrivateData(block *types.Block, psi string) (*BlockPrivateData, error)
}

func NewPrivateBlockDataResolver

func NewPrivateBlockDataResolver(privateStateManager mps.PrivateStateManager, ptm private.PrivateTransactionManager) PrivateBlockDataResolver

type PrivateClientCache

type PrivateClientCache interface {
	PrivateStateRootHashValidator
	AddPrivateBlock(blockPrivateData BlockPrivateData) error
	CheckAndAddEmptyEntry(hash common.EncryptedPayloadHash)
}

func NewClientCache

func NewClientCache(db ethdb.Database) (PrivateClientCache, error)

func NewClientCacheWithEmpty

func NewClientCacheWithEmpty(db ethdb.Database, cacheWithEmpty CacheWithEmpty, gocache *gocache.Cache) (PrivateClientCache, error)

type PrivateQLightAPI

type PrivateQLightAPI struct {
	// contains filtered or unexported fields
}

func NewPrivateQLightAPI

func NewPrivateQLightAPI(peerUpdater RunningPeerAuthUpdater, rpcClient *rpc.Client) *PrivateQLightAPI

NewPublicEthereumAPI creates a new Ethereum protocol API for full nodes.

func (*PrivateQLightAPI) GetCurrentToken

func (p *PrivateQLightAPI) GetCurrentToken() string

func (*PrivateQLightAPI) ReloadPlugin

func (p *PrivateQLightAPI) ReloadPlugin() error

func (*PrivateQLightAPI) SetCurrentToken

func (p *PrivateQLightAPI) SetCurrentToken(token string)

type PrivateStateRootHashValidator

type PrivateStateRootHashValidator interface {
	ValidatePrivateStateRoot(blockHash common.Hash, blockPublicStateRoot common.Hash) error
}

type PrivateTransactionData

type PrivateTransactionData struct {
	Hash     *common.EncryptedPayloadHash
	Payload  []byte
	Extra    *engine.ExtraMetadata
	IsSender bool
}

func (*PrivateTransactionData) ToCachable

type QLightCacheKey

type QLightCacheKey struct {
	BlockHash common.Hash
	PSI       types.PrivateStateIdentifier
}

func (*QLightCacheKey) String

func (k *QLightCacheKey) String() string

type RunningPeerAuthUpdater

type RunningPeerAuthUpdater interface {
	UpdateTokenForRunningQPeers(token string) error
}

type TLSConfig

type TLSConfig struct {
	CACertFileName       string
	ClientCACertFileName string
	ClientAuth           int
	CertFileName         string
	KeyFileName          string
	InsecureSkipVerify   bool
	CipherSuites         string
	ServerName           string
}

type TokenHolder

type TokenHolder struct {
	// contains filtered or unexported fields
}

func NewTokenHolder

func NewTokenHolder(psi string, pluginManager *plugin.PluginManager) (*TokenHolder, error)

func NewTokenHolderWithPlugin

func NewTokenHolderWithPlugin(psi string, refreshAnticipation int32, plugin qlightplugin.PluginTokenManager, pluginManager *plugin.PluginManager) *TokenHolder

func (*TokenHolder) CurrentToken

func (h *TokenHolder) CurrentToken() string

func (*TokenHolder) HttpCredentialsProvider

func (h *TokenHolder) HttpCredentialsProvider(ctx context.Context) (string, error)

func (*TokenHolder) RefreshPlugin

func (h *TokenHolder) RefreshPlugin(pluginManager plugin.PluginManagerInterface) error

func (*TokenHolder) ReloadPlugin

func (h *TokenHolder) ReloadPlugin() error

func (*TokenHolder) SetCurrentToken

func (h *TokenHolder) SetCurrentToken(v string)

func (*TokenHolder) SetExpirationAnticipation

func (h *TokenHolder) SetExpirationAnticipation(v int32)

func (*TokenHolder) SetPeerUpdater

func (h *TokenHolder) SetPeerUpdater(peerUpdater RunningPeerAuthUpdater)

Directories

Path Synopsis
Package qlighttest is a generated GoMock package.
Package qlighttest is a generated GoMock package.

Jump to

Keyboard shortcuts

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