MCPcopy
hub / github.com/minio/minio-go / Provider

Interface Provider

pkg/credentials/credentials.go:59–76  ·  pkg/credentials/credentials.go::Provider

A Provider is the interface for any component which will provide credentials Value. A provider is required to manage its own Expired state, and what to be expired means.

Source from the content-addressed store, hash-verified

57// Value. A provider is required to manage its own Expired state, and what to
58// be expired means.
59type Provider interface {
60 // RetrieveWithCredContext returns nil if it successfully retrieved the
61 // value. Error is returned if the value were not obtainable, or empty.
62 // optionally takes CredContext for additional context to retrieve credentials.
63 RetrieveWithCredContext(cc *CredContext) (Value, error)
64
65 // Retrieve returns nil if it successfully retrieved the value.
66 // Error is returned if the value were not obtainable, or empty.
67 //
68 // Deprecated: Retrieve() exists for historical compatibility and should not
69 // be used. To get new credentials use the RetrieveWithCredContext function
70 // to ensure the proper context (i.e. HTTP client) will be used.
71 Retrieve() (Value, error)
72
73 // IsExpired returns if the credentials are no longer valid, and need
74 // to be retrieved.
75 IsExpired() bool
76}
77
78// CredContext is passed to the Retrieve function of a provider to provide
79// some additional context to retrieve credentials.

Callers 11

GetWithContextMethod · 0.65
RetrieveMethod · 0.65
TestFileAWSFunction · 0.65
IsExpiredMethod · 0.65
isExpiredMethod · 0.65
TestIAMFunction · 0.65
TestIAMIsExpiredFunction · 0.65
TestEcsTaskFunction · 0.65
TestEcsTaskFullURIFunction · 0.65
TestStsFunction · 0.65

Implementers 7

testCredProviderpkg/credentials/chain_test.go
Chainpkg/credentials/chain.go
EnvMiniopkg/credentials/env_minio.go
FileMinioClientpkg/credentials/file_minio_client.go
credProviderpkg/credentials/credentials_test.go
EnvAWSpkg/credentials/env_aws.go
Staticpkg/credentials/static.go

Calls

no outgoing calls

Tested by

no test coverage detected