MCPcopy Create free account
hub / github.com/cloudbase/garm / Validate

Method Validate

config/config.go:575–589  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

573}
574
575func (s *SQLite) Validate() error {
576 if s.DBFile == "" {
577 return fmt.Errorf("no valid db_file was specified")
578 }
579
580 if !filepath.IsAbs(s.DBFile) {
581 return fmt.Errorf("please specify an absolute path for db_file")
582 }
583
584 parent := filepath.Dir(s.DBFile)
585 if _, err := os.Stat(parent); err != nil {
586 return fmt.Errorf("parent directory of db_file does not exist: %w", err)
587 }
588 return nil
589}
590
591func (s *SQLite) BlobDBFile() (string, error) {
592 if err := s.Validate(); err != nil {

Callers 1

BlobDBFileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected