New creates a new in memory credential store
(opts ...Options)
| 119 | |
| 120 | // New creates a new in memory credential store |
| 121 | func New(opts ...Options) (credentials.Store, error) { |
| 122 | m := &Config{ |
| 123 | memoryCredentials: make(map[string]types.AuthConfig), |
| 124 | } |
| 125 | for _, opt := range opts { |
| 126 | if err := opt(m); err != nil { |
| 127 | return nil, err |
| 128 | } |
| 129 | } |
| 130 | return m, nil |
| 131 | } |
no outgoing calls