Versions in this module Expand all Collapse all v0 v0.4.1 Jan 15, 2024 Changes in this version + const AllowedAuthProvidersEnvVarKeyName + const AssumeRoleEnabledEnvVarKeyName + const CredentialsPath + const GrafargAssumeRoleExternalIdKeyName + const ProfileName + const SessionDurationEnvVarKeyName + func GetUserAgentString(name string) string + func ShouldCacheQuery(resp *backend.QueryDataResponse) bool + type AWSDatasourceSettings struct + AccessKey string + AssumeRoleARN string + AuthType AuthType + DefaultRegion string + Endpoint string + ExternalID string + Profile string + Region string + SecretKey string + SessionToken string + func (s *AWSDatasourceSettings) Load(config backend.DataSourceInstanceSettings) error + type AmazonSessionProvider func(region string, s AWSDatasourceSettings) (*session.Session, error) + type AsyncAWSDatasource struct + func NewAsyncAWSDatasource(driver AsyncDriver) *AsyncAWSDatasource + func (ds *AsyncAWSDatasource) NewDatasource(settings backend.DataSourceInstanceSettings) (instancemgmt.Instance, error) + func (ds *AsyncAWSDatasource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error) + type AsyncDB interface + CancelQuery func(ctx context.Context, queryID string) error + GetQueryID func(ctx context.Context, query string, args ...interface{}) (bool, string, error) + GetRows func(ctx context.Context, queryID string) (driver.Rows, error) + Ping func(ctx context.Context) error + QueryStatus func(ctx context.Context, queryID string) (QueryStatus, error) + StartQuery func(ctx context.Context, query string, args ...interface{}) (string, error) + type AsyncDriver interface + GetAsyncDB func(settings backend.DataSourceInstanceSettings, queryArgs json.RawMessage) (AsyncDB, error) + type AsyncQuery struct + Meta QueryMeta + QueryID string + func GetQuery(query backend.DataQuery) (*AsyncQuery, error) + type AuthSettings struct + AllowedAuthProviders []string + AssumeRoleEnabled bool + SessionDuration *time.Duration + func ReadAuthSettingsFromEnvironmentVariables() *AuthSettings + type AuthType int + const AuthTypeDefault + const AuthTypeEC2IAMRole + const AuthTypeGrafargAssumeRole + const AuthTypeKeys + const AuthTypeSharedCreds + func ToAuthType(authType string) (AuthType, error) + func (at *AuthType) MarshalJSON() ([]byte, error) + func (at *AuthType) UnmarshalJSON(b []byte) error + func (at AuthType) String() string + type QueryMeta struct + QueryFlow string + type QueryStatus uint32 + const QueryCanceled + const QueryFailed + const QueryFinished + const QueryRunning + const QuerySubmitted + const QueryUnknown + func (qs QueryStatus) Finished() bool + func (qs QueryStatus) String() string + type SessionCache struct + func NewSessionCache() *SessionCache + func (sc *SessionCache) GetSession(c SessionConfig) (*session.Session, error) + type SessionConfig struct + HTTPClient *http.Client + Settings AWSDatasourceSettings + UserAgentName *string