Documentation ¶
Index ¶
- func EqualListOfOutboundEndpoints(p []Outbound, o []Outbound) bool
- func EqualOutboundEndpoints(p, o Outbound) bool
- func ShortNodeIDAsByteString(nodeID node.ShortNodeID) string
- type IPAddress
- type Inbound
- type InboundConnection
- func (v *InboundConnection) AsByteString() longbits.ByteString
- func (v *InboundConnection) GetNameAddress() Name
- func (v *InboundConnection) GetTransportCert() cryptkit.CertificateHolder
- func (v *InboundConnection) GetTransportKey() cryptkit.SigningKeyHolder
- func (v InboundConnection) String() string
- type InboundMock
- func (mmAsByteString *InboundMock) AsByteString() (b1 longbits.ByteString)
- func (mmAsByteString *InboundMock) AsByteStringAfterCounter() uint64
- func (mmAsByteString *InboundMock) AsByteStringBeforeCounter() uint64
- func (mmGetNameAddress *InboundMock) GetNameAddress() (n1 Name)
- func (mmGetNameAddress *InboundMock) GetNameAddressAfterCounter() uint64
- func (mmGetNameAddress *InboundMock) GetNameAddressBeforeCounter() uint64
- func (mmGetTransportCert *InboundMock) GetTransportCert() (c1 cryptkit.CertificateHolder)
- func (mmGetTransportCert *InboundMock) GetTransportCertAfterCounter() uint64
- func (mmGetTransportCert *InboundMock) GetTransportCertBeforeCounter() uint64
- func (mmGetTransportKey *InboundMock) GetTransportKey() (s1 cryptkit.SigningKeyHolder)
- func (mmGetTransportKey *InboundMock) GetTransportKeyAfterCounter() uint64
- func (mmGetTransportKey *InboundMock) GetTransportKeyBeforeCounter() uint64
- func (m *InboundMock) MinimockAsByteStringDone() bool
- func (m *InboundMock) MinimockAsByteStringInspect()
- func (m *InboundMock) MinimockFinish()
- func (m *InboundMock) MinimockGetNameAddressDone() bool
- func (m *InboundMock) MinimockGetNameAddressInspect()
- func (m *InboundMock) MinimockGetTransportCertDone() bool
- func (m *InboundMock) MinimockGetTransportCertInspect()
- func (m *InboundMock) MinimockGetTransportKeyDone() bool
- func (m *InboundMock) MinimockGetTransportKeyInspect()
- func (m *InboundMock) MinimockWait(timeout mm_time.Duration)
- type InboundMockAsByteStringExpectation
- type InboundMockAsByteStringResults
- type InboundMockGetNameAddressExpectation
- type InboundMockGetNameAddressResults
- type InboundMockGetTransportCertExpectation
- type InboundMockGetTransportCertResults
- type InboundMockGetTransportKeyExpectation
- type InboundMockGetTransportKeyResults
- type Name
- type NodeEndpointType
- type Outbound
- type OutboundMock
- func (mmCanAccept *OutboundMock) CanAccept(connection Inbound) (b1 bool)
- func (mmCanAccept *OutboundMock) CanAcceptAfterCounter() uint64
- func (mmCanAccept *OutboundMock) CanAcceptBeforeCounter() uint64
- func (mmGetEndpointType *OutboundMock) GetEndpointType() (n1 NodeEndpointType)
- func (mmGetEndpointType *OutboundMock) GetEndpointTypeAfterCounter() uint64
- func (mmGetEndpointType *OutboundMock) GetEndpointTypeBeforeCounter() uint64
- func (mmGetIPAddress *OutboundMock) GetIPAddress() (i1 IPAddress)
- func (mmGetIPAddress *OutboundMock) GetIPAddressAfterCounter() uint64
- func (mmGetIPAddress *OutboundMock) GetIPAddressBeforeCounter() uint64
- func (mmGetNameAddress *OutboundMock) GetNameAddress() (n1 Name)
- func (mmGetNameAddress *OutboundMock) GetNameAddressAfterCounter() uint64
- func (mmGetNameAddress *OutboundMock) GetNameAddressBeforeCounter() uint64
- func (mmGetRelayID *OutboundMock) GetRelayID() (s1 node.ShortNodeID)
- func (mmGetRelayID *OutboundMock) GetRelayIDAfterCounter() uint64
- func (mmGetRelayID *OutboundMock) GetRelayIDBeforeCounter() uint64
- func (m *OutboundMock) MinimockCanAcceptDone() bool
- func (m *OutboundMock) MinimockCanAcceptInspect()
- func (m *OutboundMock) MinimockFinish()
- func (m *OutboundMock) MinimockGetEndpointTypeDone() bool
- func (m *OutboundMock) MinimockGetEndpointTypeInspect()
- func (m *OutboundMock) MinimockGetIPAddressDone() bool
- func (m *OutboundMock) MinimockGetIPAddressInspect()
- func (m *OutboundMock) MinimockGetNameAddressDone() bool
- func (m *OutboundMock) MinimockGetNameAddressInspect()
- func (m *OutboundMock) MinimockGetRelayIDDone() bool
- func (m *OutboundMock) MinimockGetRelayIDInspect()
- func (m *OutboundMock) MinimockWait(timeout mm_time.Duration)
- type OutboundMockCanAcceptExpectation
- type OutboundMockCanAcceptParams
- type OutboundMockCanAcceptResults
- type OutboundMockGetEndpointTypeExpectation
- type OutboundMockGetEndpointTypeResults
- type OutboundMockGetIPAddressExpectation
- type OutboundMockGetIPAddressResults
- type OutboundMockGetNameAddressExpectation
- type OutboundMockGetNameAddressResults
- type OutboundMockGetRelayIDExpectation
- type OutboundMockGetRelayIDResults
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualOutboundEndpoints ¶
func ShortNodeIDAsByteString ¶
func ShortNodeIDAsByteString(nodeID node.ShortNodeID) string
Types ¶
type Inbound ¶
type Inbound interface { GetNameAddress() Name // GetIPAddress() packets.IPAddress // TODO GetTransportKey() cryptkit.SigningKeyHolder GetTransportCert() cryptkit.CertificateHolder AsByteString() longbits.ByteString }
type InboundConnection ¶
type InboundConnection struct { Addr Name Key cryptkit.SigningKeyHolder Cert cryptkit.CertificateHolder }
func NewHostIdentityFromHolder ¶
func NewHostIdentityFromHolder(h Inbound) InboundConnection
func (*InboundConnection) AsByteString ¶
func (v *InboundConnection) AsByteString() longbits.ByteString
func (*InboundConnection) GetNameAddress ¶
func (v *InboundConnection) GetNameAddress() Name
func (*InboundConnection) GetTransportCert ¶
func (v *InboundConnection) GetTransportCert() cryptkit.CertificateHolder
func (*InboundConnection) GetTransportKey ¶
func (v *InboundConnection) GetTransportKey() cryptkit.SigningKeyHolder
func (InboundConnection) String ¶
func (v InboundConnection) String() string
type InboundMock ¶
type InboundMock struct { AsByteStringMock mInboundMockAsByteString GetNameAddressMock mInboundMockGetNameAddress GetTransportCertMock mInboundMockGetTransportCert GetTransportKeyMock mInboundMockGetTransportKey // contains filtered or unexported fields }
InboundMock implements Inbound
func NewInboundMock ¶
func NewInboundMock(t minimock.Tester) *InboundMock
NewInboundMock returns a mock for Inbound
func (*InboundMock) AsByteString ¶
func (mmAsByteString *InboundMock) AsByteString() (b1 longbits.ByteString)
AsByteString implements Inbound
func (*InboundMock) AsByteStringAfterCounter ¶
func (mmAsByteString *InboundMock) AsByteStringAfterCounter() uint64
AsByteStringAfterCounter returns a count of finished InboundMock.AsByteString invocations
func (*InboundMock) AsByteStringBeforeCounter ¶
func (mmAsByteString *InboundMock) AsByteStringBeforeCounter() uint64
AsByteStringBeforeCounter returns a count of InboundMock.AsByteString invocations
func (*InboundMock) GetNameAddress ¶
func (mmGetNameAddress *InboundMock) GetNameAddress() (n1 Name)
GetNameAddress implements Inbound
func (*InboundMock) GetNameAddressAfterCounter ¶
func (mmGetNameAddress *InboundMock) GetNameAddressAfterCounter() uint64
GetNameAddressAfterCounter returns a count of finished InboundMock.GetNameAddress invocations
func (*InboundMock) GetNameAddressBeforeCounter ¶
func (mmGetNameAddress *InboundMock) GetNameAddressBeforeCounter() uint64
GetNameAddressBeforeCounter returns a count of InboundMock.GetNameAddress invocations
func (*InboundMock) GetTransportCert ¶
func (mmGetTransportCert *InboundMock) GetTransportCert() (c1 cryptkit.CertificateHolder)
GetTransportCert implements Inbound
func (*InboundMock) GetTransportCertAfterCounter ¶
func (mmGetTransportCert *InboundMock) GetTransportCertAfterCounter() uint64
GetTransportCertAfterCounter returns a count of finished InboundMock.GetTransportCert invocations
func (*InboundMock) GetTransportCertBeforeCounter ¶
func (mmGetTransportCert *InboundMock) GetTransportCertBeforeCounter() uint64
GetTransportCertBeforeCounter returns a count of InboundMock.GetTransportCert invocations
func (*InboundMock) GetTransportKey ¶
func (mmGetTransportKey *InboundMock) GetTransportKey() (s1 cryptkit.SigningKeyHolder)
GetTransportKey implements Inbound
func (*InboundMock) GetTransportKeyAfterCounter ¶
func (mmGetTransportKey *InboundMock) GetTransportKeyAfterCounter() uint64
GetTransportKeyAfterCounter returns a count of finished InboundMock.GetTransportKey invocations
func (*InboundMock) GetTransportKeyBeforeCounter ¶
func (mmGetTransportKey *InboundMock) GetTransportKeyBeforeCounter() uint64
GetTransportKeyBeforeCounter returns a count of InboundMock.GetTransportKey invocations
func (*InboundMock) MinimockAsByteStringDone ¶
func (m *InboundMock) MinimockAsByteStringDone() bool
MinimockAsByteStringDone returns true if the count of the AsByteString invocations corresponds the number of defined expectations
func (*InboundMock) MinimockAsByteStringInspect ¶
func (m *InboundMock) MinimockAsByteStringInspect()
MinimockAsByteStringInspect logs each unmet expectation
func (*InboundMock) MinimockFinish ¶
func (m *InboundMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*InboundMock) MinimockGetNameAddressDone ¶
func (m *InboundMock) MinimockGetNameAddressDone() bool
MinimockGetNameAddressDone returns true if the count of the GetNameAddress invocations corresponds the number of defined expectations
func (*InboundMock) MinimockGetNameAddressInspect ¶
func (m *InboundMock) MinimockGetNameAddressInspect()
MinimockGetNameAddressInspect logs each unmet expectation
func (*InboundMock) MinimockGetTransportCertDone ¶
func (m *InboundMock) MinimockGetTransportCertDone() bool
MinimockGetTransportCertDone returns true if the count of the GetTransportCert invocations corresponds the number of defined expectations
func (*InboundMock) MinimockGetTransportCertInspect ¶
func (m *InboundMock) MinimockGetTransportCertInspect()
MinimockGetTransportCertInspect logs each unmet expectation
func (*InboundMock) MinimockGetTransportKeyDone ¶
func (m *InboundMock) MinimockGetTransportKeyDone() bool
MinimockGetTransportKeyDone returns true if the count of the GetTransportKey invocations corresponds the number of defined expectations
func (*InboundMock) MinimockGetTransportKeyInspect ¶
func (m *InboundMock) MinimockGetTransportKeyInspect()
MinimockGetTransportKeyInspect logs each unmet expectation
func (*InboundMock) MinimockWait ¶
func (m *InboundMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
type InboundMockAsByteStringExpectation ¶
type InboundMockAsByteStringExpectation struct { Counter uint64 // contains filtered or unexported fields }
InboundMockAsByteStringExpectation specifies expectation struct of the Inbound.AsByteString
type InboundMockAsByteStringResults ¶
type InboundMockAsByteStringResults struct {
// contains filtered or unexported fields
}
InboundMockAsByteStringResults contains results of the Inbound.AsByteString
type InboundMockGetNameAddressExpectation ¶
type InboundMockGetNameAddressExpectation struct { Counter uint64 // contains filtered or unexported fields }
InboundMockGetNameAddressExpectation specifies expectation struct of the Inbound.GetNameAddress
type InboundMockGetNameAddressResults ¶
type InboundMockGetNameAddressResults struct {
// contains filtered or unexported fields
}
InboundMockGetNameAddressResults contains results of the Inbound.GetNameAddress
type InboundMockGetTransportCertExpectation ¶
type InboundMockGetTransportCertExpectation struct { Counter uint64 // contains filtered or unexported fields }
InboundMockGetTransportCertExpectation specifies expectation struct of the Inbound.GetTransportCert
type InboundMockGetTransportCertResults ¶
type InboundMockGetTransportCertResults struct {
// contains filtered or unexported fields
}
InboundMockGetTransportCertResults contains results of the Inbound.GetTransportCert
type InboundMockGetTransportKeyExpectation ¶
type InboundMockGetTransportKeyExpectation struct { Counter uint64 // contains filtered or unexported fields }
InboundMockGetTransportKeyExpectation specifies expectation struct of the Inbound.GetTransportKey
type InboundMockGetTransportKeyResults ¶
type InboundMockGetTransportKeyResults struct {
// contains filtered or unexported fields
}
InboundMockGetTransportKeyResults contains results of the Inbound.GetTransportKey
type NodeEndpointType ¶
type NodeEndpointType uint8
const ( IPEndpoint NodeEndpointType = iota NameEndpoint RelayEndpoint )
type Outbound ¶
type Outbound interface { GetEndpointType() NodeEndpointType GetRelayID() node.ShortNodeID GetNameAddress() Name GetIPAddress() IPAddress CanAccept(connection Inbound) bool }
type OutboundMock ¶
type OutboundMock struct { CanAcceptMock mOutboundMockCanAccept GetEndpointTypeMock mOutboundMockGetEndpointType GetIPAddressMock mOutboundMockGetIPAddress GetNameAddressMock mOutboundMockGetNameAddress GetRelayIDMock mOutboundMockGetRelayID // contains filtered or unexported fields }
OutboundMock implements Outbound
func NewOutboundMock ¶
func NewOutboundMock(t minimock.Tester) *OutboundMock
NewOutboundMock returns a mock for Outbound
func (*OutboundMock) CanAccept ¶
func (mmCanAccept *OutboundMock) CanAccept(connection Inbound) (b1 bool)
CanAccept implements Outbound
func (*OutboundMock) CanAcceptAfterCounter ¶
func (mmCanAccept *OutboundMock) CanAcceptAfterCounter() uint64
CanAcceptAfterCounter returns a count of finished OutboundMock.CanAccept invocations
func (*OutboundMock) CanAcceptBeforeCounter ¶
func (mmCanAccept *OutboundMock) CanAcceptBeforeCounter() uint64
CanAcceptBeforeCounter returns a count of OutboundMock.CanAccept invocations
func (*OutboundMock) GetEndpointType ¶
func (mmGetEndpointType *OutboundMock) GetEndpointType() (n1 NodeEndpointType)
GetEndpointType implements Outbound
func (*OutboundMock) GetEndpointTypeAfterCounter ¶
func (mmGetEndpointType *OutboundMock) GetEndpointTypeAfterCounter() uint64
GetEndpointTypeAfterCounter returns a count of finished OutboundMock.GetEndpointType invocations
func (*OutboundMock) GetEndpointTypeBeforeCounter ¶
func (mmGetEndpointType *OutboundMock) GetEndpointTypeBeforeCounter() uint64
GetEndpointTypeBeforeCounter returns a count of OutboundMock.GetEndpointType invocations
func (*OutboundMock) GetIPAddress ¶
func (mmGetIPAddress *OutboundMock) GetIPAddress() (i1 IPAddress)
GetIPAddress implements Outbound
func (*OutboundMock) GetIPAddressAfterCounter ¶
func (mmGetIPAddress *OutboundMock) GetIPAddressAfterCounter() uint64
GetIPAddressAfterCounter returns a count of finished OutboundMock.GetIPAddress invocations
func (*OutboundMock) GetIPAddressBeforeCounter ¶
func (mmGetIPAddress *OutboundMock) GetIPAddressBeforeCounter() uint64
GetIPAddressBeforeCounter returns a count of OutboundMock.GetIPAddress invocations
func (*OutboundMock) GetNameAddress ¶
func (mmGetNameAddress *OutboundMock) GetNameAddress() (n1 Name)
GetNameAddress implements Outbound
func (*OutboundMock) GetNameAddressAfterCounter ¶
func (mmGetNameAddress *OutboundMock) GetNameAddressAfterCounter() uint64
GetNameAddressAfterCounter returns a count of finished OutboundMock.GetNameAddress invocations
func (*OutboundMock) GetNameAddressBeforeCounter ¶
func (mmGetNameAddress *OutboundMock) GetNameAddressBeforeCounter() uint64
GetNameAddressBeforeCounter returns a count of OutboundMock.GetNameAddress invocations
func (*OutboundMock) GetRelayID ¶
func (mmGetRelayID *OutboundMock) GetRelayID() (s1 node.ShortNodeID)
GetRelayID implements Outbound
func (*OutboundMock) GetRelayIDAfterCounter ¶
func (mmGetRelayID *OutboundMock) GetRelayIDAfterCounter() uint64
GetRelayIDAfterCounter returns a count of finished OutboundMock.GetRelayID invocations
func (*OutboundMock) GetRelayIDBeforeCounter ¶
func (mmGetRelayID *OutboundMock) GetRelayIDBeforeCounter() uint64
GetRelayIDBeforeCounter returns a count of OutboundMock.GetRelayID invocations
func (*OutboundMock) MinimockCanAcceptDone ¶
func (m *OutboundMock) MinimockCanAcceptDone() bool
MinimockCanAcceptDone returns true if the count of the CanAccept invocations corresponds the number of defined expectations
func (*OutboundMock) MinimockCanAcceptInspect ¶
func (m *OutboundMock) MinimockCanAcceptInspect()
MinimockCanAcceptInspect logs each unmet expectation
func (*OutboundMock) MinimockFinish ¶
func (m *OutboundMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*OutboundMock) MinimockGetEndpointTypeDone ¶
func (m *OutboundMock) MinimockGetEndpointTypeDone() bool
MinimockGetEndpointTypeDone returns true if the count of the GetEndpointType invocations corresponds the number of defined expectations
func (*OutboundMock) MinimockGetEndpointTypeInspect ¶
func (m *OutboundMock) MinimockGetEndpointTypeInspect()
MinimockGetEndpointTypeInspect logs each unmet expectation
func (*OutboundMock) MinimockGetIPAddressDone ¶
func (m *OutboundMock) MinimockGetIPAddressDone() bool
MinimockGetIPAddressDone returns true if the count of the GetIPAddress invocations corresponds the number of defined expectations
func (*OutboundMock) MinimockGetIPAddressInspect ¶
func (m *OutboundMock) MinimockGetIPAddressInspect()
MinimockGetIPAddressInspect logs each unmet expectation
func (*OutboundMock) MinimockGetNameAddressDone ¶
func (m *OutboundMock) MinimockGetNameAddressDone() bool
MinimockGetNameAddressDone returns true if the count of the GetNameAddress invocations corresponds the number of defined expectations
func (*OutboundMock) MinimockGetNameAddressInspect ¶
func (m *OutboundMock) MinimockGetNameAddressInspect()
MinimockGetNameAddressInspect logs each unmet expectation
func (*OutboundMock) MinimockGetRelayIDDone ¶
func (m *OutboundMock) MinimockGetRelayIDDone() bool
MinimockGetRelayIDDone returns true if the count of the GetRelayID invocations corresponds the number of defined expectations
func (*OutboundMock) MinimockGetRelayIDInspect ¶
func (m *OutboundMock) MinimockGetRelayIDInspect()
MinimockGetRelayIDInspect logs each unmet expectation
func (*OutboundMock) MinimockWait ¶
func (m *OutboundMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
type OutboundMockCanAcceptExpectation ¶
type OutboundMockCanAcceptExpectation struct { Counter uint64 // contains filtered or unexported fields }
OutboundMockCanAcceptExpectation specifies expectation struct of the Outbound.CanAccept
func (*OutboundMockCanAcceptExpectation) Then ¶
func (e *OutboundMockCanAcceptExpectation) Then(b1 bool) *OutboundMock
Then sets up Outbound.CanAccept return parameters for the expectation previously defined by the When method
type OutboundMockCanAcceptParams ¶
type OutboundMockCanAcceptParams struct {
// contains filtered or unexported fields
}
OutboundMockCanAcceptParams contains parameters of the Outbound.CanAccept
type OutboundMockCanAcceptResults ¶
type OutboundMockCanAcceptResults struct {
// contains filtered or unexported fields
}
OutboundMockCanAcceptResults contains results of the Outbound.CanAccept
type OutboundMockGetEndpointTypeExpectation ¶
type OutboundMockGetEndpointTypeExpectation struct { Counter uint64 // contains filtered or unexported fields }
OutboundMockGetEndpointTypeExpectation specifies expectation struct of the Outbound.GetEndpointType
type OutboundMockGetEndpointTypeResults ¶
type OutboundMockGetEndpointTypeResults struct {
// contains filtered or unexported fields
}
OutboundMockGetEndpointTypeResults contains results of the Outbound.GetEndpointType
type OutboundMockGetIPAddressExpectation ¶
type OutboundMockGetIPAddressExpectation struct { Counter uint64 // contains filtered or unexported fields }
OutboundMockGetIPAddressExpectation specifies expectation struct of the Outbound.GetIPAddress
type OutboundMockGetIPAddressResults ¶
type OutboundMockGetIPAddressResults struct {
// contains filtered or unexported fields
}
OutboundMockGetIPAddressResults contains results of the Outbound.GetIPAddress
type OutboundMockGetNameAddressExpectation ¶
type OutboundMockGetNameAddressExpectation struct { Counter uint64 // contains filtered or unexported fields }
OutboundMockGetNameAddressExpectation specifies expectation struct of the Outbound.GetNameAddress
type OutboundMockGetNameAddressResults ¶
type OutboundMockGetNameAddressResults struct {
// contains filtered or unexported fields
}
OutboundMockGetNameAddressResults contains results of the Outbound.GetNameAddress
type OutboundMockGetRelayIDExpectation ¶
type OutboundMockGetRelayIDExpectation struct { Counter uint64 // contains filtered or unexported fields }
OutboundMockGetRelayIDExpectation specifies expectation struct of the Outbound.GetRelayID
type OutboundMockGetRelayIDResults ¶
type OutboundMockGetRelayIDResults struct {
// contains filtered or unexported fields
}
OutboundMockGetRelayIDResults contains results of the Outbound.GetRelayID