gsstorage

package
v0.0.0-...-19f3ddf Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGsPath

func GetGsPath(bucketName string, folders ...string) string

GetGsPath return GS path to image files.

Types

type GsClient

type GsClient interface {
	// Upload uploads an apk to the Fleet Services caching service.
	Upload(ctx context.Context, apkLocalPath string, apkName string) error
	// ListFiles lists objects using prefix and delimeter.
	ListFiles(ctx context.Context, prefix, delim string) ([]string, error)
}

GsClient specifies the APIs between provisioning service and storage client. GsClient interface is used mainly for testing purpose, since storage pkg does not provide test pkg.

func NewGsClient

func NewGsClient(bucketName string) GsClient

type MockGsClient

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

MockGsClient is a mock of GsClient interface.

func NewMockGsClient

func NewMockGsClient(ctrl *gomock.Controller) *MockGsClient

NewMockGsClient creates a new mock instance.

func (*MockGsClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGsClient) ListFiles

func (m *MockGsClient) ListFiles(arg0 context.Context, arg1, arg2 string) ([]string, error)

ListFiles mocks base method.

func (*MockGsClient) Upload

func (m *MockGsClient) Upload(arg0 context.Context, arg1, arg2 string) error

Upload mocks base method.

type MockGsClientMockRecorder

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

MockGsClientMockRecorder is the mock recorder for MockGsClient.

func (*MockGsClientMockRecorder) ListFiles

func (mr *MockGsClientMockRecorder) ListFiles(arg0, arg1, arg2 interface{}) *gomock.Call

ListFiles indicates an expected call of ListFiles.

func (*MockGsClientMockRecorder) Upload

func (mr *MockGsClientMockRecorder) Upload(arg0, arg1, arg2 interface{}) *gomock.Call

Upload indicates an expected call of Upload.

Jump to

Keyboard shortcuts

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