basesuite

package
v0.0.0-...-8ade5a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2023 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	KM            keys.KeyManager
	Addr          types.AccAddress
	PrimarySPAddr string
	SDKClient     sdkClient.IClient
	Ctx           context.Context
	Secret        string
}

func NewAccount

func NewAccount(greenfieldEndpoint, chainId, spAddress, secret string) *Account

func (*Account) CreateAndUploadObject

func (a *Account) CreateAndUploadObject(bucketName, objectName string, fileSize uint64, visibility storageTypes.VisibilityType) error

func (*Account) CreateBucket

func (a *Account) CreateBucket(bucketName string, opts *sdkTypes.CreateBucketOptions) (string, error)

func (*Account) CreateObjectAllSize

func (a *Account) CreateObjectAllSize(bucketName, objectName string, fileSize uint64, opts *sdkTypes.CreateObjectOptions) (*storageTypes.ObjectInfo, string, *utils.File, error)

func (*Account) GetObject

func (a *Account) GetObject(bucketName, objectName string) (io.ReadCloser, sdkTypes.ObjectStat, error)

func (*Account) IsObjectSealed

func (a *Account) IsObjectSealed(bucketName, objectName string) *storageTypes.ObjectInfo

func (*Account) PutObject

func (a *Account) PutObject(bucketName, objectName, createObjectTx string, file utils.File, opts *sdkTypes.PutObjectOptions) error

func (*Account) SelectSP

func (a *Account) SelectSP(primarySPAddr string) (*spTypes.StorageProvider, error)

type BaseSuite

type BaseSuite struct {
	RootAcc     *Account
	TestAcc     *Account
	SPInfo      *spTypes.StorageProvider
	TestResults []Output
}

func (*BaseSuite) InitAccountsBNBBalance

func (s *BaseSuite) InitAccountsBNBBalance(accounts []*Account, amount int64)

func (*BaseSuite) NewOutput

func (s *BaseSuite) NewOutput(name string, err error, beginTime time.Time)

func (*BaseSuite) PrintTestResult

func (s *BaseSuite) PrintTestResult()

func (*BaseSuite) SetupSuite

func (s *BaseSuite) SetupSuite()

type Output

type Output struct {
	Name string
	Time time.Duration
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL