Versions in this module Expand all Collapse all v1 v1.8.12 Jul 4, 2018 Changes in this version + const DbDirName + const ErrCnt + const ErrCorruptData + const ErrDataOverflow + const ErrIO + const ErrInit + const ErrInvalidSignature + const ErrInvalidValue + const ErrNotFound + const ErrNotSynced + const ErrNothingToReturn + const ErrPeriodDepth + const ErrUnauthorized + func NewBlockEstimator() *blockEstimator + func NewError(code int, s string) error + func ToSafeName(name string) (string, error) + type Error struct + func (e *Error) Code() int + func (e *Error) Error() string + type GenericSigner struct + PrivKey *ecdsa.PrivateKey + func (self *GenericSigner) Sign(data common.Hash) (signature Signature, err error) + type Handler struct + HashSize int + func NewHandler(params *HandlerParams) (*Handler, error) + func NewTestHandler(datadir string, params *HandlerParams) (*Handler, error) + func (h *Handler) BlockToPeriod(name string, blocknumber uint64) (uint32, error) + func (h *Handler) Close() + func (h *Handler) GetContent(name string) (storage.Address, []byte, error) + func (h *Handler) GetLastPeriod(nameHash string) (uint32, error) + func (h *Handler) GetVersion(nameHash string) (uint32, error) + func (h *Handler) IsValidated() bool + func (h *Handler) Load(addr storage.Address) (*resource, error) + func (h *Handler) LookupHistorical(ctx context.Context, nameHash common.Hash, period uint32, refresh bool, ...) (*resource, error) + func (h *Handler) LookupHistoricalByName(ctx context.Context, name string, period uint32, refresh bool, ...) (*resource, error) + func (h *Handler) LookupLatest(ctx context.Context, nameHash common.Hash, refresh bool, ...) (*resource, error) + func (h *Handler) LookupLatestByName(ctx context.Context, name string, refresh bool, maxLookup *LookupParams) (*resource, error) + func (h *Handler) LookupPrevious(ctx context.Context, nameHash common.Hash, maxLookup *LookupParams) (*resource, error) + func (h *Handler) LookupPreviousByName(ctx context.Context, name string, maxLookup *LookupParams) (*resource, error) + func (h *Handler) LookupVersion(ctx context.Context, nameHash common.Hash, period uint32, version uint32, ...) (*resource, error) + func (h *Handler) LookupVersionByName(ctx context.Context, name string, period uint32, version uint32, refresh bool, ...) (*resource, error) + func (h *Handler) New(ctx context.Context, name string, frequency uint64) (storage.Address, *resource, error) + func (h *Handler) PeriodToBlock(name string, period uint32) uint64 + func (h *Handler) SetStore(store *storage.NetStore) + func (h *Handler) Update(ctx context.Context, name string, data []byte) (storage.Address, error) + func (h *Handler) UpdateMultihash(ctx context.Context, name string, data []byte) (storage.Address, error) + func (h *Handler) Validate(addr storage.Address, data []byte) bool + type HandlerParams struct + HeaderGetter headerGetter + OwnerValidator ownerValidator + QueryMaxPeriods *LookupParams + Signer Signer + type LookupParams struct + Limit bool + Max uint32 + type Signature [signatureLength]byte + type Signer interface + Sign func(common.Hash) (Signature, error)