Versions in this module Expand all Collapse all v0 v0.4.0 Nov 14, 2019 Changes in this version + var ErrBaseNotSupported = serrors.New("inserting base TRC not supported") + var ErrContentMismatch = serrors.New("content does not match") + var ErrInactive = serrors.New("inactive") + var ErrNotFound = serrors.New("not found") + var ErrRecursionNotAllowed = serrors.New("recursion not allowed") + var ErrResolveSuperseded = serrors.New("latest locally available is newer") + var ErrValidation = serrors.New("validation error") + var ErrVerification = serrors.New("verification error") + type ASLocalRecurser struct + IA addr.IA + func (r *ASLocalRecurser) AllowRecursion(peer net.Addr) error + type ChainRead interface + ChainExists func(ctx context.Context, d decoded.TRC) (bool, error) + GetRawChain func(ctx context.Context, ia addr.IA, version scrypto.Version) ([]byte, error) + type ChainReq struct + CacheOnly bool + IA addr.IA + Version scrypto.Version + type ChainWrite interface + InsertChain func(ctx context.Context, d decoded.Chain) (bool, bool, error) + type CryptoProvider interface + GetRawChain func(ctx context.Context, ia addr.IA, version scrypto.Version, opts infra.ChainOpts, ...) ([]byte, error) + GetRawTRC func(ctx context.Context, isd addr.ISD, version scrypto.Version, opts infra.TRCOpts, ...) ([]byte, error) + GetTRC func(ctx context.Context, isd addr.ISD, version scrypto.Version, opts infra.TRCOpts) (*trc.TRC, error) + type DB interface + BeginTransaction func(ctx context.Context, opts *sql.TxOptions) (Transaction, error) + type DBRead interface + type DBWrite interface + type Inserter interface + InsertChain func(ctx context.Context, decChain decoded.Chain, trcProvider TRCProviderFunc) error + InsertTRC func(ctx context.Context, decTRC decoded.TRC, trcProvider TRCProviderFunc) error + type Inspector interface + ByAttributes func(ctx context.Context, isd addr.ISD, opts infra.ASInspectorOpts) ([]addr.IA, error) + HasAttributes func(ctx context.Context, ia addr.IA, opts infra.ASInspectorOpts) (bool, error) + type LocalOnlyRecurser struct + func (r LocalOnlyRecurser) AllowRecursion(peer net.Addr) error + type RPC interface + GetCertChain func(ctx context.Context, msg ChainReq, a net.Addr) ([]byte, error) + GetTRC func(context.Context, TRCReq, net.Addr) ([]byte, error) + SendCertChain func(context.Context, []byte, net.Addr) error + SendTRC func(context.Context, []byte, net.Addr) error + SetMsgr func(msgr infra.Messenger) + type ReadWrite interface + type Recurser interface + AllowRecursion func(peer net.Addr) error + type Resolver interface + Chain func(ctx context.Context, req ChainReq, server net.Addr) (decoded.Chain, error) + TRC func(ctx context.Context, req TRCReq, server net.Addr) (decoded.TRC, error) + type Router interface + ChooseServer func(ctx context.Context, subjectISD addr.ISD) (net.Addr, error) + type TRCInfo struct + GracePeriod time.Duration + Validity scrypto.Validity + Version scrypto.Version + type TRCProviderFunc func(context.Context, addr.ISD, scrypto.Version) (*trc.TRC, error) + type TRCRead interface + GetRawTRC func(ctx context.Context, isd addr.ISD, version scrypto.Version) ([]byte, error) + GetTRC func(ctx context.Context, isd addr.ISD, version scrypto.Version) (*trc.TRC, error) + GetTRCInfo func(ctx context.Context, isd addr.ISD, version scrypto.Version) (TRCInfo, error) + TRCExists func(ctx context.Context, d decoded.TRC) (bool, error) + type TRCReq struct + CacheOnly bool + ISD addr.ISD + Version scrypto.Version + type TRCWrite interface + InsertTRC func(ctx context.Context, d decoded.TRC) (bool, error) + type Transaction interface + Commit func() error + Rollback func() error