chains

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: LGPL-3.0, MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound           = errors.New("not found")
	ErrMultipleChainFound = errors.New("multiple chains found with the same chain ID")
)
View Source
var ErrNoSuchChainID = errors.New("chain id does not exist")

Functions

This section is empty.

Types

type ChainsKV

type ChainsKV[T types.ChainService] struct {
	// contains filtered or unexported fields
}

func NewChainsKV

func NewChainsKV[T types.ChainService](cs map[string]T) *ChainsKV[T]

func (*ChainsKV[T]) Get

func (c *ChainsKV[T]) Get(id string) (T, error)

Get return ErrNoSuchChainID if [id] is not found

func (*ChainsKV[T]) Len

func (c *ChainsKV[T]) Len() int

func (*ChainsKV[T]) List

func (c *ChainsKV[T]) List(ids ...string) ([]T, error)

func (*ChainsKV[T]) Slice

func (c *ChainsKV[T]) Slice() []T

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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