Documentation
¶
Index ¶
- Constants
- func ConstructNestedError(message string, err error) error
- func ConstructUserAgentString() (ua_string string)
- func GetHostNameURL() string
- func ParseDSNString(dsn string) (*fireboltSettings, error)
- func SplitStatements(sql string) ([]string, error)
- type AuthenticationResponse
- type Client
- func (c *Client) GetAccountIdByName(ctx context.Context, accountName string) (string, error)
- func (c *Client) GetDefaultAccountId(ctx context.Context) (string, error)
- func (c *Client) GetEngineIdByName(ctx context.Context, engineName string, accountId string) (string, error)
- func (c *Client) GetEngineUrlByDatabase(ctx context.Context, databaseName string, accountId string) (string, error)
- func (c *Client) GetEngineUrlById(ctx context.Context, engineId string, accountId string) (string, error)
- func (c *Client) GetEngineUrlByName(ctx context.Context, engineName string, accountId string) (string, error)
- func (c *Client) Query(ctx context.Context, engineUrl, databaseName, query string, ...) (*QueryResponse, error)
- type Column
- type FireboltDriver
- type FireboltResult
- type QueryResponse
Constants ¶
const ( ContentTypeForm = "application/x-www-form-urlencoded" ContentTypeJSON = "application/json" )
const ( UsernamePasswordURLSuffix = "/auth/v1/login" ServiceAccountLoginURLSuffix = "/auth/v1/token" DefaultAccountURL = "/iam/v2/account" AccountIdByNameURL = "/iam/v2/accounts:getIdByName" EngineIdByNameURL = "/core/v1/accounts/%s/engines:getIdByName" EngineByIdURL = "/core/v1/accounts/%s/engines/%s" EngineUrlByDatabaseNameURL = "/core/v1/accounts/%s/engines:getURLByDatabaseName" )
Variables ¶
This section is empty.
Functions ¶
func ConstructNestedError ¶
func ConstructUserAgentString ¶
func ConstructUserAgentString() (ua_string string)
ConstructUserAgentString returns a string with go, GoSDK and os type and versions additionally user can set "FIREBOLT_GO_DRIVERS" and "FIREBOLT_GO_CLIENTS" env variable, and they will be concatenated with the final user-agent string
func GetHostNameURL ¶
func GetHostNameURL() string
GetHostNameURL returns a hostname url, either default or overwritten with the environment variable
func ParseDSNString ¶
ParseDSNString parses a dsn in a format: firebolt://username:password@db_name[/engine_name][?account_name=organization] returns a settings object where all parsed values are populated returns an error if required fields couldn't be parsed or if after parsing some characters were left unparsed
func SplitStatements ¶ added in v0.0.6
SplitStatements split multiple statements into a list of statements
Types ¶
type AuthenticationResponse ¶
type Client ¶
func Authenticate ¶
Authenticate sends an authentication request, and returns a newly constructed client object
func (*Client) GetAccountIdByName ¶
GetAccountIdByName returns account ID based on account name
func (*Client) GetDefaultAccountId ¶
GetDefaultAccount returns an id of the default account
func (*Client) GetEngineIdByName ¶
func (c *Client) GetEngineIdByName(ctx context.Context, engineName string, accountId string) (string, error)
GetEngineIdByName returns engineId based on engineName and accountId
func (*Client) GetEngineUrlByDatabase ¶
func (c *Client) GetEngineUrlByDatabase(ctx context.Context, databaseName string, accountId string) (string, error)
GetEngineUrlByDatabase return URL of the default engine based on databaseName and accountName
func (*Client) GetEngineUrlById ¶
func (c *Client) GetEngineUrlById(ctx context.Context, engineId string, accountId string) (string, error)
GetEngineUrlById returns engine url based on engineId and accountId
type FireboltDriver ¶
type FireboltDriver struct {
// contains filtered or unexported fields
}
type FireboltResult ¶
type FireboltResult struct {
}
func (FireboltResult) LastInsertId ¶
func (r FireboltResult) LastInsertId() (int64, error)
LastInsertId returns last inserted ID, not supported by firebolt
func (FireboltResult) RowsAffected ¶
func (r FireboltResult) RowsAffected() (int64, error)
RowsAffected returns a number of affected rows, not supported by firebolt