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

Function NewStatic

pkg/credentials/static.go:42–51  ·  view source on GitHub ↗

NewStatic returns a pointer to a new Credentials object wrapping a static credentials value provider.

(id, secret, token string, signerType SignatureType)

Source from the content-addressed store, hash-verified

40// NewStatic returns a pointer to a new Credentials object
41// wrapping a static credentials value provider.
42func NewStatic(id, secret, token string, signerType SignatureType) *Credentials {
43 return New(&Static{
44 Value: Value{
45 AccessKeyID: id,
46 SecretAccessKey: secret,
47 SessionToken: token,
48 SignerType: signerType,
49 },
50 })
51}
52
53// Retrieve returns the static credentials.
54func (s *Static) Retrieve() (Value, error) {

Callers 3

TestStaticGetFunction · 0.85
NewStaticV2Function · 0.85
NewStaticV4Function · 0.85

Calls 1

NewFunction · 0.70

Tested by 1

TestStaticGetFunction · 0.68