modulepackage
0.0.0-20240906203850-b5930ce34fca
Repository: https://github.com/doublecloud/go-sdk.git
Documentation: pkg.go.dev
# README
DoubleCloud Go SDK
Go SDK for DoubleCloud API.
Installation
go install github.com/doublecloud/go-sdk@latest
Usage examples
Initializing SDK
key, err := iamkey.ReadFromJSONFile(*flags.saPath)
if err != nil {
panic(err)
}
creds, err := dc.ServiceAccountKey(key)
if err != nil {
panic(err)
}
sdk, err := dc.Build(ctx, dc.Config{
Credentials: creds,
})
More examples
More examples can be found in examples directory.
# Functions
Build creates an SDK instance.
No description provided by the author
No description provided by the author
No description provided by the author
ServiceAccountKey returns credentials for the given IAM Key.
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
Config is a config that is used to create SDK instance.
No description provided by the author
No description provided by the author
IAMTokenCredentials implements Credentials with IAM token as-is.
No description provided by the author
NoCredentials implements Credentials, it allows to create unauthenticated connections.
SDK is a DoubleCloud SDK.
No description provided by the author
# Interfaces
No description provided by the author
Credentials is an abstraction of API authorization credentials.
ExchangeableCredentials can be exchanged for IAM Token in IAM Token Service, that can be used to authorize API calls.
NonExchangeableCredentials allows to get IAM Token without calling IAM Token Service.