minio

package
v1.28.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package minio contains all the require functions to setup a MinIO deployment and query this MinIO deployment using the MinIO API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanFiles

func CleanFiles(minioEnv *Env, path string) (string, error)

CleanFiles clean files on minio for a given path

func CountFiles

func CountFiles(minioEnv *Env, path string) (value int, err error)

CountFiles uses the minioClient in the given `namespace` to count the amount of files matching the given `path`

func Deploy

func Deploy(minioEnv *Env, env *environment.TestingEnvironment) (*corev1.Pod, error)

Deploy will create a full MinIO deployment defined inthe minioEnv variable

func GetFilePath

func GetFilePath(serverName, fileName string) string

GetFilePath gets the MinIO file string for WAL/backup objects in a configured bucket

func ListFiles

func ListFiles(minioEnv *Env, path string) (string, error)

ListFiles uses the minioClient in the given `namespace` to list the paths matching the given `path`

func TestBarmanConnectivity added in v1.25.4

func TestBarmanConnectivity(
	namespace,
	clusterName,
	primaryPodName,
	minioID,
	minioKey string,
	minioSvcName string,
) (bool, error)

TestBarmanConnectivity validates the barman connectivity to the minio endpoint

Types

type Env

type Env struct {
	Client       *corev1.Pod
	CaPair       *certs.KeyPair
	CaSecretObj  corev1.Secret
	ServiceName  string
	Namespace    string
	CaSecretName string
	TLSSecret    string
	Timeout      uint
}

Env contains all the information related or required by MinIO deployment and used by the functions on every test

func (*Env) CreateCaSecret

func (m *Env) CreateCaSecret(env *environment.TestingEnvironment, namespace string) error

CreateCaSecret creates the certificates required to authenticate against the MinIO service

type Setup

type Setup struct {
	PersistentVolumeClaim corev1.PersistentVolumeClaim
	Deployment            appsv1.Deployment
	Service               corev1.Service
}

Setup contains the resources needed for a working minio server deployment: a PersistentVolumeClaim, a Deployment and a Service

type TagSet

type TagSet struct {
	Tags map[string]string `json:"tagset"`
}

TagSet will contain the `tagset` section of the minio output command

func GetFileTags

func GetFileTags(minioEnv *Env, path string) (TagSet, error)

GetFileTags will use the minioClient to retrieve the tags in a specified path

Jump to

Keyboard shortcuts

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