Documentation
¶
Index ¶
Constants ¶
View Source
const XAuthTokenHeader = "X-Auth-Token" // #nosec G101
XAuthTokenHeader is Scaleway standard auth header
Variables ¶
This section is empty.
Functions ¶
func HideSecretKey ¶
Types ¶
type AccessKeyOnly ¶
type AccessKeyOnly struct { // auth config may contain an access key without being authenticated AccessKey string }
func NewAccessKeyOnly ¶
func NewAccessKeyOnly(accessKey string) *AccessKeyOnly
NewNoAuth return an auth with no authentication method
func (*AccessKeyOnly) AnonymizedHeaders ¶
func (t *AccessKeyOnly) AnonymizedHeaders() http.Header
func (*AccessKeyOnly) Headers ¶
func (t *AccessKeyOnly) Headers() http.Header
type Auth ¶
type Auth interface { // Headers returns headers that must be add to the http request Headers() http.Header // AnonymizedHeaders returns an anonymised version of Headers() // This method could be use for logging purpose. AnonymizedHeaders() http.Header }
Auth implement methods required for authentication. Valid authentication are currently a token or no auth.
type Token ¶
Token is the pair accessKey + secretKey. This type is public because it's an internal package.
func (*Token) AnonymizedHeaders ¶
AnonymizedHeaders returns an anonymized version of Headers() This method could be use for logging purpose.
Click to show internal directories.
Click to hide internal directories.