Documentation ¶
Index ¶
- func TmpDirFile(size int64) (dir string, fn string, err kv.Error)
- type MinioCfgJson
- type MinioTestServer
- func (mts *MinioTestServer) IsAlive(ctx context.Context) (alive bool, err kv.Error)
- func (mts *MinioTestServer) RemoveBucketAll(bucket string) (errs []kv.Error)
- func (mts *MinioTestServer) SetPublic(bucket string) (err kv.Error)
- func (mts *MinioTestServer) Upload(bucket string, key string, file string) (err kv.Error)
- func (mts *MinioTestServer) UploadTestFile(bucket string, key string, size int64) (err kv.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MinioCfgJson ¶
type MinioCfgJson struct { Version string `json:"version"` Credential struct { AccessKey string `json:"accessKey"` SecretKey string `json:"secretKey"` } `json:"credential"` Region string `json:"region"` Browser string `json:"browser"` Worm string `json:"worm"` Domain string `json:"domain"` Storageclass struct { Standard string `json:"standard"` Rrs string `json:"rrs"` } `json:"storageclass"` Cache struct { Drives []interface{} `json:"drives"` Expiry int `json:"expiry"` Maxuse int `json:"maxuse"` Exclude []interface{} `json:"exclude"` } `json:"cache"` }
MinioCfgJson stores configuration information to be written to a disk based configuration file prior to starting a test minio instance
type MinioTestServer ¶
type MinioTestServer struct { AccessKeyId string SecretAccessKeyId string Address string Client *minio.Client Ready atomic.Bool ProcessState *os.ProcessState }
MinioTestServer encapsulates all of the data needed to run a test minio server instance
func InitTestingMinio ¶
func InitTestingMinio(ctx context.Context, retainWorkingDirs bool) (mts *MinioTestServer, errC chan kv.Error)
InitTestingMinio will fork a minio server that can he used for staging and test in a manner that also wraps an error reporting channel and a means of stopping it
func NewMinioTest ¶
func NewMinioTest() (minioTest *MinioTestServer)
func (*MinioTestServer) IsAlive ¶
IsAlive is used to test if the expected minio local test server is alive
func (*MinioTestServer) RemoveBucketAll ¶
func (mts *MinioTestServer) RemoveBucketAll(bucket string) (errs []kv.Error)
RemoveBucketAll empties the identified bucket on the minio test server identified by the mtx receiver variable
func (*MinioTestServer) SetPublic ¶
func (mts *MinioTestServer) SetPublic(bucket string) (err kv.Error)
SetPublic can be used to enable public access to a bucket
func (*MinioTestServer) Upload ¶
Upload will take the nominated file, file parameter, and will upload it to the bucket and key pair on the server identified by the mtx receiver variable
func (*MinioTestServer) UploadTestFile ¶
UploadTestFile will create and upload a file of a given size to the MinioTest server to allow test cases to exercise functionality based on S3