PersistAuthFiles uploads the provided auth files to the object storage backend.
(ctx context.Context, _ string, paths ...string)
| 292 | |
| 293 | // PersistAuthFiles uploads the provided auth files to the object storage backend. |
| 294 | func (s *ObjectTokenStore) PersistAuthFiles(ctx context.Context, _ string, paths ...string) error { |
| 295 | if len(paths) == 0 { |
| 296 | return nil |
| 297 | } |
| 298 | |
| 299 | s.mu.Lock() |
| 300 | defer s.mu.Unlock() |
| 301 | |
| 302 | for _, p := range paths { |
| 303 | trimmed := strings.TrimSpace(p) |
| 304 | if trimmed == "" { |
| 305 | continue |
| 306 | } |
| 307 | abs := trimmed |
| 308 | if !filepath.IsAbs(abs) { |
| 309 | abs = filepath.Join(s.authDir, trimmed) |
| 310 | } |
| 311 | if err := s.uploadAuth(ctx, abs); err != nil { |
| 312 | return err |
| 313 | } |
| 314 | } |
| 315 | return nil |
| 316 | } |
| 317 | |
| 318 | // PersistConfig uploads the local configuration file to the object storage backend. |
| 319 | func (s *ObjectTokenStore) PersistConfig(ctx context.Context) error { |
nothing calls this directly
no test coverage detected