minio

package
v0.2.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 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 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