miniox

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClientIsNotInitialized = errors.New("client is not initialized")
	ErrMinioOffline           = errors.New("minio offline")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(logger log.Logger) *Client

func (*Client) Client

func (c *Client) Client() (*minio.Client, error)

func (*Client) Healthcheck added in v1.9.2

func (c *Client) Healthcheck(_ context.Context) error

func (*Client) Upgrade

func (c *Client) Upgrade(ctx context.Context, cfg Config, opts ...Option) error

type Config

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

type Credentials

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

type Option

type Option func(opt *minio.Options)

func OptionsFromConfig

func OptionsFromConfig(cfg Config) []Option

func WithCredentials

func WithCredentials(creds *credentials.Credentials) Option

func WithSecure

func WithSecure(secure bool) Option

func WithTransport

func WithTransport(transport http.RoundTripper) Option

Jump to

Keyboard shortcuts

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