Documentation
¶
Overview ¶
Package sqlite provides SQLite database storage for clonr.
Package sqlite provides SQLite database storage for clonr.
Index ¶
- type Migration
- type MigrationRecord
- type Migrator
- func (m *Migrator) AppliedMigrations() ([]MigrationRecord, error)
- func (m *Migrator) CurrentVersion() (int, error)
- func (m *Migrator) LoadMigrations() ([]Migration, error)
- func (m *Migrator) MigrateDown() error
- func (m *Migrator) MigrateTo(targetVersion int) error
- func (m *Migrator) MigrateUp() error
- func (m *Migrator) PendingMigrations() ([]Migration, error)
- type Store
- func (s *Store) Close() error
- func (s *Store) DeleteProfile(name string) error
- func (s *Store) DeleteRegisteredClient(clientID string) error
- func (s *Store) DeleteStandaloneClient(id string) error
- func (s *Store) DeleteStandaloneConfig() error
- func (s *Store) DeleteStandaloneConnection(name string) error
- func (s *Store) DeleteSyncedData(connectionName, dataType, name string) error
- func (s *Store) DeleteWorkspace(name string) error
- func (s *Store) GetActiveProfile() (*model.Profile, error)
- func (s *Store) GetActiveWorkspace() (*model.Workspace, error)
- func (s *Store) GetAllRepos() ([]*model.Repository, error)
- func (s *Store) GetConfig() (*model.Config, error)
- func (s *Store) GetPendingRegistration(clientID string) (*standalone.ClientRegistration, error)
- func (s *Store) GetProfile(name string) (*model.Profile, error)
- func (s *Store) GetRegisteredClient(clientID string) (*standalone.RegisteredClient, error)
- func (s *Store) GetRepos(workspace string, favoritesOnly bool) ([]*model.Repository, error)
- func (s *Store) GetReposByWorkspace(workspace string) ([]*model.Repository, error)
- func (s *Store) GetServerEncryptionConfig() (*standalone.ServerEncryptionConfig, error)
- func (s *Store) GetStandaloneClients() ([]*standalone.Client, error)
- func (s *Store) GetStandaloneConfig() (*standalone.StandaloneConfig, error)
- func (s *Store) GetStandaloneConnection(name string) (*standalone.StandaloneConnection, error)
- func (s *Store) GetSyncedData(connectionName, dataType, name string) (*standalone.SyncedData, error)
- func (s *Store) GetWorkspace(name string) (*model.Workspace, error)
- func (s *Store) InsertRepoIfNotExists(u *url.URL, path string) error
- func (s *Store) ListPendingRegistrations() ([]*standalone.ClientRegistration, error)
- func (s *Store) ListProfiles() ([]*model.Profile, error)
- func (s *Store) ListRegisteredClients() ([]*standalone.RegisteredClient, error)
- func (s *Store) ListStandaloneConnections() ([]*standalone.StandaloneConnection, error)
- func (s *Store) ListSyncedData(connectionName string) ([]*standalone.SyncedData, error)
- func (s *Store) ListSyncedDataByState(state standalone.SyncState) ([]*standalone.SyncedData, error)
- func (s *Store) ListWorkspaces() ([]*model.Workspace, error)
- func (s *Store) Ping() error
- func (s *Store) ProfileExists(name string) (bool, error)
- func (s *Store) RemovePendingRegistration(clientID string) error
- func (s *Store) RemoveRepoByURL(u *url.URL) error
- func (s *Store) RepoExistsByPath(path string) (bool, error)
- func (s *Store) RepoExistsByURL(u *url.URL) (bool, error)
- func (s *Store) SaveConfig(cfg *model.Config) error
- func (s *Store) SavePendingRegistration(reg *standalone.ClientRegistration) error
- func (s *Store) SaveProfile(profile *model.Profile) error
- func (s *Store) SaveRegisteredClient(client *standalone.RegisteredClient) error
- func (s *Store) SaveRepo(u *url.URL, path string) error
- func (s *Store) SaveRepoWithWorkspace(u *url.URL, path, workspace string) error
- func (s *Store) SaveServerEncryptionConfig(config *standalone.ServerEncryptionConfig) error
- func (s *Store) SaveStandaloneClient(client *standalone.Client) error
- func (s *Store) SaveStandaloneConfig(config *standalone.StandaloneConfig) error
- func (s *Store) SaveStandaloneConnection(conn *standalone.StandaloneConnection) error
- func (s *Store) SaveSyncedData(data *standalone.SyncedData) error
- func (s *Store) SaveWorkspace(workspace *model.Workspace) error
- func (s *Store) SetActiveProfile(name string) error
- func (s *Store) SetActiveWorkspace(name string) error
- func (s *Store) SetFavoriteByURL(urlStr string, fav bool) error
- func (s *Store) UpdateRepoTimestamp(urlStr string) error
- func (s *Store) UpdateRepoWorkspace(urlStr, workspace string) error
- func (s *Store) WorkspaceExists(name string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MigrationRecord ¶
MigrationRecord represents a record in the schema_migrations table.
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator handles database migrations.
func NewMigrator ¶
NewMigrator creates a new migration handler.
func (*Migrator) AppliedMigrations ¶
func (m *Migrator) AppliedMigrations() ([]MigrationRecord, error)
AppliedMigrations returns all applied migrations.
func (*Migrator) CurrentVersion ¶
CurrentVersion returns the current schema version.
func (*Migrator) LoadMigrations ¶
LoadMigrations loads all migrations from the embedded filesystem.
func (*Migrator) MigrateDown ¶
MigrateDown rolls back the last migration.
func (*Migrator) PendingMigrations ¶
PendingMigrations returns migrations that have not been applied.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements the store.Store interface using SQLite.
func (*Store) DeleteProfile ¶
func (*Store) DeleteRegisteredClient ¶
func (*Store) DeleteStandaloneClient ¶
func (*Store) DeleteStandaloneConfig ¶
func (*Store) DeleteStandaloneConnection ¶
func (*Store) DeleteSyncedData ¶
func (*Store) DeleteWorkspace ¶
func (*Store) GetAllRepos ¶
func (s *Store) GetAllRepos() ([]*model.Repository, error)
func (*Store) GetPendingRegistration ¶
func (s *Store) GetPendingRegistration(clientID string) (*standalone.ClientRegistration, error)
func (*Store) GetRegisteredClient ¶
func (s *Store) GetRegisteredClient(clientID string) (*standalone.RegisteredClient, error)
func (*Store) GetReposByWorkspace ¶
func (s *Store) GetReposByWorkspace(workspace string) ([]*model.Repository, error)
func (*Store) GetServerEncryptionConfig ¶
func (s *Store) GetServerEncryptionConfig() (*standalone.ServerEncryptionConfig, error)
func (*Store) GetStandaloneClients ¶
func (s *Store) GetStandaloneClients() ([]*standalone.Client, error)
func (*Store) GetStandaloneConfig ¶
func (s *Store) GetStandaloneConfig() (*standalone.StandaloneConfig, error)
func (*Store) GetStandaloneConnection ¶
func (s *Store) GetStandaloneConnection(name string) (*standalone.StandaloneConnection, error)
func (*Store) GetSyncedData ¶
func (s *Store) GetSyncedData(connectionName, dataType, name string) (*standalone.SyncedData, error)
func (*Store) InsertRepoIfNotExists ¶
func (*Store) ListPendingRegistrations ¶
func (s *Store) ListPendingRegistrations() ([]*standalone.ClientRegistration, error)
func (*Store) ListRegisteredClients ¶
func (s *Store) ListRegisteredClients() ([]*standalone.RegisteredClient, error)
func (*Store) ListStandaloneConnections ¶
func (s *Store) ListStandaloneConnections() ([]*standalone.StandaloneConnection, error)
func (*Store) ListSyncedData ¶
func (s *Store) ListSyncedData(connectionName string) ([]*standalone.SyncedData, error)
func (*Store) ListSyncedDataByState ¶
func (s *Store) ListSyncedDataByState(state standalone.SyncState) ([]*standalone.SyncedData, error)
func (*Store) RemovePendingRegistration ¶
func (*Store) SavePendingRegistration ¶
func (s *Store) SavePendingRegistration(reg *standalone.ClientRegistration) error
func (*Store) SaveRegisteredClient ¶
func (s *Store) SaveRegisteredClient(client *standalone.RegisteredClient) error
func (*Store) SaveRepoWithWorkspace ¶
func (*Store) SaveServerEncryptionConfig ¶
func (s *Store) SaveServerEncryptionConfig(config *standalone.ServerEncryptionConfig) error
func (*Store) SaveStandaloneClient ¶
func (s *Store) SaveStandaloneClient(client *standalone.Client) error
func (*Store) SaveStandaloneConfig ¶
func (s *Store) SaveStandaloneConfig(config *standalone.StandaloneConfig) error
func (*Store) SaveStandaloneConnection ¶
func (s *Store) SaveStandaloneConnection(conn *standalone.StandaloneConnection) error
func (*Store) SaveSyncedData ¶
func (s *Store) SaveSyncedData(data *standalone.SyncedData) error
func (*Store) SetActiveProfile ¶
func (*Store) SetActiveWorkspace ¶
func (*Store) UpdateRepoTimestamp ¶
func (*Store) UpdateRepoWorkspace ¶
Click to show internal directories.
Click to hide internal directories.