cloudstorage

package
v1.0.2003 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package cloudstorage is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrLogNotExist is returned when a log cannot be found
	ErrLogNotExist = errors.New("The log does not exist")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	InsertBuildLog(ctx context.Context, buildLog contracts.BuildLog) (err error)
	InsertReleaseLog(ctx context.Context, releaseLog contracts.ReleaseLog) (err error)
	InsertBotLog(ctx context.Context, botLog contracts.BotLog) (err error)
	GetPipelineBuildLogs(ctx context.Context, buildLog contracts.BuildLog, acceptGzipEncoding bool, responseWriter http.ResponseWriter) (err error)
	GetPipelineReleaseLogs(ctx context.Context, releaseLog contracts.ReleaseLog, acceptGzipEncoding bool, responseWriter http.ResponseWriter) (err error)
	GetPipelineBotLogs(ctx context.Context, botLog contracts.BotLog, acceptGzipEncoding bool, responseWriter http.ResponseWriter) (err error)
	Rename(ctx context.Context, fromRepoSource, fromRepoOwner, fromRepoName, toRepoSource, toRepoOwner, toRepoName string) (err error)
}

Client is the interface for connecting to google cloud storage

func NewClient

func NewClient(config *api.APIConfig, storageClient *storage.Client) Client

NewClient returns new cloudstorage.Client

func NewLoggingClient

func NewLoggingClient(c Client) Client

NewLoggingClient returns a new instance of a logging Client.

func NewMetricsClient

func NewMetricsClient(c Client, requestCount metrics.Counter, requestLatency metrics.Histogram) Client

NewMetricsClient returns a new instance of a metrics Client.

func NewTracingClient

func NewTracingClient(c Client) Client

NewTracingClient returns a new instance of a tracing Client.

type MockClient

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

MockClient is a mock of Client interface.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

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

func (*MockClient) GetPipelineBotLogs

func (m *MockClient) GetPipelineBotLogs(ctx context.Context, botLog contracts.BotLog, acceptGzipEncoding bool, responseWriter http.ResponseWriter) error

GetPipelineBotLogs mocks base method.

func (*MockClient) GetPipelineBuildLogs

func (m *MockClient) GetPipelineBuildLogs(ctx context.Context, buildLog contracts.BuildLog, acceptGzipEncoding bool, responseWriter http.ResponseWriter) error

GetPipelineBuildLogs mocks base method.

func (*MockClient) GetPipelineReleaseLogs

func (m *MockClient) GetPipelineReleaseLogs(ctx context.Context, releaseLog contracts.ReleaseLog, acceptGzipEncoding bool, responseWriter http.ResponseWriter) error

GetPipelineReleaseLogs mocks base method.

func (*MockClient) InsertBotLog

func (m *MockClient) InsertBotLog(ctx context.Context, botLog contracts.BotLog) error

InsertBotLog mocks base method.

func (*MockClient) InsertBuildLog

func (m *MockClient) InsertBuildLog(ctx context.Context, buildLog contracts.BuildLog) error

InsertBuildLog mocks base method.

func (*MockClient) InsertReleaseLog

func (m *MockClient) InsertReleaseLog(ctx context.Context, releaseLog contracts.ReleaseLog) error

InsertReleaseLog mocks base method.

func (*MockClient) Rename

func (m *MockClient) Rename(ctx context.Context, fromRepoSource, fromRepoOwner, fromRepoName, toRepoSource, toRepoOwner, toRepoName string) error

Rename mocks base method.

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) GetPipelineBotLogs

func (mr *MockClientMockRecorder) GetPipelineBotLogs(ctx, botLog, acceptGzipEncoding, responseWriter interface{}) *gomock.Call

GetPipelineBotLogs indicates an expected call of GetPipelineBotLogs.

func (*MockClientMockRecorder) GetPipelineBuildLogs

func (mr *MockClientMockRecorder) GetPipelineBuildLogs(ctx, buildLog, acceptGzipEncoding, responseWriter interface{}) *gomock.Call

GetPipelineBuildLogs indicates an expected call of GetPipelineBuildLogs.

func (*MockClientMockRecorder) GetPipelineReleaseLogs

func (mr *MockClientMockRecorder) GetPipelineReleaseLogs(ctx, releaseLog, acceptGzipEncoding, responseWriter interface{}) *gomock.Call

GetPipelineReleaseLogs indicates an expected call of GetPipelineReleaseLogs.

func (*MockClientMockRecorder) InsertBotLog

func (mr *MockClientMockRecorder) InsertBotLog(ctx, botLog interface{}) *gomock.Call

InsertBotLog indicates an expected call of InsertBotLog.

func (*MockClientMockRecorder) InsertBuildLog

func (mr *MockClientMockRecorder) InsertBuildLog(ctx, buildLog interface{}) *gomock.Call

InsertBuildLog indicates an expected call of InsertBuildLog.

func (*MockClientMockRecorder) InsertReleaseLog

func (mr *MockClientMockRecorder) InsertReleaseLog(ctx, releaseLog interface{}) *gomock.Call

InsertReleaseLog indicates an expected call of InsertReleaseLog.

func (*MockClientMockRecorder) Rename

func (mr *MockClientMockRecorder) Rename(ctx, fromRepoSource, fromRepoOwner, fromRepoName, toRepoSource, toRepoOwner, toRepoName interface{}) *gomock.Call

Rename indicates an expected call of Rename.

Jump to

Keyboard shortcuts

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