Documentation ¶
Index ¶
- type Connector
- func (c Connector) CreateLogin(username string, password string) error
- func (c Connector) DeleteLogin(username string) error
- func (c Connector) Execute(command string, args ...interface{}) error
- func (c Connector) GetLogin(username string) (*Login, error)
- func (c Connector) Query(query string, scanner func(*sql.Rows) error, args ...interface{}) error
- func (c Connector) UpdateLogin(username string, password string) error
- type Login
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
ConnectionString string
}
Connector stores connection information for the SQL Server instance and contains instance methods that can run SQL queries and commands
func (Connector) CreateLogin ¶
CreateLogin connects to the SQL Database to create a login with the provided credentials
func (Connector) DeleteLogin ¶
DeleteLogin connects to the SQL Database and removes a login with the provided username, if it exists. If it does not exist, this is a noop.
func (Connector) GetLogin ¶
GetLogin reads a login from the SQL Database, if it exists. If it does not, no error is returned, but the returned Login is nil
Click to show internal directories.
Click to hide internal directories.