New returns a Store backed by the cam.db at dbPath, or the default path when dbPath is empty.
(dbPath string)
| 65 | // New returns a Store backed by the cam.db at dbPath, or the default path when |
| 66 | // dbPath is empty. |
| 67 | func New(dbPath string) *Store { |
| 68 | if dbPath == "" { |
| 69 | dbPath = appstate.DefaultPath() |
| 70 | } |
| 71 | return &Store{dbPath: dbPath} |
| 72 | } |
| 73 | |
| 74 | // Init ensures the schema exists and the managed directory is present. |
| 75 | func (s *Store) Init(ctx context.Context) error { |