mock

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseMockSQLDBService

func CloseMockSQLDBService(s *MockSQLDBService) error

Types

type MockHasher

type MockHasher struct{}

func NewMockHasher

func NewMockHasher() *MockHasher

func (*MockHasher) CompareHashAndPassword

func (h *MockHasher) CompareHashAndPassword(hashedPassword string, password string) error

func (*MockHasher) HashPassword

func (h *MockHasher) HashPassword(password string) (string, error)

type MockSQLDBService

type MockSQLDBService struct {
	Db   *sql.DB
	Mock sqlmock.Sqlmock
}

func NewMockSQLDBService

func NewMockSQLDBService() (*MockSQLDBService, error)

func (*MockSQLDBService) ExecContext

func (s *MockSQLDBService) ExecContext(query string, args ...interface{}) (sql.Result, error)

func (*MockSQLDBService) QueryContext

func (s *MockSQLDBService) QueryContext(query string, args ...interface{}) (*sql.Rows, error)

func (*MockSQLDBService) QueryRowContext

func (s *MockSQLDBService) QueryRowContext(query string, args ...interface{}) *sql.Row

Jump to

Keyboard shortcuts

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