Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface {
ExecuteQuery(query string, databaseInfo *models.DBConnectionModel) (*[]byte, error)
}
An Executor executes queries on a database
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
A MockService implements the Executor interface (mock)
func NewMockService ¶
func NewMockService() *MockService
NewMockService creates a new service (mock)
Return: *Mockservice, the mock new service
func (*MockService) ExecuteQuery ¶
func (s *MockService) ExecuteQuery(query string, databaseUsername string, databasePassword string, databaseHost string, databasePort int, internalDatabase string) (*[]byte, error)
ExecuteQuery sends the query to a database and parses the result (mock)
query: string, the query being sent databaseUsername: string, the username of the database databasePassword: string, the password of the database databaseHost: string, the host of the database databasePort: int, the port of the database internalDatabase: string, the internal database Return: (*[]byte, error), the query result and an error if there is one
func (*MockService) ToggleError ¶
func (s *MockService) ToggleError()
ToggleError decides whether the convert function throws an error
Click to show internal directories.
Click to hide internal directories.