Load loads environment variables from various sources
(ctx context.Context)
| 14 | |
| 15 | // Load loads environment variables from various sources |
| 16 | func Load(ctx context.Context) error { |
| 17 | if err := loadAWSSecret(ctx); err != nil { |
| 18 | return err |
| 19 | } |
| 20 | |
| 21 | if err := loadAWSSystemManagerParams(ctx); err != nil { |
| 22 | return err |
| 23 | } |
| 24 | |
| 25 | if err := loadGCPSecret(ctx); err != nil { |
| 26 | return err |
| 27 | } |
| 28 | |
| 29 | if err := loadLocalFile(); err != nil { |
| 30 | return err |
| 31 | } |
| 32 | |
| 33 | return nil |
| 34 | } |
| 35 | |
| 36 | // loadLocalFile loads environment variables from a local file if IMGPROXY_ENV_LOCAL_FILE_PATH is set |
| 37 | func loadLocalFile() error { |
no test coverage detected