miniod

package
v0.0.0-...-4df9163 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdminClient

func NewAdminClient(url string, username string, password string) (*minioAdmin, error)

NewAdminClient returns a new AdminClient, and assigns the given credentials to an alias, and returns an `mc` client for that alias.

func StopAll

func StopAll()

StopAll stops all MinIO processes cleanly.

Types

type AccountInfo

type AccountInfo struct {
	ParentUser    string          `json:"parentUser"`
	AccountStatus string          `json:"accountStatus"`
	ImpliedPolicy bool            `json:"impliedPolicy"`
	Policy        json.RawMessage `json:"policy"`
}

AccountInfo is the response body of the info service account call.

type Credentials

type Credentials struct {
	AccessKey    string    `xml:"AccessKeyId"     json:"accessKey"`
	SecretKey    string    `xml:"SecretAccessKey" json:"secretKey"`
	SessionToken string    `xml:"SessionToken"    json:"sessionToken"`
	Expiration   time.Time `xml:"Expiration"      json:"expiration"`
}

Credentials holds access and secret keys.

type Process

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

Process represents a running minio process.

func EnsureRunning

func EnsureRunning(s *state.State, bucketVol storageDrivers.Volume) (*Process, error)

EnsureRunning starts a MinIO process for the bucket (if not already running) and returns running Process.

func Get

func Get(bucketName string) (*Process, error)

Get returns an existing MinIO process if it exists.

func (*Process) AdminClient

func (p *Process) AdminClient() (*minioAdmin, error)

AdminClient returns admin client for the minio process.

func (*Process) AdminUser

func (p *Process) AdminUser() string

AdminUser returns admin user name.

func (*Process) S3Client

func (p *Process) S3Client() (*minio.Client, error)

S3Client returns S3 client for the minio process.

func (*Process) Stop

func (p *Process) Stop(ctx context.Context) error

Stop will try and cleanly stop the service and if context is cancelled then it forcefully kills the process. If ctx doesn't have a deadline then a default timeout of 5s is added.

func (*Process) URL

func (p *Process) URL() url.URL

URL of MinIO process.

func (*Process) WaitReady

func (p *Process) WaitReady(ctx context.Context) error

WaitReady waits until process is ready.

type ServiceAccountArgs

type ServiceAccountArgs struct {
	Policy    json.RawMessage `json:"policy"` // Parsed value from iam/policy.Parse()
	AccessKey string          `json:"accessKey"`
	SecretKey string          `json:"secretKey"`
}

ServiceAccountArgs is the request options for adding or modifying a service account.

Jump to

Keyboard shortcuts

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