github.com/ethersphere/bee/v2@v2.2.0/pkg/postage/mock/stamper.go (about)

     1  // Copyright 2020 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 mock
     6  
     7  import (
     8  	"github.com/ethersphere/bee/v2/pkg/postage"
     9  	"github.com/ethersphere/bee/v2/pkg/swarm"
    10  )
    11  
    12  type mockStamper struct{}
    13  
    14  // NewStamper returns anew new mock stamper.
    15  func NewStamper() postage.Stamper {
    16  	return &mockStamper{}
    17  }
    18  
    19  // Stamp implements the Stamper interface. It returns an empty postage stamp.
    20  func (mockStamper) Stamp(_ swarm.Address) (*postage.Stamp, error) {
    21  	return &postage.Stamp{}, nil
    22  }