Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockType ¶
type BlockType interface {
// Constructor builds a new zero-value block.Block instance.
Constructor() block.Block
// GetBlockTypeID returns the unique identifier for this block type.
// Format: "github.com/s4wave/spacewave/db/block/mock.Root"
GetBlockTypeID() string
// MatchesBlockType checks if a block.Block is of this type.
MatchesBlockType(b block.Block) bool
}
BlockType provides construction and identification for a block.Block type.
func ExLookupBlockType ¶
func ExLookupBlockType( ctx context.Context, b bus.Bus, blockTypeID string, ) (BlockType, directive.Reference, error)
ExLookupBlockType executes a lookup for a single block type on the bus.
blockTypeID is the block type identifier to lookup. Returns the BlockType or an error if not found.
func NewBlockType ¶
NewBlockType builds a BlockType using generics to reduce boilerplate.
T is the concrete block type, typeID is the unique identifier like "github.com/s4wave/spacewave/db/block/mock.Root", and constructor is a function that returns a new zero-value instance.
type LookupBlockType ¶
type LookupBlockType interface {
// Directive indicates LookupBlockType is a directive.
directive.Directive
// LookupBlockTypeID returns the block type ID to lookup.
LookupBlockTypeID() string
}
LookupBlockType is a directive to look up a block type.
func NewLookupBlockType ¶
func NewLookupBlockType(blockTypeID string) LookupBlockType
NewLookupBlockType constructs a new LookupBlockType directive.
type LookupBlockTypeValue ¶
type LookupBlockTypeValue = BlockType
LookupBlockTypeValue is the result type for LookupBlockType.