provider

package
v0.66.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 23 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureProvider

func ConfigureProvider(s *schema.ResourceData) (interface{}, error)

func DSN

func DSN(
	account string,
	user string,
	password string,
	browserAuth bool,
	privateKeyPath string,
	privateKey string,
	privateKeyPassphrase string,
	oauthAccessToken string,
	region string,
	role string,
	host string,
	protocol string,
	port int,
	warehouse string,
	insecureMode bool,
	profile string,
) (string, error)

func GetDatabaseHandleFromEnv added in v0.43.1

func GetDatabaseHandleFromEnv() (db *sql.DB, err error)

func GetGrantResources added in v0.34.0

func GetGrantResources() resources.TerraformGrantResources

func GetOauthAccessToken added in v0.34.0

func GetOauthAccessToken(
	endPoint,
	clientID,
	clientSecret string,
	data url.Values,
) (string, error)

func GetOauthData added in v0.34.0

func GetOauthData(refreshToken, redirectURL string) url.Values

func GetOauthRequest added in v0.34.0

func GetOauthRequest(dataContent io.Reader, endPoint, clientID, clientSecret string) (*http.Request, error)

func ParsePrivateKey added in v0.34.0

func ParsePrivateKey(privateKeyBytes []byte, passhrase []byte) (*rsa.PrivateKey, error)

func Provider

func Provider() *schema.Provider

Provider is a provider.

func ReadPrivateKeyFile added in v0.34.0

func ReadPrivateKeyFile(privateKeyPath string) ([]byte, error)

Types

type Result added in v0.34.0

type Result struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	ExpiresIn   int    `json:"expires_in"`
}

Jump to

Keyboard shortcuts

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