servertest

package
v1.3.2-RC1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufconnServer added in v1.3.2

type BufconnServer struct {
	Lis        *bufconn.Listener
	Server     *ServerMock
	Options    *server.Options
	GrpcServer *grpc.Server
	Dialer     BuffDialer
	// contains filtered or unexported fields
}

func NewBufconnServer

func NewBufconnServer(options *server.Options) *BufconnServer

NewBuffconnServer creates new test server instance that uses grpc's buffconn connection method to talk to its clients - communication happens using memory buffers instead of TCP connections.

func (*BufconnServer) NewAuthenticatedClient added in v1.3.2

func (bs *BufconnServer) NewAuthenticatedClient(options *client.Options) (client.ImmuClient, error)

func (*BufconnServer) NewClient added in v1.3.2

func (bs *BufconnServer) NewClient(options *client.Options) client.ImmuClient

func (*BufconnServer) Start added in v1.3.2

func (bs *BufconnServer) Start() error

func (*BufconnServer) Stop added in v1.3.2

func (bs *BufconnServer) Stop() error

func (*BufconnServer) WaitForPgsqlListener added in v1.3.2

func (bs *BufconnServer) WaitForPgsqlListener()

type BuffDialer

type BuffDialer func(context.Context, string) (net.Conn, error)

type ServerMock added in v0.9.1

func (*ServerMock) ChangePassword added in v0.9.1

func (s *ServerMock) ChangePassword(ctx context.Context, req *schema.ChangePasswordRequest) (*empty.Empty, error)

func (*ServerMock) ChangePermission added in v0.9.1

func (s *ServerMock) ChangePermission(ctx context.Context, req *schema.ChangePermissionRequest) (*empty.Empty, error)

func (*ServerMock) CloseSession added in v1.2.0

func (s *ServerMock) CloseSession(ctx context.Context, e *empty.Empty) (*empty.Empty, error)

func (*ServerMock) Commit added in v1.2.0

func (*ServerMock) CompactIndex added in v1.0.5

func (s *ServerMock) CompactIndex(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

func (*ServerMock) Count added in v0.9.1

func (s *ServerMock) Count(ctx context.Context, req *schema.KeyPrefix) (*schema.EntryCount, error)

func (*ServerMock) CountAll added in v0.9.1

func (s *ServerMock) CountAll(ctx context.Context, req *empty.Empty) (*schema.EntryCount, error)

func (*ServerMock) CreateDatabase added in v0.9.1

func (s *ServerMock) CreateDatabase(ctx context.Context, req *schema.Database) (*empty.Empty, error)

func (*ServerMock) CreateDatabaseV2 added in v1.2.3

func (*ServerMock) CreateDatabaseWith added in v1.0.5

func (s *ServerMock) CreateDatabaseWith(ctx context.Context, req *schema.DatabaseSettings) (*empty.Empty, error)

func (*ServerMock) CreateUser added in v0.9.1

func (s *ServerMock) CreateUser(ctx context.Context, req *schema.CreateUserRequest) (*empty.Empty, error)

func (*ServerMock) CurrentState added in v0.9.1

func (s *ServerMock) CurrentState(ctx context.Context, req *empty.Empty) (*schema.ImmutableState, error)

func (*ServerMock) DatabaseHealth added in v1.2.3

func (s *ServerMock) DatabaseHealth(ctx context.Context, req *empty.Empty) (*schema.DatabaseHealthResponse, error)

func (*ServerMock) DatabaseList added in v0.9.1

func (s *ServerMock) DatabaseList(ctx context.Context, req *empty.Empty) (*schema.DatabaseListResponse, error)

func (*ServerMock) DatabaseListV2 added in v1.2.3

func (*ServerMock) Delete added in v1.2.0

func (*ServerMock) DeleteDatabase added in v1.2.3

func (*ServerMock) DescribeTable added in v1.0.0

func (s *ServerMock) DescribeTable(ctx context.Context, req *schema.Table) (*schema.SQLQueryResult, error)

func (*ServerMock) ExecAll added in v0.9.1

func (s *ServerMock) ExecAll(ctx context.Context, req *schema.ExecAllRequest) (*schema.TxHeader, error)

func (*ServerMock) ExportTx added in v1.0.5

func (*ServerMock) FlushIndex added in v1.2.3

func (*ServerMock) Get added in v0.9.1

func (s *ServerMock) Get(ctx context.Context, req *schema.KeyRequest) (*schema.Entry, error)

func (*ServerMock) GetAll added in v0.9.1

func (*ServerMock) GetDatabaseSettings added in v1.2.3

func (s *ServerMock) GetDatabaseSettings(ctx context.Context, req *empty.Empty) (*schema.DatabaseSettings, error)

func (*ServerMock) GetDatabaseSettingsV2 added in v1.2.3

func (*ServerMock) Health added in v0.9.1

func (s *ServerMock) Health(ctx context.Context, req *empty.Empty) (*schema.HealthResponse, error)

func (*ServerMock) History added in v0.9.1

func (s *ServerMock) History(ctx context.Context, req *schema.HistoryRequest) (*schema.Entries, error)

func (*ServerMock) Initialize added in v0.9.2

func (s *ServerMock) Initialize() error

func (*ServerMock) KeepAlive added in v1.2.0

func (s *ServerMock) KeepAlive(ctx context.Context, request *empty.Empty) (*empty.Empty, error)

func (*ServerMock) ListTables added in v1.0.0

func (s *ServerMock) ListTables(ctx context.Context, req *empty.Empty) (*schema.SQLQueryResult, error)

func (*ServerMock) ListUsers added in v0.9.1

func (s *ServerMock) ListUsers(ctx context.Context, req *empty.Empty) (*schema.UserList, error)

func (*ServerMock) LoadDatabase added in v1.2.3

func (*ServerMock) Login added in v0.9.1

func (*ServerMock) Logout added in v0.9.1

func (s *ServerMock) Logout(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

func (*ServerMock) NewTx added in v1.2.0

func (s *ServerMock) NewTx(ctx context.Context, request *schema.NewTxRequest) (*schema.NewTxResponse, error)

func (*ServerMock) OpenSession added in v1.2.0

func (*ServerMock) ReplicateTx added in v1.0.5

func (s *ServerMock) ReplicateTx(replicateTxServer schema.ImmuService_ReplicateTxServer) error

func (*ServerMock) Rollback added in v1.2.0

func (s *ServerMock) Rollback(ctx context.Context, e *empty.Empty) (*empty.Empty, error)

func (*ServerMock) SQLExec added in v1.0.0

func (*ServerMock) SQLQuery added in v1.0.0

func (*ServerMock) Scan added in v0.9.1

func (*ServerMock) ServerInfo added in v1.3.2

func (*ServerMock) Set added in v0.9.1

func (*ServerMock) SetActiveUser added in v0.9.1

func (s *ServerMock) SetActiveUser(ctx context.Context, req *schema.SetActiveUserRequest) (*empty.Empty, error)

func (*ServerMock) SetReference added in v0.9.1

func (s *ServerMock) SetReference(ctx context.Context, req *schema.ReferenceRequest) (*schema.TxHeader, error)

func (*ServerMock) Stop added in v0.9.2

func (s *ServerMock) Stop() error

func (*ServerMock) StreamExecAll added in v0.9.2

func (s *ServerMock) StreamExecAll(allServer schema.ImmuService_StreamExecAllServer) error

func (*ServerMock) StreamGet added in v0.9.2

func (s *ServerMock) StreamGet(request *schema.KeyRequest, getServer schema.ImmuService_StreamGetServer) error

func (*ServerMock) StreamHistory added in v0.9.2

func (s *ServerMock) StreamHistory(request *schema.HistoryRequest, historyServer schema.ImmuService_StreamHistoryServer) error

func (*ServerMock) StreamScan added in v0.9.2

func (s *ServerMock) StreamScan(request *schema.ScanRequest, scanServer schema.ImmuService_StreamScanServer) error

func (*ServerMock) StreamSet added in v0.9.2

func (s *ServerMock) StreamSet(setServer schema.ImmuService_StreamSetServer) error

func (*ServerMock) StreamVerifiableGet added in v0.9.2

func (s *ServerMock) StreamVerifiableGet(request *schema.VerifiableGetRequest, getServer schema.ImmuService_StreamVerifiableGetServer) error

func (*ServerMock) StreamVerifiableSet added in v0.9.2

func (s *ServerMock) StreamVerifiableSet(vSetServer schema.ImmuService_StreamVerifiableSetServer) error

func (*ServerMock) StreamZScan added in v0.9.2

func (s *ServerMock) StreamZScan(request *schema.ZScanRequest, zscanServer schema.ImmuService_StreamZScanServer) error

func (*ServerMock) TxById added in v0.9.1

func (s *ServerMock) TxById(ctx context.Context, req *schema.TxRequest) (*schema.Tx, error)

func (*ServerMock) TxSQLExec added in v1.2.0

func (s *ServerMock) TxSQLExec(ctx context.Context, request *schema.SQLExecRequest) (*empty.Empty, error)

func (*ServerMock) TxSQLQuery added in v1.2.0

func (s *ServerMock) TxSQLQuery(ctx context.Context, request *schema.SQLQueryRequest) (*schema.SQLQueryResult, error)

func (*ServerMock) TxScan added in v0.9.1

func (s *ServerMock) TxScan(ctx context.Context, req *schema.TxScanRequest) (*schema.TxList, error)

func (*ServerMock) UnloadDatabase added in v1.2.3

func (*ServerMock) UpdateAuthConfig added in v0.9.1

func (s *ServerMock) UpdateAuthConfig(ctx context.Context, req *schema.AuthConfig) (*empty.Empty, error)

func (*ServerMock) UpdateDatabase added in v1.0.5

func (s *ServerMock) UpdateDatabase(ctx context.Context, req *schema.DatabaseSettings) (*empty.Empty, error)

func (*ServerMock) UpdateDatabaseV2 added in v1.2.3

func (*ServerMock) UpdateMTLSConfig added in v0.9.1

func (s *ServerMock) UpdateMTLSConfig(ctx context.Context, req *schema.MTLSConfig) (*empty.Empty, error)

func (*ServerMock) UseDatabase added in v0.9.1

func (s *ServerMock) UseDatabase(ctx context.Context, req *schema.Database) (*schema.UseDatabaseReply, error)

func (*ServerMock) VerifiableGet added in v0.9.1

func (*ServerMock) VerifiableSQLGet added in v1.0.0

func (*ServerMock) VerifiableSet added in v0.9.1

func (*ServerMock) VerifiableSetReference added in v0.9.1

func (s *ServerMock) VerifiableSetReference(ctx context.Context, req *schema.VerifiableReferenceRequest) (*schema.VerifiableTx, error)

func (*ServerMock) VerifiableTxById added in v0.9.1

func (s *ServerMock) VerifiableTxById(ctx context.Context, req *schema.VerifiableTxRequest) (*schema.VerifiableTx, error)

func (*ServerMock) VerifiableZAdd added in v0.9.1

func (*ServerMock) ZAdd added in v0.9.1

func (*ServerMock) ZScan added in v0.9.1

Jump to

Keyboard shortcuts

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