minio

package
v0.2.0-alpha.12 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IMinio

type IMinio interface {
	// Read retrieves the content of the specified object as a slice of strings,
	// splitting the content by newline characters.
	Read(ctx context.Context, objectName string) ([]string, error)

	// Write uploads a slice of strings as a file to the specified object name in a MinIO bucket.
	// The lines are joined into a single string with newline characters before being uploaded.
	Write(ctx context.Context, objectName string, lines []string) error
}

IMinio defines the interface for interacting with a MinIO client.

type MinioClient

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

MinioClient wraps the MinIO client

func NewMinioClient

func NewMinioClient(endpoint, accessKey, secretKey, bucketName string) (*MinioClient, error)

NewMinioClient initializes a new MinioClient

func (*MinioClient) Read

func (m *MinioClient) Read(ctx context.Context, objectName string) ([]string, error)

Read returns the content of the file as a slice of strings split by newline

func (*MinioClient) Write

func (m *MinioClient) Write(ctx context.Context, objectName string, lines []string) error

Write uploads a slice of strings as a file to MinIO

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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