fake

package
v0.2.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FakeObjectName    = "llm/test.json"
	FakeObjectContent = `` /* 677-byte string literal not displayed */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeMinioClient

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

FakeMinioClient is a mock implementation of MinioClient for testing

func NewFakeMinioClient

func NewFakeMinioClient(bucketName string) (*FakeMinioClient, error)

NewFakeMinioClient initializes a new FakeMinioClient

func (*FakeMinioClient) InitializeData

func (f *FakeMinioClient) InitializeData(objectName string, content string)

InitializeData populates the fake MinIO client with initial object data

func (*FakeMinioClient) Read

func (f *FakeMinioClient) Read(ctx context.Context, objectName string) ([]string, error)

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

func (*FakeMinioClient) Write

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

Write uploads a slice of strings as a file to the fake MinIO

Jump to

Keyboard shortcuts

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