node

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCORSConfig

func DefaultCORSConfig(allowOrigins []string) *cors.Config

func GenerateConfig

func GenerateConfig(port int, baseDir string) ([]byte, []byte, error)

func InitAuthMiddleware

func InitAuthMiddleware(cfg *koanf.Koanf, realm string, resolver cmdbase.ParameterResolver, configDir string, identityBackend storage.IdentityBackend) (*apibase.GinJWTMiddleware, []byte, error)

func InitIdentityBackend

func InitIdentityBackend(cfg *koanf.Koanf, resolver cmdbase.ParameterResolver) (storage.IdentityBackend, error)

func InitOffChainStorage

func InitOffChainStorage(cfg *koanf.Koanf, resolver cmdbase.ParameterResolver) (vaults.Vault, error)

func InitRouter

func InitRouter(corsCfg *cors.Config) *gin.Engine

func InitVaults

func InitVaults(cfg *koanf.Koanf, resolver cmdbase.ParameterResolver, ledgerAPI model.Ledger, warden *utils.GracefulWarden) (*vaults.LocalBlobManager, error)

func SafeWriteConfigToFile

func SafeWriteConfigToFile(configDir, configName string) error

Types

type MetaLockerServer

type MetaLockerServer struct {
	ServerControls api.ServerControls
	ConfigDir      string
	Warden         *utils.GracefulWarden
	Resolver       *cmdbase.SecureParameterResolver
	JWTMiddleware  *apibase.GinJWTMiddleware
	Level1AuthFn   gin.HandlerFunc
	Level2AuthFn   gin.HandlerFunc

	IdentityBackend storage.IdentityBackend
	OffChainVault   vaults.Vault
	Ledger          model.Ledger
	BlobManager     *vaults.LocalBlobManager
	NS              notification.Service
	Router          *gin.Engine
	// contains filtered or unexported fields
}

func NewMetaLockerServer

func NewMetaLockerServer(configDir string) *MetaLockerServer

func (*MetaLockerServer) BaseURI

func (mls *MetaLockerServer) BaseURI() string

func (*MetaLockerServer) Close

func (mls *MetaLockerServer) Close() error

func (*MetaLockerServer) CloseOnShutdown

func (mls *MetaLockerServer) CloseOnShutdown(closer io.Closer)

func (*MetaLockerServer) InitAuthentication

func (mls *MetaLockerServer) InitAuthentication(ctx context.Context, cfg *koanf.Koanf) error

func (*MetaLockerServer) InitServices

func (mls *MetaLockerServer) InitServices(ctx context.Context, cfg *koanf.Koanf, debugMode bool) error

func (*MetaLockerServer) InitStandardRoutes

func (mls *MetaLockerServer) InitStandardRoutes(ctx context.Context, cfg *koanf.Koanf) error

func (*MetaLockerServer) Run

func (mls *MetaLockerServer) Run(cfg *koanf.Koanf) error

type OffChainStorageProxy

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

func NewOffChainStorageProxy

func NewOffChainStorageProxy(v vaults.Vault) *OffChainStorageProxy

func (*OffChainStorageProxy) GetOperation

func (p *OffChainStorageProxy) GetOperation(ctx context.Context, opAddr string) ([]byte, error)

func (*OffChainStorageProxy) PurgeOperation

func (p *OffChainStorageProxy) PurgeOperation(ctx context.Context, opAddr string) error

func (*OffChainStorageProxy) SendOperation

func (p *OffChainStorageProxy) SendOperation(ctx context.Context, opData []byte) (string, error)

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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