Versions in this module Expand all Collapse all v1 v1.0.1 Oct 26, 2020 Changes in this version + const MaxSize + const TreeMaxLevel + func LevelAdd(l, r byte) (byte, error) + func LevelSubtract(l, r byte) (byte, error) + type AggrAck struct + type AggrChainInit func(*aggregationChainBuilder) error + func BuildFromAggregationChain(aggrChain *AggregationChain) AggrChainInit + func BuildFromImprint(aggrAlgo hash.Algorithm, inputHash hash.Imprint) AggrChainInit + type AggrReq struct + func (r *AggrReq) RequestHash() (hash.Imprint, error) + func (r *AggrReq) RequestID() (uint64, error) + func (r *AggrReq) RequestLevel() (byte, error) + type AggrResp struct + func (r *AggrResp) AggregationChainList() ([]*AggregationChain, error) + func (r *AggrResp) CalendarAuthRec() (*CalendarAuthRec, error) + func (r *AggrResp) CalendarChain() (*CalendarChain, error) + func (r *AggrResp) Err() error + func (r *AggrResp) ErrorMsg() (string, error) + func (r *AggrResp) PublicationRec() (*PublicationRec, error) + func (r *AggrResp) RFC3161() (*RFC3161, error) + func (r *AggrResp) RequestID() (uint64, error) + func (r *AggrResp) Status() (uint64, error) + type AggregationChain struct + func (c *AggregationChain) Aggregate(startLevel byte) (hash.Imprint, byte, error) + func (c *AggregationChain) AggregationAlgo() (hash.Algorithm, error) + func (c *AggregationChain) AggregationTime() (time.Time, error) + func (c *AggregationChain) CalculateShape() (uint64, error) + func (c *AggregationChain) ChainIndex() ([]uint64, error) + func (c *AggregationChain) ChainLinks() ([]*ChainLink, error) + func (c *AggregationChain) Identity() (HashChainLinkIdentityList, error) + func (c *AggregationChain) InputData() ([]byte, error) + func (c *AggregationChain) InputHash() (hash.Imprint, error) + func (c *AggregationChain) String() string + type AggregationChainBuilder struct + func NewAggregationChainBuilder(init AggrChainInit) (*AggregationChainBuilder, error) + func (b *AggregationChainBuilder) AddChainLink(isLeft bool, lvlCorrection byte, siblingData LinkSiblingDataSetter) error + func (b *AggregationChainBuilder) AdjustLevelCorrection(calc LevelCalculator, lvl byte) error + func (b *AggregationChainBuilder) Build() (*AggregationChain, error) + func (b *AggregationChainBuilder) PrependChainIndex(i []uint64) error + func (b *AggregationChainBuilder) SetAggregationTime(t time.Time) error + type AggregationChainList []*AggregationChain + func (l AggregationChainList) Aggregate(lvl byte) (hash.Imprint, error) + func (l AggregationChainList) Identity() (HashChainLinkIdentityList, error) + func (l AggregationChainList) Len() int + func (l AggregationChainList) Less(i, j int) bool + func (l AggregationChainList) Swap(i, j int) + type AggregationReqSetting func(*aggregatorReq) error + func AggrReqSetRequestID(id uint64) AggregationReqSetting + func AggrReqSetRequestLevel(level byte) AggregationReqSetting + type AggregatorPdu struct + type AggregatorReq struct + func NewAggregationReq(requestHash hash.Imprint, settings ...AggregationReqSetting) (*AggregatorReq, error) + func NewAggregatorConfigReq() (*AggregatorReq, error) + func (r *AggregatorReq) AggregationReq() (*AggrReq, error) + func (r *AggregatorReq) Clone() (*AggregatorReq, error) + func (r *AggregatorReq) Config() (*Config, error) + func (r *AggregatorReq) Context() context.Context + func (r *AggregatorReq) Encode() ([]byte, error) + func (r *AggregatorReq) HMAC() (hash.Imprint, error) + func (r *AggregatorReq) Header() (*Header, error) + func (r *AggregatorReq) SetHeader(hdr *Header) error + func (r *AggregatorReq) UpdateHMAC(alg hash.Algorithm, key string) error + func (r *AggregatorReq) UpdateRequestID(id uint64) error + func (r *AggregatorReq) WithContext(ctx context.Context) *AggregatorReq + type AggregatorResp struct + func (r *AggregatorResp) AggregationResp() (*AggrResp, error) + func (r *AggregatorResp) Clone() (*AggregatorResp, error) + func (r *AggregatorResp) Config() (*Config, error) + func (r *AggregatorResp) Decode(raw []byte) error + func (r *AggregatorResp) Encode() ([]byte, error) + func (r *AggregatorResp) Err() error + func (r *AggregatorResp) SetConfig(c *Config) error + func (r *AggregatorResp) Verify(alg hash.Algorithm, key string) error + type CalendarAuthRec struct + func (c *CalendarAuthRec) PublicationData() (*PublicationData, error) + func (c *CalendarAuthRec) SignatureData() (*SignatureData, error) + type CalendarChain struct + func (c *CalendarChain) Aggregate() (hash.Imprint, error) + func (c *CalendarChain) AggregationTime() (time.Time, error) + func (c *CalendarChain) CalculateAggregationTime() (time.Time, error) + func (c *CalendarChain) ChainLinks() ([]*ChainLink, error) + func (c *CalendarChain) InputHash() (hash.Imprint, error) + func (c *CalendarChain) PublicationTime() (time.Time, error) + func (c *CalendarChain) RightLinkMatch(l *CalendarChain) error + func (c *CalendarChain) String() string + func (c *CalendarChain) VerifyCompatibility(with *CalendarChain) error + type CertificateRecord struct + func (c *CertificateRecord) Cert() ([]byte, error) + func (c *CertificateRecord) CertID() ([]byte, error) + func (c *CertificateRecord) IsValid(at time.Time) (bool, error) + func (c *CertificateRecord) VerifySigType(sigType string) error + type ChainLink struct + func (l *ChainLink) FromTlv(objTlv *tlv.Tlv) error + func (l *ChainLink) Identity() (*HashChainLinkIdentity, error) + func (l *ChainLink) IsLeft() (bool, error) + func (l *ChainLink) LegacyID() (*LegacyID, error) + func (l *ChainLink) LevelCorrection() (uint64, error) + func (l *ChainLink) MetaData() (*MetaData, error) + func (l *ChainLink) SiblingHash() (hash.Imprint, error) + func (l *ChainLink) String() string + func (l *ChainLink) ToTlv(enc *tlv.Encoder) (*tlv.Tlv, error) + type ChainLinkList []*ChainLink + func (l ChainLinkList) String() string + type Config struct + func (c *Config) AggrAlgo() (hash.Algorithm, error) + func (c *Config) AggrPeriod() (uint64, error) + func (c *Config) CalFirst() (uint64, error) + func (c *Config) CalLast() (uint64, error) + func (c *Config) Consolidate(cfg *Config, limits ConfigLimits, logic ConfigConsStrategy) error + func (c *Config) MaxLevel() (byte, error) + func (c *Config) MaxReq() (uint64, error) + func (c *Config) ParentURI() ([]string, error) + func (c *Config) String() string + type ConfigConsStrategy struct + AggrAlgorithm hash.Algorithm + AggrPeriodKeepLargest bool + CalFirstKeepEarliest bool + MaxLevelKeepLargest bool + MaxRequestsKeepLargest bool + ParentUriAppend bool + type ConfigLimits struct + AggrPeriodHigh uint64 + AggrPeriodLow uint64 + CalFirstLow uint64 + MaxLevelHigh uint64 + MaxLevelLow uint64 + MaxReqHigh uint64 + MaxReqLow uint64 + type Error struct + type ExtReq struct + func (r *ExtReq) AggregationTime() (time.Time, error) + func (r *ExtReq) PublicationTime() (time.Time, error) + func (r *ExtReq) RequestID() (uint64, error) + type ExtResp struct + func (r *ExtResp) CalendarChain() (*CalendarChain, error) + func (r *ExtResp) CalendarLast() (uint64, error) + func (r *ExtResp) Err() error + func (r *ExtResp) ErrorMsg() (string, error) + func (r *ExtResp) RequestID() (uint64, error) + func (r *ExtResp) Status() (uint64, error) + type ExtenderPdu struct + type ExtenderReq struct + func NewExtenderConfigReq() (*ExtenderReq, error) + func NewExtendingReq(start time.Time, settings ...ExtendingReqSetting) (*ExtenderReq, error) + func (r *ExtenderReq) Clone() (*ExtenderReq, error) + func (r *ExtenderReq) Config() (*Config, error) + func (r *ExtenderReq) Context() context.Context + func (r *ExtenderReq) Encode() ([]byte, error) + func (r *ExtenderReq) ExtendingReq() (*ExtReq, error) + func (r *ExtenderReq) HMAC() (hash.Imprint, error) + func (r *ExtenderReq) Header() (*Header, error) + func (r *ExtenderReq) SetHeader(hdr *Header) error + func (r *ExtenderReq) UpdateHMAC(alg hash.Algorithm, key string) error + func (r *ExtenderReq) UpdateRequestID(id uint64) error + func (r *ExtenderReq) WithContext(ctx context.Context) *ExtenderReq + type ExtenderResp struct + func (r *ExtenderResp) Clone() (*ExtenderResp, error) + func (r *ExtenderResp) Config() (*Config, error) + func (r *ExtenderResp) Decode(raw []byte) error + func (r *ExtenderResp) Encode() ([]byte, error) + func (r *ExtenderResp) Err() error + func (r *ExtenderResp) ExtendingResp() (*ExtResp, error) + func (r *ExtenderResp) SetConfig(c *Config) error + func (r *ExtenderResp) Verify(alg hash.Algorithm, key string) error + type ExtendingReqSetting func(*extenderReq) error + func ExtReqSetPubTime(end time.Time) ExtendingReqSetting + func ExtReqSetRequestID(id uint64) ExtendingReqSetting + type HashChainLinkIdentity struct + func (id *HashChainLinkIdentity) ClientID() (string, error) + func (id *HashChainLinkIdentity) MachineID() (string, error) + func (id *HashChainLinkIdentity) RequestTime() (uint64, error) + func (id *HashChainLinkIdentity) SequenceNr() (uint64, error) + func (id *HashChainLinkIdentity) String() string + func (id *HashChainLinkIdentity) Type() HashChainLinkIdentityType + type HashChainLinkIdentityList []*HashChainLinkIdentity + func (l HashChainLinkIdentityList) String() string + type HashChainLinkIdentityType byte + const IdentityTypeLegacyID + const IdentityTypeMetadata + const IdentityTypeUnknown + type Header struct + func NewHeader(loginID string, f RequestHeaderFunc) (*Header, error) + func (h *Header) InstanceID() (uint64, error) + func (h *Header) LoginID() (string, error) + func (h *Header) MessageID() (uint64, error) + func (h *Header) SetInstID(id uint64) error + func (h *Header) SetMsgID(id uint64) error + type LegacyID struct + func (l *LegacyID) Bytes() ([]byte, error) + func (l *LegacyID) ClientID() (string, error) + func (l *LegacyID) FromTlv(objTlv *tlv.Tlv) error + func (l *LegacyID) ToTlv(enc *tlv.Encoder) (*tlv.Tlv, error) + type LevelCalculator func(byte, byte) (byte, error) + type LinkSiblingDataSetter func(*chainLink) error + func LinkSiblingHash(hsh hash.Imprint) LinkSiblingDataSetter + func LinkSiblingMetaData(md *MetaData) LinkSiblingDataSetter + type MetaData struct + func NewMetaData(clientID string, optionals ...MetaDataOptional) (*MetaData, error) + func (m *MetaData) ClientID() (string, error) + func (m *MetaData) Encode() ([]byte, error) + func (m *MetaData) EncodeToTlv() (*tlv.Tlv, error) + func (m *MetaData) FromTlv(objTlv *tlv.Tlv) error + func (m *MetaData) HasPadding() bool + func (m *MetaData) MachineID() (string, error) + func (m *MetaData) ReqTime() (uint64, error) + func (m *MetaData) SequenceNr() (uint64, error) + func (m *MetaData) String() string + func (m *MetaData) ToTlv(enc *tlv.Encoder) (*tlv.Tlv, error) + type MetaDataOptional func(*metaData) error + func MetaDataMachineID(id string) MetaDataOptional + func MetaDataReqTime(t uint64) MetaDataOptional + func MetaDataSequenceNr(n uint64) MetaDataOptional + type PublicationData struct + func NewPublicationData(builder PublicationDataBuilder) (*PublicationData, error) + func (p *PublicationData) Base32() (string, error) + func (p *PublicationData) Bytes() ([]byte, error) + func (p *PublicationData) Equal(u *PublicationData) bool + func (p *PublicationData) PublicationTime() (time.Time, error) + func (p *PublicationData) PublishedHash() (hash.Imprint, error) + func (p *PublicationData) String() string + type PublicationDataBuilder func(*publicationData) error + func PubDataFromImprint(t time.Time, h hash.Imprint) PublicationDataBuilder + func PubDataFromString(s string) PublicationDataBuilder + type PublicationRec struct + func NewPublicationRec(pubData *PublicationData, optionals ...PublicationRecOptional) (*PublicationRec, error) + func (p *PublicationRec) Clone() (*PublicationRec, error) + func (p *PublicationRec) PublicationData() (*PublicationData, error) + func (p *PublicationRec) PublicationRef() ([]string, error) + func (p *PublicationRec) PublicationRepURI() ([]string, error) + type PublicationRecOptional func(r *publicationRec) error + func PubRecOptPublicationRef(pubRef []string) PublicationRecOptional + func PubRecOptPublicationRepURI(pubRepURI []string) PublicationRecOptional + type PublicationsHeader struct + type RFC3161 struct + func (r *RFC3161) AggregationTime() (time.Time, error) + func (r *RFC3161) ChainIndex() ([]uint64, error) + func (r *RFC3161) InputData() ([]byte, error) + func (r *RFC3161) InputHash() (hash.Imprint, error) + func (r *RFC3161) OutputHash(algorithm hash.Algorithm) (hash.Imprint, error) + func (r *RFC3161) SigAttrAlgo() (hash.Algorithm, error) + func (r *RFC3161) TstInfoAlgo() (hash.Algorithm, error) + type RequestHeaderFunc func(*Header) error + type SignatureData struct + func (s *SignatureData) CertID() ([]byte, error) + func (s *SignatureData) CertRepURI() (string, error) + func (s *SignatureData) SignatureType() (string, error) + func (s *SignatureData) SignatureValue() ([]byte, error)