path_mgmt

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MinRevTTL = 10 * time.Second // MinRevTTL is the minimum lifetime of a revocation

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
}

type HPCfg added in v0.4.0

type HPCfg struct {
	GroupId    *HPGroupId
	Version    uint32
	OwnerISD   addr.ISD
	Writers    []addr.IAInt
	Readers    []addr.IAInt
	Registries []addr.IAInt
}

func (*HPCfg) ProtoId added in v0.4.0

func (hc *HPCfg) ProtoId() proto.ProtoIdType

func (*HPCfg) String added in v0.4.0

func (hc *HPCfg) String() string

type HPCfgReply added in v0.4.0

type HPCfgReply struct {
	Cfgs []*HPCfg
}

func (*HPCfgReply) ProtoId added in v0.4.0

func (hr *HPCfgReply) ProtoId() proto.ProtoIdType

func (*HPCfgReply) String added in v0.4.0

func (hr *HPCfgReply) String() string

type HPCfgReq added in v0.4.0

type HPCfgReq struct {
	ChangedSince uint32
}

func (*HPCfgReq) ProtoId added in v0.4.0

func (hr *HPCfgReq) ProtoId() proto.ProtoIdType

func (*HPCfgReq) String added in v0.4.0

func (hr *HPCfgReq) String() string

type HPGroupId added in v0.4.0

type HPGroupId struct {
	OwnerAS addr.AS
	GroupId uint16
}

func (*HPGroupId) ProtoId added in v0.4.0

func (id *HPGroupId) ProtoId() proto.ProtoIdType

func (*HPGroupId) String added in v0.4.0

func (id *HPGroupId) String() string

type HPSegRecs added in v0.4.0

type HPSegRecs struct {
	GroupId *HPGroupId
	Recs    []*seg.Meta
	Err     string
}

func (*HPSegRecs) ParseRaw added in v0.4.0

func (hs *HPSegRecs) ParseRaw() error

ParseRaw populates the non-capnp fields of s based on data from the raw capnp fields.

func (*HPSegRecs) ProtoId added in v0.4.0

func (hs *HPSegRecs) ProtoId() proto.ProtoIdType

func (*HPSegRecs) String added in v0.4.0

func (hs *HPSegRecs) String() string

type HPSegReg added in v0.4.0

type HPSegReg struct {
	*HPSegRecs
}

type HPSegReply added in v0.4.0

type HPSegReply struct {
	Recs []*HPSegRecs
}

func (*HPSegReply) ParseRaw added in v0.4.0

func (hs *HPSegReply) ParseRaw() error

ParseRaw populates the non-capnp fields of s based on data from the raw capnp fields.

func (*HPSegReply) ProtoId added in v0.4.0

func (hs *HPSegReply) ProtoId() proto.ProtoIdType

func (*HPSegReply) Sanitize added in v0.4.0

func (hs *HPSegReply) Sanitize(logger log.Logger) *HPSegReply

Sanitize returns a fresh HPSegReply containing only the segments and revocations in s that could be parsed successfully. Note that pointers in the returned value reference the same memory as s.

Since Sanitize is always successful, pass in a logger to be informed of any discarded objects. If logger is nil, no logging is performed and the reply is silently sanitized.

func (*HPSegReply) String added in v0.4.0

func (hs *HPSegReply) String() string

type HPSegReq added in v0.4.0

type HPSegReq struct {
	RawDstIA addr.IAInt `capnp:"dstIA"`
	GroupIds []*HPGroupId
}

func (*HPSegReq) DstIA added in v0.4.0

func (s *HPSegReq) DstIA() addr.IA

func (*HPSegReq) ProtoId added in v0.4.0

func (s *HPSegReq) ProtoId() proto.ProtoIdType

func (*HPSegReq) String added in v0.4.0

func (s *HPSegReq) String() string

type Pld

type Pld struct {
	*Data
	// contains filtered or unexported fields
}

func NewPld

func NewPld(u proto.Cerealizable, d *Data) (*Pld, error)

NewPld creates a new path mgmt payload, containing the supplied Cerealizable instance.

func (*Pld) ProtoId

func (p *Pld) ProtoId() proto.ProtoIdType

func (*Pld) String

func (p *Pld) String() string

func (*Pld) Union

func (p *Pld) Union() (proto.Cerealizable, error)

type RevInfo

type RevInfo struct {
	IfID     common.IFIDType
	RawIsdas addr.IAInt `capnp:"isdas"`
	// LinkType of revocation
	LinkType proto.LinkType
	// RawTimestamp the issuing timestamp in seconds.
	RawTimestamp uint32 `capnp:"timestamp"`
	// RawTTL validity period of the revocation in seconds
	RawTTL uint32 `capnp:"ttl"`
}

func NewRevInfoFromRaw

func NewRevInfoFromRaw(b common.RawBytes) (*RevInfo, error)

func (*RevInfo) Active

func (r *RevInfo) Active() error

func (*RevInfo) Equal added in v0.4.0

func (r *RevInfo) Equal(other *RevInfo) bool

func (*RevInfo) Expiration

func (r *RevInfo) Expiration() time.Time

func (*RevInfo) IA

func (r *RevInfo) IA() addr.IA

func (*RevInfo) Pack added in v0.4.0

func (r *RevInfo) Pack() (common.RawBytes, error)

func (*RevInfo) ProtoId

func (r *RevInfo) ProtoId() proto.ProtoIdType

func (*RevInfo) RelativeTTL

func (r *RevInfo) RelativeTTL(reference time.Time) time.Duration

RelativeTTL returns the duration r is still valid for, relative to reference. If the revocation is already expired, the returned value is 0.

func (*RevInfo) SameIntf added in v0.3.1

func (r *RevInfo) SameIntf(other *RevInfo) bool

SameIntf returns true if r and other both apply to the same interface.

func (*RevInfo) String

func (r *RevInfo) String() string

func (*RevInfo) TTL

func (r *RevInfo) TTL() time.Duration

func (*RevInfo) Timestamp

func (r *RevInfo) Timestamp() time.Time

Timestamp returns the issuing time stamp of the revocation.

type RevTimeError

type RevTimeError string

func NewRevTimeError

func NewRevTimeError(r *RevInfo) RevTimeError

func (RevTimeError) Error

func (ee RevTimeError) Error() string

func (RevTimeError) Timeout

func (ee RevTimeError) Timeout() bool

type SignedRevInfo

type SignedRevInfo struct {
	Blob common.RawBytes
	Sign *proto.SignS
	// contains filtered or unexported fields
}

func NewSignedRevInfo added in v0.4.0

func NewSignedRevInfo(r *RevInfo) (*SignedRevInfo, error)

func NewSignedRevInfoFromRaw

func NewSignedRevInfoFromRaw(b common.RawBytes) (*SignedRevInfo, error)

func (*SignedRevInfo) Pack added in v0.4.0

func (sr *SignedRevInfo) Pack() (common.RawBytes, error)

func (*SignedRevInfo) ProtoId

func (sr *SignedRevInfo) ProtoId() proto.ProtoIdType

func (*SignedRevInfo) RevInfo

func (sr *SignedRevInfo) RevInfo() (*RevInfo, error)

func (*SignedRevInfo) String

func (sr *SignedRevInfo) String() string

type Verifier added in v0.4.0

type Verifier interface {
	// Verify verifies the packed signed revocation based on the signature meta
	// data.
	Verify(ctx context.Context, msg []byte, sign *proto.SignS) error
}

Verifier is used to verify signatures.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL