minio

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*minio.Client
	// contains filtered or unexported fields
}

func NewMinio

func NewMinio(cfg Config) (Client, error)

nolint:mnd

func (Client) HealthCheck

func (m Client) HealthCheck(ctx context.Context) error

func (Client) PutObject

func (m Client) PutObject(
	ctx context.Context,
	bucketName string,
	objectName string,
	reader io.Reader,
	objectSize int64,
	opts minio.PutObjectOptions,
) (minio.UploadInfo, error)

type Config

type Config struct {
	Endpoint          string       `schema:"Endpoint minio кластера без указания схемы" validate:"required"`
	Credentials       *Credentials `schema:"Данные для авторизации" yamlschema:"secret"`
	Secure            bool         `schema:"Использовать https или нет"`
	UploadFileThreads uint         `schema:"Максимальное количество потоков для загрузки файла"`
}

type Credentials

type Credentials struct {
	Id     string `schema:"Логин" yamlschema:"secret"`
	Secret string `schema:"Пароль" yamlschema:"secret"`
	Token  string `schema:"Токен" yamlschema:"secret"`
}

Jump to

Keyboard shortcuts

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