bucket

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 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 Client

type Client interface {
	Open(ctx context.Context) (Object, error)
}

func NewClient

func NewClient(bucketName, objectName string) Client

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
},
) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockClient) EXPECT

func (_m *MockClient) EXPECT() *MockClient_Expecter

func (*MockClient) Open

func (_mock *MockClient) Open(ctx context.Context) (Object, error)

Open provides a mock function for the type MockClient

type MockClient_Expecter

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

func (*MockClient_Expecter) Open

func (_e *MockClient_Expecter) Open(ctx interface{}) *MockClient_Open_Call

Open is a helper method to define mock.On call

  • ctx context.Context

type MockClient_Open_Call

type MockClient_Open_Call struct {
	*mock.Call
}

MockClient_Open_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Open'

func (*MockClient_Open_Call) Return

func (_c *MockClient_Open_Call) Return(object Object, err error) *MockClient_Open_Call

func (*MockClient_Open_Call) Run

func (_c *MockClient_Open_Call) Run(run func(ctx context.Context)) *MockClient_Open_Call

func (*MockClient_Open_Call) RunAndReturn

func (_c *MockClient_Open_Call) RunAndReturn(run func(ctx context.Context) (Object, error)) *MockClient_Open_Call

type MockObject

type MockObject struct {
	mock.Mock
}

MockObject is an autogenerated mock type for the Object type

func NewMockObject

func NewMockObject(t interface {
	mock.TestingT
	Cleanup(func())
},
) *MockObject

NewMockObject creates a new instance of MockObject. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockObject) Close

func (_mock *MockObject) Close() error

Close provides a mock function for the type MockObject

func (*MockObject) EXPECT

func (_m *MockObject) EXPECT() *MockObject_Expecter

func (*MockObject) LastUpdated

func (_mock *MockObject) LastUpdated() time.Time

LastUpdated provides a mock function for the type MockObject

func (*MockObject) Reader

func (_mock *MockObject) Reader() io.Reader

Reader provides a mock function for the type MockObject

type MockObject_Close_Call

type MockObject_Close_Call struct {
	*mock.Call
}

MockObject_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*MockObject_Close_Call) Return

func (*MockObject_Close_Call) Run

func (_c *MockObject_Close_Call) Run(run func()) *MockObject_Close_Call

func (*MockObject_Close_Call) RunAndReturn

func (_c *MockObject_Close_Call) RunAndReturn(run func() error) *MockObject_Close_Call

type MockObject_Expecter

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

func (*MockObject_Expecter) Close

Close is a helper method to define mock.On call

func (*MockObject_Expecter) LastUpdated

LastUpdated is a helper method to define mock.On call

func (*MockObject_Expecter) Reader

Reader is a helper method to define mock.On call

type MockObject_LastUpdated_Call

type MockObject_LastUpdated_Call struct {
	*mock.Call
}

MockObject_LastUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LastUpdated'

func (*MockObject_LastUpdated_Call) Return

func (*MockObject_LastUpdated_Call) Run

func (*MockObject_LastUpdated_Call) RunAndReturn

func (_c *MockObject_LastUpdated_Call) RunAndReturn(run func() time.Time) *MockObject_LastUpdated_Call

type MockObject_Reader_Call

type MockObject_Reader_Call struct {
	*mock.Call
}

MockObject_Reader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reader'

func (*MockObject_Reader_Call) Return

func (*MockObject_Reader_Call) Run

func (_c *MockObject_Reader_Call) Run(run func()) *MockObject_Reader_Call

func (*MockObject_Reader_Call) RunAndReturn

func (_c *MockObject_Reader_Call) RunAndReturn(run func() io.Reader) *MockObject_Reader_Call

type Object

type Object interface {
	LastUpdated() time.Time
	Reader() io.Reader
	Close() error
}

Jump to

Keyboard shortcuts

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