chainbase

package
v0.44.0-rc.9 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRootBucketNotFound signals the database has not been properly initialized.
	ErrRootBucketNotFound = logicerr.New("root bucket not found")

	ErrGlobalNamespaceBucketNotFound = logicerr.New("global namespace bucket not found")

	ErrTargetTypeBucketNotFound = logicerr.New("target type bucket not found")

	ErrTargetNameBucketNotFound = logicerr.New("target name bucket not found")

	ErrBucketNotContainsChainID = logicerr.New("chain id not found in bucket")
)

Functions

This section is empty.

Types

type DatabaseCore

type DatabaseCore interface {
	Init() error
	Open(context.Context) error
	Close() error
}

DatabaseCore interface provides methods to initialize and manage local override storage as database.

type LocalOverrideDatabase

type LocalOverrideDatabase interface {
	DatabaseCore
	engine.LocalOverrideStorage
}

LocalOverrideDatabase interface provides methods to manage local override storage as database and as the APE's local override storage.

func NewBoltLocalOverrideDatabase

func NewBoltLocalOverrideDatabase(opts ...Option) LocalOverrideDatabase

NewBoltLocalOverrideDatabase returns storage wrapper for storing access policy engine local overrides.

chain storage (chainBucket): -> global namespace bucket (nBucket): --> target bucket (tBucket) ---> target name (resource) bucket (rBucket):

| Key | Value | x---------------------x-------------------x | chain id (string) | serialized chain | x---------------------x-------------------x

func NewInmemoryLocalOverrideDatabase

func NewInmemoryLocalOverrideDatabase() LocalOverrideDatabase

type Option

type Option func(*cfg)

func WithMaxBatchDelay

func WithMaxBatchDelay(maxBatchDelay time.Duration) Option

func WithMaxBatchSize

func WithMaxBatchSize(maxBatchSize int) Option

func WithNoSync

func WithNoSync(noSync bool) Option

func WithPath

func WithPath(path string) Option

func WithPerm

func WithPerm(perm fs.FileMode) Option

Jump to

Keyboard shortcuts

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