minio

package
v0.0.0-...-34ec42c Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package minio contains implementation details for handling interactions with a minio object storage cluster

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(config Config, log logger.Logger) (storage.StorageClient, error)

NewClient creates a new Minio Storage Client

func ReadOnlyPolicyJson

func ReadOnlyPolicyJson(bucket string) string

ReadOnlyPolicyJson returns the policy JSON setting for a bucket

Types

type Config

type Config struct {
	// PublicUrl is the public URL that is used as a base URL for public documents/images etc
	PublicUrl string

	// Endpoint is the Minio Host
	Endpoint string

	// AccessKeyID is the access key ID
	AccessKeyID string

	// SecretAccessKey is the secret access key
	SecretAccessKey string

	// UseSSL is a boolean defining whether to use a SSL connection or not
	UseSSL bool

	// Token is the token to use for the connection, can be a blank string
	Token string
}

Config is the configuration for setting up a minio client

type MinioStorageClient

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

MinioStorageClient is a wrapper around minio that enables interactions with a Minio cluster

func (*MinioStorageClient) BucketExists

func (sc *MinioStorageClient) BucketExists(ctx context.Context, bucketName string) (bool, error)

func (*MinioStorageClient) CreateBucket

func (sc *MinioStorageClient) CreateBucket(ctx context.Context, bucket string) error

func (*MinioStorageClient) Upload

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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