Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ProtocolHmac will hold access key and secret key credential. // // HMAC means hash-based message authentication code, it may be inaccurate to represent credential // protocol ak/sk(access key + secret key with hmac), but it's simple and no confuse with other // protocol, so just keep this. // // value = [Access Key, Secret Key] ProtocolHmac = "hmac" // ProtocolAPIKey will hold api key credential. // // value = [API Key] ProtocolAPIKey = "apikey" // ProtocolFile will hold file credential. // // value = [File Path], service decide how to use this file ProtocolFile = "file" // ProtocolEnv will represent credential from env. // // value = [], service retrieves credential value from env. ProtocolEnv = "env" // ProtocolBase64 will represents credential binary data in base64 // // Storage service like gcs will take token files as input, we provide base64 protocol so that user // can pass token binary data directly. ProtocolBase64 = "base64" )
Variables ¶
View Source
var ( // ErrUnsupportedProtocol means protocol is unsupported ErrUnsupportedProtocol = errors.New("unsupported protocol") // ErrInvalidValue means value is invalid. ErrInvalidValue = errors.New("invalid value") )
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider will provide credential protocol and values.
Click to show internal directories.
Click to hide internal directories.