Documentation
¶
Index ¶
- Variables
- func AppendAPIKeyToURL(apiUrl string, apiKey string) string
- func MultipartAllDiscoveries(apiKey string, cleannames []string) (map[string]bool, error)
- func ReqWithBackoff(req *http.Request, client *http.Client) (*http.Response, error)
- func TestKeyServicePair(apiKey string, service string, referrer string) (bool, error)
- func TestKeyValidity(apiKey string) (bool, error)
- type DiscoveryItem
- type GapisApiItem
- type GapisContainer
- type GoogleErrorResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var GetClient = sync.OnceValue(func() *http.Client { return &http.Client{ Transport: &http3.Transport{ EnableDatagrams: true, }, Timeout: 20 * time.Second, } })
View Source
var GoogleApiList = []string{}/* 506 elements not displayed */
Functions ¶
func AppendAPIKeyToURL ¶
Parse query params and append the API key to it.
func MultipartAllDiscoveries ¶
WIP - just need to figure out how to use this damn thing
func ReqWithBackoff ¶
func TestKeyServicePair ¶
func TestKeyValidity ¶
Types ¶
type DiscoveryItem ¶
type DiscoveryItem struct {
Title string `json:"title"`
Description string `json:"description"`
DiscoveryRestUrl string `json:"discoveryRestUrl"`
Version string `json:"version"`
Name string `json:"name"`
}
func GetDiscoveryEndpoints ¶
func GetDiscoveryEndpoints() ([]DiscoveryItem, error)
This returns a list of discovery endpoints
type GapisApiItem ¶
type GapisApiItem struct {
Description string `json:"description"`
Title string `json:"title"`
Host string `json:"hostname"`
Version string `json:"majorVersion"` // This would be the preferred version from what I can tell
}
func GetEndpointsFromGapis ¶
func GetEndpointsFromGapis() ([]GapisApiItem, error)
type GapisContainer ¶
type GapisContainer struct {
Apis []GapisApiItem `json:"apis"`
}
type GoogleErrorResponse ¶
type GoogleErrorResponse struct {
Error *struct {
Message string `json:"message"`
} `json:"error"`
}
Click to show internal directories.
Click to hide internal directories.