Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSDatasourceSettings ¶
type AWSDatasourceSettings struct { Profile string `json:"profile"` Region string `json:"region"` AuthType AuthType `json:"authType"` AssumeRoleARN string `json:"assumeRoleARN"` ExternalID string `json:"externalId"` // Override the client endpoint Endpoint string `json:"endpoint"` //go:deprecated Use Region instead DefaultRegion string `json:"defaultRegion"` // Loaded from DecryptedSecureJSONData (not the json object) AccessKey string `json:"-"` SecretKey string `json:"-"` }
DatasourceSettings holds basic connection info
func (*AWSDatasourceSettings) Load ¶
func (s *AWSDatasourceSettings) Load(config backend.DataSourceInstanceSettings) error
LoadSettings will read and validate Settings from the DataSourceConfg
type AmazonSessionProvider ¶
type AmazonSessionProvider func(region string, s AWSDatasourceSettings) (*session.Session, error)
AmazonSessionProvider will return a session (perhaps cached) for given region and settings
type AuthType ¶
type AuthType int
func (*AuthType) MarshalJSON ¶
MarshalJSON marshals the enum as a quoted json string
func (*AuthType) UnmarshalJSON ¶
UnmarshalJSON unmashals a quoted json string to the enum value
type SessionCache ¶
type SessionCache struct {
// contains filtered or unexported fields
}
SessionCache cache sessions for a while
func NewSessionCache ¶
func NewSessionCache() SessionCache
NewSessionCache creates a new session cache
func (*SessionCache) GetSession ¶
func (sc *SessionCache) GetSession(region string, s AWSDatasourceSettings) (*session.Session, error)
GetSession returns a session from the config and possible region overrides -- implements AmazonSessionProvider
Click to show internal directories.
Click to hide internal directories.