github.com/ethersphere/bee/v2@v2.2.0/pkg/api/export_test.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 api
     6  
     7  import (
     8  	"github.com/ethersphere/bee/v2/pkg/log"
     9  	"github.com/ethersphere/bee/v2/pkg/swarm"
    10  )
    11  
    12  type (
    13  	BytesPostResponse     = bytesPostResponse
    14  	ChunkAddressResponse  = chunkAddressResponse
    15  	SocPostResponse       = socPostResponse
    16  	FeedReferenceResponse = feedReferenceResponse
    17  	BzzUploadResponse     = bzzUploadResponse
    18  	TagRequest            = tagRequest
    19  	ListTagsResponse      = listTagsResponse
    20  	IsRetrievableResponse = isRetrievableResponse
    21  )
    22  
    23  var (
    24  	InvalidContentType  = errInvalidContentType
    25  	InvalidRequest      = errInvalidRequest
    26  	DirectoryStoreError = errDirectoryStore
    27  	EmptyDir            = errEmptyDir
    28  )
    29  
    30  var (
    31  	ContentTypeTar = contentTypeTar
    32  )
    33  
    34  var (
    35  	ErrNoResolver                       = errNoResolver
    36  	ErrInvalidNameOrAddress             = errInvalidNameOrAddress
    37  	ErrUnsupportedDevNodeOperation      = errUnsupportedDevNodeOperation
    38  	ErrOperationSupportedOnlyInFullMode = errOperationSupportedOnlyInFullMode
    39  	ErrActDownload                      = errActDownload
    40  	ErrActUpload                        = errActUpload
    41  )
    42  
    43  var (
    44  	FeedMetadataEntryOwner = feedMetadataEntryOwner
    45  	FeedMetadataEntryTopic = feedMetadataEntryTopic
    46  	FeedMetadataEntryType  = feedMetadataEntryType
    47  
    48  	SuccessWsMsg = successWsMsg
    49  )
    50  
    51  var (
    52  	FileSizeBucketsKBytes = fileSizeBucketsKBytes
    53  	ToFileSizeBucket      = toFileSizeBucket
    54  )
    55  
    56  func (s *Service) ResolveNameOrAddress(str string) (swarm.Address, error) {
    57  	return s.resolveNameOrAddress(str)
    58  }
    59  
    60  type (
    61  	HealthStatusResponse              = healthStatusResponse
    62  	NodeResponse                      = nodeResponse
    63  	PingpongResponse                  = pingpongResponse
    64  	PeerConnectResponse               = peerConnectResponse
    65  	PeersResponse                     = peersResponse
    66  	BlockedListedPeersResponse        = blockListedPeersResponse
    67  	AddressesResponse                 = addressesResponse
    68  	WelcomeMessageRequest             = welcomeMessageRequest
    69  	WelcomeMessageResponse            = welcomeMessageResponse
    70  	BalancesResponse                  = balancesResponse
    71  	PeerDataResponse                  = peerDataResponse
    72  	PeerData                          = peerData
    73  	BalanceResponse                   = balanceResponse
    74  	SettlementResponse                = settlementResponse
    75  	SettlementsResponse               = settlementsResponse
    76  	ChequebookBalanceResponse         = chequebookBalanceResponse
    77  	ChequebookAddressResponse         = chequebookAddressResponse
    78  	ChequebookLastChequePeerResponse  = chequebookLastChequePeerResponse
    79  	ChequebookLastChequesResponse     = chequebookLastChequesResponse
    80  	ChequebookLastChequesPeerResponse = chequebookLastChequesPeerResponse
    81  	ChequebookTxResponse              = chequebookTxResponse
    82  	SwapCashoutResponse               = swapCashoutResponse
    83  	SwapCashoutStatusResponse         = swapCashoutStatusResponse
    84  	SwapCashoutStatusResult           = swapCashoutStatusResult
    85  	TransactionInfo                   = transactionInfo
    86  	TransactionPendingList            = transactionPendingList
    87  	TransactionHashResponse           = transactionHashResponse
    88  	TagResponse                       = tagResponse
    89  	ReserveStateResponse              = reserveStateResponse
    90  	ChainStateResponse                = chainStateResponse
    91  	PostageCreateResponse             = postageCreateResponse
    92  	PostageStampResponse              = postageStampResponse
    93  	PostageStampsResponse             = postageStampsResponse
    94  	PostageBatchResponse              = postageBatchResponse
    95  	PostageStampBucketsResponse       = postageStampBucketsResponse
    96  	BucketData                        = bucketData
    97  	WalletResponse                    = walletResponse
    98  	WalletTxResponse                  = walletTxResponse
    99  	GetStakeResponse                  = getStakeResponse
   100  	GetWithdrawableResponse           = getWithdrawableResponse
   101  	StakeTransactionReponse           = stakeTransactionReponse
   102  	StatusSnapshotResponse            = statusSnapshotResponse
   103  	StatusResponse                    = statusResponse
   104  )
   105  
   106  var (
   107  	ErrCantBalance           = errCantBalance
   108  	ErrCantBalances          = errCantBalances
   109  	HttpErrGetAccountingInfo = httpErrGetAccountingInfo
   110  	ErrNoBalance             = errNoBalance
   111  	ErrCantSettlementsPeer   = errCantSettlementsPeer
   112  	ErrCantSettlements       = errCantSettlements
   113  	ErrChequebookBalance     = errChequebookBalance
   114  	ErrInvalidAddress        = errInvalidAddress
   115  	ErrUnknownTransaction    = errUnknownTransaction
   116  	ErrCantGetTransaction    = errCantGetTransaction
   117  	ErrCantResendTransaction = errCantResendTransaction
   118  	ErrAlreadyImported       = errAlreadyImported
   119  )
   120  
   121  type (
   122  	LogRegistryIterateFn   func(fn func(string, string, log.Level, uint) bool)
   123  	LogSetVerbosityByExpFn func(e string, v log.Level) error
   124  )
   125  
   126  var (
   127  	LogRegistryIterate   = logRegistryIterate
   128  	LogSetVerbosityByExp = logSetVerbosityByExp
   129  )
   130  
   131  func ReplaceLogRegistryIterateFn(fn LogRegistryIterateFn)   { logRegistryIterate = fn }
   132  func ReplaceLogSetVerbosityByExp(fn LogSetVerbosityByExpFn) { logSetVerbosityByExp = fn }
   133  
   134  var ErrHexLength = errHexLength
   135  
   136  type HexInvalidByteError = hexInvalidByteError
   137  
   138  func MapStructure(input, output interface{}, hooks map[string]func(v string) (string, error)) error {
   139  	return mapStructure(input, output, hooks)
   140  }
   141  func NewParseError(entry, value string, cause error) error {
   142  	return newParseError(entry, value, cause)
   143  }