Versions in this module Expand all Collapse all v5 v5.0.1 Jul 28, 2026 Changes in this version + func Import(parseCtx context.Context, parseBackend PersistenceBackend, ...) error + func RegisterBackend(parseName string, parseBackend PersistenceBackend) + func RegisterCodec(parseName string, parseCodec Codec) + func RegisterResolver(parseName string, parseResolver ConflictResolver) + func RegisterStrategy(parseName string, parseStrategy WriteStrategy) + type BoundAtom struct + func BindAtom[T any](parseCtx context.Context, parseAtom state.Atom[T], parseKey string, ...) BoundAtom[T] + func (parseB BoundAtom[T]) Err() error + func (parseB BoundAtom[T]) Get() T + func (parseB BoundAtom[T]) Loading() bool + func (parseB BoundAtom[T]) Set(parseValue T) + func (parseB BoundAtom[T]) Update(parseFn func(T) T) + type CBORCodec struct + func (CBORCodec) Decode(parseData []byte, parseTarget any) error + func (CBORCodec) Encode(parseValue any) ([]byte, error) + type Codec interface + Decode func(parseData []byte, parseTarget any) error + Encode func(parseValue any) ([]byte, error) + func CodecByName(parseName string) (Codec, bool) + type ConflictResolver interface + Resolve func(parseLocal, parseIncoming Record) Record + func ResolverByName(parseName string) (ConflictResolver, bool) + type Durability int + const DurableDefault + const DurableIndexedDB + const DurableMemory + const DurableOPFS + type HydrateMode int + const HydrateEager + const HydrateLazy + type Immediate struct + func (Immediate) Close(parseCtx context.Context) error + func (Immediate) OnWrite(parseCtx context.Context, parseKey string, ...) + type JSONCodec struct + func (JSONCodec) Decode(parseData []byte, parseTarget any) error + func (JSONCodec) Encode(parseValue any) ([]byte, error) + type LastWriteWins struct + func (LastWriteWins) Resolve(parseLocal, parseIncoming Record) Record + type Options struct + Backend PersistenceBackend + Codec Codec + Conflict ConflictResolver + Durability Durability + Hydrate HydrateMode + Name string + Strategy WriteStrategy + Table string + type PersistedState struct + func UsePersistedState[T any](parseKey string, parseInitial T, parseOptions ...Options) PersistedState[T] + func (parsePs PersistedState[T]) Err() error + func (parsePs PersistedState[T]) Get() T + func (parsePs PersistedState[T]) Loading() bool + func (parsePs PersistedState[T]) Set(parseValue T) + type PersistenceBackend interface + Delete func(parseCtx context.Context, parseKey string) error + Keys func(parseCtx context.Context) ([]string, error) + Load func(parseCtx context.Context, parseKey string) (parseRecord Record, parseFound bool, parseErr error) + Save func(parseCtx context.Context, parseRecord Record) error + func BackendByName(parseName string) (PersistenceBackend, bool) + type Record struct + Key string + UpdatedAt int64 + Value []byte + Version int64 + func Export(parseCtx context.Context, parseBackend PersistenceBackend) ([]Record, error) + type Versioned struct + func (Versioned) Resolve(parseLocal, parseIncoming Record) Record + type WriteStrategy interface + Close func(parseCtx context.Context) error + OnWrite func(parseCtx context.Context, parseKey string, ...) + func Debounced(parseD time.Duration) WriteStrategy + func OnUnload() WriteStrategy + func StrategyByName(parseName string) (WriteStrategy, bool) Other modules containing this package github.com/monstercameron/GoWebComponents/v4