bigtable

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package bigtable is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bigtable

type Bigtable struct {
	Table string
	Rows  []*Row
}

Bigtable entity of the bigtable

type Client

type Client interface {
	OutStream() io.Writer
	ErrStream() io.Writer

	Get(ctx context.Context, table, key string, opts ...bigtable.ReadOption) (*Bigtable, error)
	GetRows(ctx context.Context, table string, rr bigtable.RowRange, opts ...bigtable.ReadOption) (*Bigtable, error)
	Count(ctx context.Context, table string) (int, error)
	Tables(ctx context.Context) ([]string, error)
}

Client represent repository of the bigtable

func NewClient

func NewClient(project, instance string, opts ...Option) (Client, error)

NewClient returns initialized client.

type Column

type Column struct {
	Family    string
	Qualifier string
	Value     []byte
	Version   time.Time
}

Column represent a column of the row

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) Count

func (m *MockClient) Count(ctx context.Context, table string) (int, error)

Count mocks base method

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

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

func (*MockClient) ErrStream

func (m *MockClient) ErrStream() io.Writer

ErrStream mocks base method

func (*MockClient) Get

func (m *MockClient) Get(ctx context.Context, table, key string, opts ...bigtable.ReadOption) (*Bigtable, error)

Get mocks base method

func (*MockClient) GetRows

func (m *MockClient) GetRows(ctx context.Context, table string, rr bigtable.RowRange, opts ...bigtable.ReadOption) (*Bigtable, error)

GetRows mocks base method

func (*MockClient) OutStream

func (m *MockClient) OutStream() io.Writer

OutStream mocks base method

func (*MockClient) Tables

func (m *MockClient) Tables(ctx context.Context) ([]string, error)

Tables mocks base method

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient

func (*MockClientMockRecorder) Count

func (mr *MockClientMockRecorder) Count(ctx, table interface{}) *gomock.Call

Count indicates an expected call of Count

func (*MockClientMockRecorder) ErrStream

func (mr *MockClientMockRecorder) ErrStream() *gomock.Call

ErrStream indicates an expected call of ErrStream

func (*MockClientMockRecorder) Get

func (mr *MockClientMockRecorder) Get(ctx, table, key interface{}, opts ...interface{}) *gomock.Call

Get indicates an expected call of Get

func (*MockClientMockRecorder) GetRows

func (mr *MockClientMockRecorder) GetRows(ctx, table, rr interface{}, opts ...interface{}) *gomock.Call

GetRows indicates an expected call of GetRows

func (*MockClientMockRecorder) OutStream

func (mr *MockClientMockRecorder) OutStream() *gomock.Call

OutStream indicates an expected call of OutStream

func (*MockClientMockRecorder) Tables

func (mr *MockClientMockRecorder) Tables(ctx interface{}) *gomock.Call

Tables indicates an expected call of Tables

type Option

type Option func(*client)

Option functional option pattern for the client.

func WithErrStream

func WithErrStream(w io.Writer) Option

WithErrStream settings errStream

func WithOutStream

func WithOutStream(w io.Writer) Option

WithOutStream settings outStream

type Row

type Row struct {
	Key     string
	Columns []*Column
}

Row represent a row of the table

Jump to

Keyboard shortcuts

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