github.com/ethersphere/bee/v2@v2.2.0/pkg/storer/internal/chunkstamp/export_test.go (about)

     1  // Copyright 2023 The Swarm Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package chunkstamp
     6  
     7  import "github.com/ethersphere/bee/v2/pkg/swarm"
     8  
     9  func (i *Item) WithNamespace(ns string) *Item {
    10  	i.scope = []byte(ns)
    11  	return i
    12  }
    13  
    14  func (i *Item) WithAddress(addr swarm.Address) *Item {
    15  	i.address = addr
    16  	return i
    17  }
    18  
    19  func (i *Item) WithStamp(stamp swarm.Stamp) *Item {
    20  	i.stamp = stamp
    21  	return i
    22  }
    23  
    24  var (
    25  	ErrMarshalInvalidChunkStampItemNamespace = errMarshalInvalidChunkStampItemScope
    26  	ErrMarshalInvalidChunkStampItemAddress   = errMarshalInvalidChunkStampItemAddress
    27  	ErrUnmarshalInvalidChunkStampItemAddress = errUnmarshalInvalidChunkStampItemAddress
    28  	ErrMarshalInvalidChunkStampItemStamp     = errMarshalInvalidChunkStampItemStamp
    29  	ErrUnmarshalInvalidChunkStampItemSize    = errUnmarshalInvalidChunkStampItemSize
    30  )