Documentation ¶
Overview ¶
Package clienttest ...
Package clienttest ...
Package clienttest ...
Package clienttest ...
Package clienttest ...
Index ¶
- type HomedirServiceMock
- func (h *HomedirServiceMock) DeleteFileFromUserHomeDir(pathToFile string) error
- func (h *HomedirServiceMock) FileExistsInUserHomeDir(pathToFile string) (bool, error)
- func (h *HomedirServiceMock) ReadFileFromUserHomeDir(pathToFile string) (string, error)
- func (h *HomedirServiceMock) WriteFileToUserHomeDir(content []byte, pathToFile string) error
- type ImmuClientMock
- func (icm *ImmuClientMock) ChangePassword(ctx context.Context, user []byte, oldPass []byte, newPass []byte) error
- func (icm *ImmuClientMock) ChangePermission(ctx context.Context, action schema.PermissionAction, username string, ...) error
- func (icm *ImmuClientMock) Connect(ctx context.Context) (clientConn *grpc.ClientConn, err error)
- func (icm *ImmuClientMock) Count(ctx context.Context, prefix []byte) (*schema.EntryCount, error)
- func (icm *ImmuClientMock) CreateDatabase(ctx context.Context, db *schema.DatabaseSettings) error
- func (icm *ImmuClientMock) CreateDatabaseV2(ctx context.Context, db string, setttings *schema.DatabaseNullableSettings) (*schema.DatabaseNullableSettings, error)
- func (icm *ImmuClientMock) CreateUser(ctx context.Context, user []byte, pass []byte, permission uint32, ...) error
- func (icm *ImmuClientMock) CurrentState(ctx context.Context) (*schema.ImmutableState, error)
- func (icm *ImmuClientMock) DatabaseList(ctx context.Context) (*schema.DatabaseListResponse, error)
- func (icm *ImmuClientMock) Disconnect() error
- func (icm *ImmuClientMock) Dump(ctx context.Context, writer io.WriteSeeker) (int64, error)
- func (icm *ImmuClientMock) Get(ctx context.Context, key []byte) (*schema.Entry, error)
- func (icm *ImmuClientMock) GetOptions() *client.Options
- func (icm *ImmuClientMock) HealthCheck(ctx context.Context) error
- func (icm *ImmuClientMock) History(ctx context.Context, options *schema.HistoryRequest) (*schema.Entries, error)
- func (icm *ImmuClientMock) IsConnected() bool
- func (icm *ImmuClientMock) ListUsers(ctx context.Context) (*schema.UserList, error)
- func (icm *ImmuClientMock) Login(ctx context.Context, user []byte, pass []byte) (*schema.LoginResponse, error)
- func (icm *ImmuClientMock) Logout(ctx context.Context) error
- func (icm *ImmuClientMock) Scan(ctx context.Context, request *schema.ScanRequest) (*schema.Entries, error)
- func (icm *ImmuClientMock) Set(ctx context.Context, key []byte, value []byte) (*schema.TxHeader, error)
- func (icm *ImmuClientMock) SetActiveUser(ctx context.Context, u *schema.SetActiveUserRequest) error
- func (icm *ImmuClientMock) SetReference(ctx context.Context, key []byte, referencedKey []byte) (*schema.TxHeader, error)
- func (icm *ImmuClientMock) SetReferenceAt(ctx context.Context, key []byte, referencedKey []byte, atTx uint64) (*schema.TxHeader, error)
- func (icm *ImmuClientMock) TxByID(ctx context.Context, ID uint64) (*schema.Tx, error)
- func (icm *ImmuClientMock) UpdateDatabase(ctx context.Context, s *schema.DatabaseSettings) error
- func (icm *ImmuClientMock) UpdateDatabaseV2(ctx context.Context, db string, setttings *schema.DatabaseNullableSettings) (*schema.UpdateDatabaseResponse, error)
- func (icm *ImmuClientMock) UseDatabase(ctx context.Context, d *schema.Database) (*schema.UseDatabaseReply, error)
- func (icm *ImmuClientMock) VerifiedGet(ctx context.Context, key []byte) (*schema.Entry, error)
- func (icm *ImmuClientMock) VerifiedGetAt(ctx context.Context, key []byte, tx uint64) (*schema.Entry, error)
- func (icm *ImmuClientMock) VerifiedSet(ctx context.Context, key []byte, value []byte) (*schema.TxHeader, error)
- func (icm *ImmuClientMock) VerifiedSetReference(ctx context.Context, key []byte, referencedKey []byte) (*schema.TxHeader, error)
- func (icm *ImmuClientMock) VerifiedSetReferenceAt(ctx context.Context, key []byte, referencedKey []byte, atTx uint64) (*schema.TxHeader, error)
- func (icm *ImmuClientMock) VerifiedTxByID(ctx context.Context, tx uint64) (*schema.Tx, error)
- func (icm *ImmuClientMock) VerifiedZAdd(ctx context.Context, set []byte, score float64, key []byte) (*schema.TxHeader, error)
- func (icm *ImmuClientMock) VerifiedZAddAt(ctx context.Context, set []byte, score float64, key []byte, atTx uint64) (*schema.TxHeader, error)
- func (icm *ImmuClientMock) WaitForHealthCheck(ctx context.Context) (err error)
- func (icm *ImmuClientMock) ZAdd(ctx context.Context, set []byte, score float64, key []byte) (*schema.TxHeader, error)
- func (icm *ImmuClientMock) ZAddAt(ctx context.Context, set []byte, score float64, key []byte, atTx uint64) (*schema.TxHeader, error)
- func (icm *ImmuClientMock) ZScan(ctx context.Context, request *schema.ZScanRequest) (*schema.ZEntries, error)
- type ImmuServiceClientMock
- func (icm *ImmuServiceClientMock) ChangePassword(ctx context.Context, in *schema.ChangePasswordRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (icm *ImmuServiceClientMock) ChangePermission(ctx context.Context, in *schema.ChangePermissionRequest, ...) (*empty.Empty, error)
- func (icm *ImmuServiceClientMock) Count(ctx context.Context, in *schema.KeyPrefix, opts ...grpc.CallOption) (*schema.EntryCount, error)
- func (icm *ImmuServiceClientMock) CountAll(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.EntryCount, error)
- func (icm *ImmuServiceClientMock) CreateDatabase(ctx context.Context, in *schema.Database, opts ...grpc.CallOption) (*empty.Empty, error)
- func (icm *ImmuServiceClientMock) CreateDatabaseWith(ctx context.Context, in *schema.DatabaseSettings, opts ...grpc.CallOption) (*empty.Empty, error)
- func (icm *ImmuServiceClientMock) CreateUser(ctx context.Context, in *schema.CreateUserRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (icm *ImmuServiceClientMock) CurrentState(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.ImmutableState, error)
- func (icm *ImmuServiceClientMock) DatabaseList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.DatabaseListResponse, error)
- func (icm *ImmuServiceClientMock) DeactivateUser(ctx context.Context, in *schema.UserRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (icm *ImmuServiceClientMock) ExecAll(ctx context.Context, in *schema.ExecAllRequest, opts ...grpc.CallOption) (*schema.TxHeader, error)
- func (icm *ImmuServiceClientMock) Get(ctx context.Context, in *schema.KeyRequest, opts ...grpc.CallOption) (*schema.Entry, error)
- func (icm *ImmuServiceClientMock) GetAll(ctx context.Context, in *schema.KeyListRequest, opts ...grpc.CallOption) (*schema.Entries, error)
- func (icm *ImmuServiceClientMock) GetUser(ctx context.Context, in *schema.UserRequest, opts ...grpc.CallOption) error
- func (icm *ImmuServiceClientMock) Health(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.HealthResponse, error)
- func (icm *ImmuServiceClientMock) History(ctx context.Context, in *schema.HistoryRequest, opts ...grpc.CallOption) (*schema.Entries, error)
- func (icm *ImmuServiceClientMock) ListUsers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.UserList, error)
- func (icm *ImmuServiceClientMock) Login(ctx context.Context, in *schema.LoginRequest, opts ...grpc.CallOption) (*schema.LoginResponse, error)
- func (icm *ImmuServiceClientMock) Logout(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
- func (icm *ImmuServiceClientMock) OpenSession(ctx context.Context, in *schema.OpenSessionRequest, opts ...grpc.CallOption) (*schema.OpenSessionResponse, error)
- func (icm *ImmuServiceClientMock) Scan(ctx context.Context, in *schema.ScanRequest, opts ...grpc.CallOption) (*schema.Entries, error)
- func (icm *ImmuServiceClientMock) Set(ctx context.Context, in *schema.SetRequest, opts ...grpc.CallOption) (*schema.TxHeader, error)
- func (icm *ImmuServiceClientMock) SetActiveUser(ctx context.Context, in *schema.SetActiveUserRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (icm *ImmuServiceClientMock) SetReference(ctx context.Context, in *schema.ReferenceRequest, opts ...grpc.CallOption) (*schema.TxHeader, error)
- func (icm *ImmuServiceClientMock) TxById(ctx context.Context, in *schema.TxRequest, opts ...grpc.CallOption) (*schema.Tx, error)
- func (icm *ImmuServiceClientMock) UpdateAuthConfig(ctx context.Context, in *schema.AuthConfig, opts ...grpc.CallOption) (*empty.Empty, error)
- func (icm *ImmuServiceClientMock) UpdateDatabase(ctx context.Context, in *schema.DatabaseSettings, opts ...grpc.CallOption) (*empty.Empty, error)
- func (icm *ImmuServiceClientMock) UpdateMTLSConfig(ctx context.Context, in *schema.MTLSConfig, opts ...grpc.CallOption) (*empty.Empty, error)
- func (icm *ImmuServiceClientMock) UseDatabase(ctx context.Context, in *schema.Database, opts ...grpc.CallOption) (*schema.UseDatabaseReply, error)
- func (icm *ImmuServiceClientMock) VerifiableGet(ctx context.Context, in *schema.VerifiableGetRequest, opts ...grpc.CallOption) (*schema.VerifiableEntry, error)
- func (icm *ImmuServiceClientMock) VerifiableSet(ctx context.Context, in *schema.VerifiableSetRequest, opts ...grpc.CallOption) (*schema.VerifiableTx, error)
- func (icm *ImmuServiceClientMock) VerifiableSetReference(ctx context.Context, in *schema.VerifiableReferenceRequest, ...) (*schema.VerifiableTx, error)
- func (icm *ImmuServiceClientMock) VerifiableTxById(ctx context.Context, in *schema.VerifiableTxRequest, opts ...grpc.CallOption) (*schema.VerifiableTx, error)
- func (icm *ImmuServiceClientMock) VerifiableZAdd(ctx context.Context, in *schema.VerifiableZAddRequest, opts ...grpc.CallOption) (*schema.VerifiableTx, error)
- func (icm *ImmuServiceClientMock) ZAdd(ctx context.Context, in *schema.ZAddRequest, opts ...grpc.CallOption) (*schema.TxHeader, error)
- func (icm *ImmuServiceClientMock) ZScan(ctx context.Context, in *schema.ZScanRequest, opts ...grpc.CallOption) (*schema.ZEntries, error)
- type PasswordReaderMock
- type TerminalReaderMock
- type TokenServiceMock
- func (ts TokenServiceMock) DeleteToken() error
- func (ts TokenServiceMock) GetDatabase() (string, error)
- func (ts TokenServiceMock) GetToken() (string, error)
- func (ts TokenServiceMock) IsTokenPresent() (bool, error)
- func (ts TokenServiceMock) SetToken(database string, token string) error
- func (ts TokenServiceMock) WithHds(hds homedir.HomedirService) tokenservice.TokenService
- func (ts TokenServiceMock) WithTokenFileName(tfn string) tokenservice.TokenService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HomedirServiceMock ¶
type HomedirServiceMock struct { homedir.HomedirService WriteFileToUserHomeDirF func(content []byte, pathToFile string) error FileExistsInUserHomeDirF func(pathToFile string) (bool, error) ReadFileFromUserHomeDirF func(pathToFile string) (string, error) DeleteFileFromUserHomeDirF func(pathToFile string) error }
HomedirServiceMock ...
func DefaultHomedirServiceMock ¶
func DefaultHomedirServiceMock() *HomedirServiceMock
DefaultHomedirServiceMock ...
func (*HomedirServiceMock) DeleteFileFromUserHomeDir ¶
func (h *HomedirServiceMock) DeleteFileFromUserHomeDir(pathToFile string) error
DeleteFileFromUserHomeDir ...
func (*HomedirServiceMock) FileExistsInUserHomeDir ¶
func (h *HomedirServiceMock) FileExistsInUserHomeDir(pathToFile string) (bool, error)
FileExistsInUserHomeDir ...
func (*HomedirServiceMock) ReadFileFromUserHomeDir ¶
func (h *HomedirServiceMock) ReadFileFromUserHomeDir(pathToFile string) (string, error)
ReadFileFromUserHomeDir ...
func (*HomedirServiceMock) WriteFileToUserHomeDir ¶
func (h *HomedirServiceMock) WriteFileToUserHomeDir(content []byte, pathToFile string) error
WriteFileToUserHomeDir ...
type ImmuClientMock ¶
type ImmuClientMock struct { immuclient.ImmuClient GetOptionsF func() *client.Options IsConnectedF func() bool HealthCheckF func(context.Context) error WaitForHealthCheckF func(context.Context) error ConnectF func(context.Context) (*grpc.ClientConn, error) DisconnectF func() error LoginF func(context.Context, []byte, []byte) (*schema.LoginResponse, error) LogoutF func(context.Context) error VerifiedGetF func(context.Context, []byte) (*schema.Entry, error) VerifiedGetAtF func(context.Context, []byte, uint64) (*schema.Entry, error) VerifiedSetF func(context.Context, []byte, []byte) (*schema.TxHeader, error) SetF func(context.Context, []byte, []byte) (*schema.TxHeader, error) SetReferenceF func(context.Context, []byte, []byte, uint64) (*schema.TxHeader, error) VerifiedSetReferenceF func(context.Context, []byte, []byte, uint64) (*schema.TxHeader, error) ZAddF func(context.Context, []byte, float64, []byte, uint64) (*schema.TxHeader, error) VerifiedZAddF func(context.Context, []byte, float64, []byte, uint64) (*schema.TxHeader, error) HistoryF func(context.Context, *schema.HistoryRequest) (*schema.Entries, error) UseDatabaseF func(context.Context, *schema.Database) (*schema.UseDatabaseReply, error) DumpF func(context.Context, io.WriteSeeker) (int64, error) CurrentStateF func(context.Context) (*schema.ImmutableState, error) TxByIDF func(context.Context, uint64) (*schema.Tx, error) GetF func(context.Context, []byte) (*schema.Entry, error) VerifiedTxByIDF func(context.Context, uint64) (*schema.Tx, error) ListUsersF func(context.Context) (*schema.UserList, error) SetActiveUserF func(context.Context, *schema.SetActiveUserRequest) error ChangePermissionF func(context.Context, schema.PermissionAction, string, string, uint32) error ZScanF func(context.Context, *schema.ZScanRequest) (*schema.ZEntries, error) ScanF func(context.Context, *schema.ScanRequest) (*schema.Entries, error) CountF func(context.Context, []byte) (*schema.EntryCount, error) CreateDatabaseF func(context.Context, *schema.DatabaseSettings) error CreateDatabaseV2F func(context.Context, string, *schema.DatabaseNullableSettings) (*schema.DatabaseNullableSettings, error) UpdateDatabaseF func(context.Context, *schema.DatabaseSettings) error UpdateDatabaseV2F func(context.Context, string, *schema.DatabaseNullableSettings) (*schema.UpdateDatabaseResponse, error) DatabaseListF func(context.Context) (*schema.DatabaseListResponse, error) ChangePasswordF func(context.Context, []byte, []byte, []byte) error CreateUserF func(context.Context, []byte, []byte, uint32, string) error }
ImmuClientMock ...
func (*ImmuClientMock) ChangePassword ¶
func (icm *ImmuClientMock) ChangePassword(ctx context.Context, user []byte, oldPass []byte, newPass []byte) error
ChangePassword ...
func (*ImmuClientMock) ChangePermission ¶
func (icm *ImmuClientMock) ChangePermission(ctx context.Context, action schema.PermissionAction, username string, database string, permissions uint32) error
ChangePermission ...
func (*ImmuClientMock) Connect ¶
func (icm *ImmuClientMock) Connect(ctx context.Context) (clientConn *grpc.ClientConn, err error)
Connect ...
func (*ImmuClientMock) Count ¶
func (icm *ImmuClientMock) Count(ctx context.Context, prefix []byte) (*schema.EntryCount, error)
Count ...
func (*ImmuClientMock) CreateDatabase ¶
func (icm *ImmuClientMock) CreateDatabase(ctx context.Context, db *schema.DatabaseSettings) error
CreateDatabase ...
func (*ImmuClientMock) CreateDatabaseV2 ¶ added in v1.2.3
func (icm *ImmuClientMock) CreateDatabaseV2(ctx context.Context, db string, setttings *schema.DatabaseNullableSettings) (*schema.DatabaseNullableSettings, error)
CreateDatabaseV2 ...
func (*ImmuClientMock) CreateUser ¶
func (icm *ImmuClientMock) CreateUser(ctx context.Context, user []byte, pass []byte, permission uint32, databasename string) error
CreateUser ...
func (*ImmuClientMock) CurrentState ¶ added in v0.9.0
func (icm *ImmuClientMock) CurrentState(ctx context.Context) (*schema.ImmutableState, error)
CurrentState ...
func (*ImmuClientMock) DatabaseList ¶
func (icm *ImmuClientMock) DatabaseList(ctx context.Context) (*schema.DatabaseListResponse, error)
DatabaseList ...
func (*ImmuClientMock) Dump ¶
func (icm *ImmuClientMock) Dump(ctx context.Context, writer io.WriteSeeker) (int64, error)
Dump ...
func (*ImmuClientMock) GetOptions ¶
func (icm *ImmuClientMock) GetOptions() *client.Options
GetOptions ...
func (*ImmuClientMock) HealthCheck ¶
func (icm *ImmuClientMock) HealthCheck(ctx context.Context) error
HealthCheck ...
func (*ImmuClientMock) History ¶
func (icm *ImmuClientMock) History(ctx context.Context, options *schema.HistoryRequest) (*schema.Entries, error)
History ...
func (*ImmuClientMock) Login ¶
func (icm *ImmuClientMock) Login(ctx context.Context, user []byte, pass []byte) (*schema.LoginResponse, error)
Login ...
func (*ImmuClientMock) Logout ¶
func (icm *ImmuClientMock) Logout(ctx context.Context) error
Logout ...
func (*ImmuClientMock) Scan ¶
func (icm *ImmuClientMock) Scan(ctx context.Context, request *schema.ScanRequest) (*schema.Entries, error)
Scan ...
func (*ImmuClientMock) Set ¶
func (icm *ImmuClientMock) Set(ctx context.Context, key []byte, value []byte) (*schema.TxHeader, error)
Set ...
func (*ImmuClientMock) SetActiveUser ¶
func (icm *ImmuClientMock) SetActiveUser(ctx context.Context, u *schema.SetActiveUserRequest) error
SetActiveUser ...
func (*ImmuClientMock) SetReference ¶ added in v0.9.0
func (icm *ImmuClientMock) SetReference(ctx context.Context, key []byte, referencedKey []byte) (*schema.TxHeader, error)
SetReference ...
func (*ImmuClientMock) SetReferenceAt ¶ added in v0.9.0
func (icm *ImmuClientMock) SetReferenceAt(ctx context.Context, key []byte, referencedKey []byte, atTx uint64) (*schema.TxHeader, error)
SetReferenceAt ...
func (*ImmuClientMock) UpdateDatabase ¶ added in v1.0.5
func (icm *ImmuClientMock) UpdateDatabase(ctx context.Context, s *schema.DatabaseSettings) error
UpdateDatabase ...
func (*ImmuClientMock) UpdateDatabaseV2 ¶ added in v1.2.3
func (icm *ImmuClientMock) UpdateDatabaseV2(ctx context.Context, db string, setttings *schema.DatabaseNullableSettings) (*schema.UpdateDatabaseResponse, error)
UpdateDatabaseV2 ...
func (*ImmuClientMock) UseDatabase ¶
func (icm *ImmuClientMock) UseDatabase(ctx context.Context, d *schema.Database) (*schema.UseDatabaseReply, error)
UseDatabase ...
func (*ImmuClientMock) VerifiedGet ¶ added in v0.9.0
VerifiedGet ...
func (*ImmuClientMock) VerifiedGetAt ¶ added in v1.0.0
func (icm *ImmuClientMock) VerifiedGetAt(ctx context.Context, key []byte, tx uint64) (*schema.Entry, error)
VerifiedGetAt ...
func (*ImmuClientMock) VerifiedSet ¶ added in v0.9.0
func (icm *ImmuClientMock) VerifiedSet(ctx context.Context, key []byte, value []byte) (*schema.TxHeader, error)
VerifiedSet ...
func (*ImmuClientMock) VerifiedSetReference ¶ added in v0.9.0
func (icm *ImmuClientMock) VerifiedSetReference(ctx context.Context, key []byte, referencedKey []byte) (*schema.TxHeader, error)
VerifiedSetReference ...
func (*ImmuClientMock) VerifiedSetReferenceAt ¶ added in v0.9.0
func (icm *ImmuClientMock) VerifiedSetReferenceAt(ctx context.Context, key []byte, referencedKey []byte, atTx uint64) (*schema.TxHeader, error)
VerifiedSetReferenceAt ...
func (*ImmuClientMock) VerifiedTxByID ¶ added in v0.9.0
VerifiedTxByID ...
func (*ImmuClientMock) VerifiedZAdd ¶ added in v0.9.0
func (icm *ImmuClientMock) VerifiedZAdd(ctx context.Context, set []byte, score float64, key []byte) (*schema.TxHeader, error)
SafeZAdd ...
func (*ImmuClientMock) VerifiedZAddAt ¶ added in v0.9.0
func (icm *ImmuClientMock) VerifiedZAddAt(ctx context.Context, set []byte, score float64, key []byte, atTx uint64) (*schema.TxHeader, error)
VerifiedZAddAt ...
func (*ImmuClientMock) WaitForHealthCheck ¶
func (icm *ImmuClientMock) WaitForHealthCheck(ctx context.Context) (err error)
WaitForHealthCheck ...
func (*ImmuClientMock) ZAdd ¶
func (icm *ImmuClientMock) ZAdd(ctx context.Context, set []byte, score float64, key []byte) (*schema.TxHeader, error)
ZAdd ...
func (*ImmuClientMock) ZAddAt ¶ added in v0.9.0
func (icm *ImmuClientMock) ZAddAt(ctx context.Context, set []byte, score float64, key []byte, atTx uint64) (*schema.TxHeader, error)
ZAddAt ...
func (*ImmuClientMock) ZScan ¶
func (icm *ImmuClientMock) ZScan(ctx context.Context, request *schema.ZScanRequest) (*schema.ZEntries, error)
ZScan ...
type ImmuServiceClientMock ¶ added in v0.8.0
type ImmuServiceClientMock struct { schema.ImmuServiceClient ListUsersF func(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.UserList, error) GetUserF func(ctx context.Context, in *schema.UserRequest, opts ...grpc.CallOption) error CreateUserF func(ctx context.Context, in *schema.CreateUserRequest, opts ...grpc.CallOption) (*empty.Empty, error) ChangePasswordF func(ctx context.Context, in *schema.ChangePasswordRequest, opts ...grpc.CallOption) (*empty.Empty, error) DeactivateUserF func(ctx context.Context, in *schema.UserRequest, opts ...grpc.CallOption) (*empty.Empty, error) UpdateAuthConfigF func(ctx context.Context, in *schema.AuthConfig, opts ...grpc.CallOption) (*empty.Empty, error) UpdateMTLSConfigF func(ctx context.Context, in *schema.MTLSConfig, opts ...grpc.CallOption) (*empty.Empty, error) LoginF func(ctx context.Context, in *schema.LoginRequest, opts ...grpc.CallOption) (*schema.LoginResponse, error) LogoutF func(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) SetF func(ctx context.Context, in *schema.SetRequest, opts ...grpc.CallOption) (*schema.TxHeader, error) VerifiableSetF func(ctx context.Context, in *schema.VerifiableSetRequest, opts ...grpc.CallOption) (*schema.VerifiableTx, error) GetF func(ctx context.Context, in *schema.KeyRequest, opts ...grpc.CallOption) (*schema.Entry, error) VerifiableGetF func(ctx context.Context, in *schema.VerifiableGetRequest, opts ...grpc.CallOption) (*schema.VerifiableEntry, error) GetAllF func(ctx context.Context, in *schema.KeyListRequest, opts ...grpc.CallOption) (*schema.Entries, error) ExecAllF func(ctx context.Context, in *schema.ExecAllRequest, opts ...grpc.CallOption) (*schema.TxHeader, error) ScanF func(ctx context.Context, in *schema.ScanRequest, opts ...grpc.CallOption) (*schema.Entries, error) CountF func(ctx context.Context, in *schema.KeyPrefix, opts ...grpc.CallOption) (*schema.EntryCount, error) CountAllF func(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.EntryCount, error) TxByIdF func(ctx context.Context, in *schema.TxRequest, opts ...grpc.CallOption) (*schema.Tx, error) VerifiableTxByIdF func(ctx context.Context, in *schema.VerifiableTxRequest, opts ...grpc.CallOption) (*schema.VerifiableTx, error) HistoryF func(ctx context.Context, in *schema.HistoryRequest, opts ...grpc.CallOption) (*schema.Entries, error) HealthF func(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.HealthResponse, error) CurrentStateF func(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.ImmutableState, error) SetReferenceF func(ctx context.Context, in *schema.ReferenceRequest, opts ...grpc.CallOption) (*schema.TxHeader, error) VerifiableSetReferenceF func(ctx context.Context, in *schema.VerifiableReferenceRequest, opts ...grpc.CallOption) (*schema.VerifiableTx, error) ZAddF func(ctx context.Context, in *schema.ZAddRequest, opts ...grpc.CallOption) (*schema.TxHeader, error) VerifiableZAddF func(ctx context.Context, in *schema.VerifiableZAddRequest, opts ...grpc.CallOption) (*schema.VerifiableTx, error) ZScanF func(ctx context.Context, in *schema.ZScanRequest, opts ...grpc.CallOption) (*schema.ZEntries, error) CreateDatabaseF func(ctx context.Context, in *schema.Database, opts ...grpc.CallOption) (*empty.Empty, error) CreateDatabaseWithF func(ctx context.Context, in *schema.DatabaseSettings, opts ...grpc.CallOption) (*empty.Empty, error) UseDatabaseF func(ctx context.Context, in *schema.Database, opts ...grpc.CallOption) (*schema.UseDatabaseReply, error) UpdateDatabaseF func(ctx context.Context, in *schema.DatabaseSettings, opts ...grpc.CallOption) (*empty.Empty, error) ChangePermissionF func(ctx context.Context, in *schema.ChangePermissionRequest, opts ...grpc.CallOption) (*empty.Empty, error) SetActiveUserF func(ctx context.Context, in *schema.SetActiveUserRequest, opts ...grpc.CallOption) (*empty.Empty, error) DatabaseListF func(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.DatabaseListResponse, error) OpenSessionF func(ctx context.Context, in *schema.OpenSessionRequest, opts ...grpc.CallOption) (*schema.OpenSessionResponse, error) }
ImmuServiceClientMock ...
func (*ImmuServiceClientMock) ChangePassword ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) ChangePassword(ctx context.Context, in *schema.ChangePasswordRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*ImmuServiceClientMock) ChangePermission ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) ChangePermission(ctx context.Context, in *schema.ChangePermissionRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*ImmuServiceClientMock) Count ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) Count(ctx context.Context, in *schema.KeyPrefix, opts ...grpc.CallOption) (*schema.EntryCount, error)
func (*ImmuServiceClientMock) CountAll ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) CountAll(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.EntryCount, error)
func (*ImmuServiceClientMock) CreateDatabase ¶ added in v0.8.1
func (icm *ImmuServiceClientMock) CreateDatabase(ctx context.Context, in *schema.Database, opts ...grpc.CallOption) (*empty.Empty, error)
func (*ImmuServiceClientMock) CreateDatabaseWith ¶ added in v1.0.5
func (icm *ImmuServiceClientMock) CreateDatabaseWith(ctx context.Context, in *schema.DatabaseSettings, opts ...grpc.CallOption) (*empty.Empty, error)
func (*ImmuServiceClientMock) CreateUser ¶ added in v0.8.1
func (icm *ImmuServiceClientMock) CreateUser(ctx context.Context, in *schema.CreateUserRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*ImmuServiceClientMock) CurrentState ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) CurrentState(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.ImmutableState, error)
func (*ImmuServiceClientMock) DatabaseList ¶ added in v0.8.0
func (icm *ImmuServiceClientMock) DatabaseList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.DatabaseListResponse, error)
func (*ImmuServiceClientMock) DeactivateUser ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) DeactivateUser(ctx context.Context, in *schema.UserRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*ImmuServiceClientMock) ExecAll ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) ExecAll(ctx context.Context, in *schema.ExecAllRequest, opts ...grpc.CallOption) (*schema.TxHeader, error)
func (*ImmuServiceClientMock) Get ¶ added in v0.8.1
func (icm *ImmuServiceClientMock) Get(ctx context.Context, in *schema.KeyRequest, opts ...grpc.CallOption) (*schema.Entry, error)
func (*ImmuServiceClientMock) GetAll ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) GetAll(ctx context.Context, in *schema.KeyListRequest, opts ...grpc.CallOption) (*schema.Entries, error)
func (*ImmuServiceClientMock) GetUser ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) GetUser(ctx context.Context, in *schema.UserRequest, opts ...grpc.CallOption) error
func (*ImmuServiceClientMock) Health ¶ added in v0.8.0
func (icm *ImmuServiceClientMock) Health(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.HealthResponse, error)
func (*ImmuServiceClientMock) History ¶ added in v0.8.1
func (icm *ImmuServiceClientMock) History(ctx context.Context, in *schema.HistoryRequest, opts ...grpc.CallOption) (*schema.Entries, error)
func (*ImmuServiceClientMock) ListUsers ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) ListUsers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*schema.UserList, error)
func (*ImmuServiceClientMock) Login ¶ added in v0.8.0
func (icm *ImmuServiceClientMock) Login(ctx context.Context, in *schema.LoginRequest, opts ...grpc.CallOption) (*schema.LoginResponse, error)
func (*ImmuServiceClientMock) Logout ¶ added in v0.8.0
func (icm *ImmuServiceClientMock) Logout(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
func (*ImmuServiceClientMock) OpenSession ¶ added in v1.2.0
func (icm *ImmuServiceClientMock) OpenSession(ctx context.Context, in *schema.OpenSessionRequest, opts ...grpc.CallOption) (*schema.OpenSessionResponse, error)
func (*ImmuServiceClientMock) Scan ¶ added in v0.8.1
func (icm *ImmuServiceClientMock) Scan(ctx context.Context, in *schema.ScanRequest, opts ...grpc.CallOption) (*schema.Entries, error)
func (*ImmuServiceClientMock) Set ¶ added in v0.8.1
func (icm *ImmuServiceClientMock) Set(ctx context.Context, in *schema.SetRequest, opts ...grpc.CallOption) (*schema.TxHeader, error)
func (*ImmuServiceClientMock) SetActiveUser ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) SetActiveUser(ctx context.Context, in *schema.SetActiveUserRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*ImmuServiceClientMock) SetReference ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) SetReference(ctx context.Context, in *schema.ReferenceRequest, opts ...grpc.CallOption) (*schema.TxHeader, error)
func (*ImmuServiceClientMock) TxById ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) TxById(ctx context.Context, in *schema.TxRequest, opts ...grpc.CallOption) (*schema.Tx, error)
func (*ImmuServiceClientMock) UpdateAuthConfig ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) UpdateAuthConfig(ctx context.Context, in *schema.AuthConfig, opts ...grpc.CallOption) (*empty.Empty, error)
func (*ImmuServiceClientMock) UpdateDatabase ¶ added in v1.0.5
func (icm *ImmuServiceClientMock) UpdateDatabase(ctx context.Context, in *schema.DatabaseSettings, opts ...grpc.CallOption) (*empty.Empty, error)
func (*ImmuServiceClientMock) UpdateMTLSConfig ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) UpdateMTLSConfig(ctx context.Context, in *schema.MTLSConfig, opts ...grpc.CallOption) (*empty.Empty, error)
func (*ImmuServiceClientMock) UseDatabase ¶ added in v0.8.0
func (icm *ImmuServiceClientMock) UseDatabase(ctx context.Context, in *schema.Database, opts ...grpc.CallOption) (*schema.UseDatabaseReply, error)
func (*ImmuServiceClientMock) VerifiableGet ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) VerifiableGet(ctx context.Context, in *schema.VerifiableGetRequest, opts ...grpc.CallOption) (*schema.VerifiableEntry, error)
func (*ImmuServiceClientMock) VerifiableSet ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) VerifiableSet(ctx context.Context, in *schema.VerifiableSetRequest, opts ...grpc.CallOption) (*schema.VerifiableTx, error)
func (*ImmuServiceClientMock) VerifiableSetReference ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) VerifiableSetReference(ctx context.Context, in *schema.VerifiableReferenceRequest, opts ...grpc.CallOption) (*schema.VerifiableTx, error)
func (*ImmuServiceClientMock) VerifiableTxById ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) VerifiableTxById(ctx context.Context, in *schema.VerifiableTxRequest, opts ...grpc.CallOption) (*schema.VerifiableTx, error)
func (*ImmuServiceClientMock) VerifiableZAdd ¶ added in v0.9.0
func (icm *ImmuServiceClientMock) VerifiableZAdd(ctx context.Context, in *schema.VerifiableZAddRequest, opts ...grpc.CallOption) (*schema.VerifiableTx, error)
func (*ImmuServiceClientMock) ZAdd ¶ added in v0.8.1
func (icm *ImmuServiceClientMock) ZAdd(ctx context.Context, in *schema.ZAddRequest, opts ...grpc.CallOption) (*schema.TxHeader, error)
func (*ImmuServiceClientMock) ZScan ¶ added in v0.8.1
func (icm *ImmuServiceClientMock) ZScan(ctx context.Context, in *schema.ZScanRequest, opts ...grpc.CallOption) (*schema.ZEntries, error)
type PasswordReaderMock ¶
PasswordReaderMock ...
type TerminalReaderMock ¶
type TerminalReaderMock struct { Counter int Responses []string ReadFromTerminalYNF func(string) (string, error) }
TerminalReaderMock ...
func (*TerminalReaderMock) ReadFromTerminalYN ¶
func (t *TerminalReaderMock) ReadFromTerminalYN(def string) (selected string, err error)
ReadFromTerminalYN ...
type TokenServiceMock ¶ added in v0.7.1
type TokenServiceMock struct { tokenservice.TokenService GetTokenF func() (string, error) SetTokenF func(database string, token string) error IsTokenPresentF func() (bool, error) DeleteTokenF func() error }
func DefaultTokenServiceMock ¶ added in v0.7.1
func DefaultTokenServiceMock() *TokenServiceMock
DefaultHomedirServiceMock ...
func (TokenServiceMock) DeleteToken ¶ added in v0.7.1
func (ts TokenServiceMock) DeleteToken() error
func (TokenServiceMock) GetDatabase ¶ added in v0.7.1
func (ts TokenServiceMock) GetDatabase() (string, error)
func (TokenServiceMock) GetToken ¶ added in v0.7.1
func (ts TokenServiceMock) GetToken() (string, error)
func (TokenServiceMock) IsTokenPresent ¶ added in v0.7.1
func (ts TokenServiceMock) IsTokenPresent() (bool, error)
func (TokenServiceMock) SetToken ¶ added in v0.7.1
func (ts TokenServiceMock) SetToken(database string, token string) error
func (TokenServiceMock) WithHds ¶ added in v0.7.1
func (ts TokenServiceMock) WithHds(hds homedir.HomedirService) tokenservice.TokenService
func (TokenServiceMock) WithTokenFileName ¶ added in v0.7.1
func (ts TokenServiceMock) WithTokenFileName(tfn string) tokenservice.TokenService