Documentation
¶
Index ¶
- Constants
- func ConfigInstance() interface{}
- func GetConfig(connection *plugin.Connection) crcConfig
- func GetConsoleDotClient(_ context.Context, d *plugin.QueryData, timeout time.Duration) (*http.Client, error)
- func LogErrorUsingSteampipeLogger(ctx context.Context, table, errType string, err error)
- func MakeAPIRequest(ctx context.Context, d *plugin.QueryData, method, endpoint string, ...) (*http.Response, error)
- type SSOClient
- type TokenResponse
Constants ¶
View Source
const DefaultTimeout = 20 * time.Second
Variables ¶
This section is empty.
Functions ¶
func ConfigInstance ¶
func ConfigInstance() interface{}
func GetConfig ¶
func GetConfig(connection *plugin.Connection) crcConfig
GetConfig :: retrieve and cast connection config from query data
func GetConsoleDotClient ¶
func GetConsoleDotClient(_ context.Context, d *plugin.QueryData, timeout time.Duration) (*http.Client, error)
GetConsoleDotClient returns an HTTP client with SSO authentication for the console.redhat.com APIs
func LogErrorUsingSteampipeLogger ¶
LogErrorUsingSteampipeLogger logs an error using the steampipe logger
Types ¶
type SSOClient ¶
type SSOClient struct { ClientID string ClientSecret string Token string TokenURL string TokenExpiry time.Time sync.Mutex Transport http.RoundTripper }
SSOClient struct to hold SSO credentials and token
func NewSSOClient ¶
NewSSOClient creates a new SSOClient
type TokenResponse ¶
type TokenResponse struct { AccessToken string `json:"access_token"` ExpiresIn int64 `json:"expires_in"` }
TokenResponse struct to unmarshal the token response
Click to show internal directories.
Click to hide internal directories.