Documentation ¶
Overview ¶
Package mock uses mocked structures to filter out non-essential data to clarify testing. These mocked types are not valid data, and can only be used during testing where data is unvalidated.
Index ¶
Constants ¶
View Source
const ( TypeReply fields.NodeType = fields.NodeTypeReply TypeIdentity fields.NodeType = fields.NodeTypeIdentity TypeCommunity fields.NodeType = fields.NodeTypeCommunity )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID string
ID mocks out `fields.QualifiedHash`.
func FromQualifiedHash ¶
func FromQualifiedHash(h *fields.QualifiedHash) ID
func (ID) IntoQualifiedHash ¶
func (id ID) IntoQualifiedHash() *fields.QualifiedHash
type IDs ¶
type IDs []ID
func FromQualifiedHashList ¶
func FromQualifiedHashList(hashes []*fields.QualifiedHash) (list IDs)
func (IDs) IntoQualifiedHashList ¶
func (list IDs) IntoQualifiedHashList() (hashes []*fields.QualifiedHash)
type Nodes ¶
type Nodes []Node
Nodes is a list of mock nodes that can resolve to a list of non-validated `forest.Reply`.
func FromReplies ¶
func FromReplies(src []forest.Reply) (list Nodes)
func (Nodes) IntoReplies ¶
func (list Nodes) IntoReplies() []forest.Reply
Click to show internal directories.
Click to hide internal directories.