A FileMinioClient retrieves credentials from the current user's home directory, and keeps track if those credentials are expired. Configuration file example: $HOME/.mc/config.json
| 29 | // |
| 30 | // Configuration file example: $HOME/.mc/config.json |
| 31 | type FileMinioClient struct { |
| 32 | // Path to the shared credentials file. |
| 33 | // |
| 34 | // If empty will look for "MINIO_SHARED_CREDENTIALS_FILE" env variable. If the |
| 35 | // env value is empty will default to current user's home directory. |
| 36 | // Linux/OSX: "$HOME/.mc/config.json" |
| 37 | // Windows: "%USERALIAS%\mc\config.json" |
| 38 | Filename string |
| 39 | |
| 40 | // MinIO Alias to extract credentials from the shared credentials file. If empty |
| 41 | // will default to environment variable "MINIO_ALIAS" or "s3" if |
| 42 | // environment variable is also not set. |
| 43 | Alias string |
| 44 | |
| 45 | // retrieved states if the credentials have been successfully retrieved. |
| 46 | retrieved bool |
| 47 | } |
| 48 | |
| 49 | // NewFileMinioClient returns a pointer to a new Credentials object |
| 50 | // wrapping the Alias file provider. |
nothing calls this directly
no outgoing calls
no test coverage detected