Documentation ¶
Index ¶
- Constants
- Variables
- func ContextWithDatatugStore(ctx context.Context, store Store) context.Context
- func Init()
- type BoardsStore
- type CreateFolderRequest
- type DbCatalogStore
- type DbCatalogsStore
- type DbModelStore
- type DbModelsStore
- type DbServerStore
- type DbServersStore
- type EntitiesStore
- type EntityStore
- type EnvDbCatalogStore
- type EnvDbCatalogsStore
- type EnvServerStore
- type EnvServersStore
- type EnvironmentStore
- type EnvironmentsLoader
- type EnvironmentsSaver
- type EnvironmentsStore
- type FoldersStore
- type NoOpStore
- func (n NoOpStore) CreateProject(ctx context.Context, request dto.CreateProjectRequest) (summary *models.ProjectSummary, err error)
- func (n NoOpStore) DeleteProject(ctx context.Context, id string) error
- func (n NoOpStore) GetProjects(ctx context.Context) (projectBriefs []models.ProjectBrief, err error)
- func (n NoOpStore) Project(id string) ProjectStore
- type ProjectStore
- type ProjectStoreRef
- type QueriesStore
- type RecordsetLoader
- type RecordsetsStore
- type Store
Constants ¶
View Source
const SingleProjectID = "."
SingleProjectID defines a short version of project ID for a single project storage
Variables ¶
View Source
var NewDatatugStore = func(id string) (Store, error) { panic("var 'NewDatatugStore' is not initialized") }
NewDatatugStore creates new instance of Store for a specific storage
Functions ¶
func ContextWithDatatugStore ¶
Types ¶
type BoardsStore ¶
type BoardsStore interface { ProjectStoreRef CreateBoard(ctx context.Context, board models.Board) (*models.Board, error) SaveBoard(ctx context.Context, board models.Board) (*models.Board, error) GetBoard(ctx context.Context, id string) (board *models.Board, err error) DeleteBoard(ctx context.Context, id string) (err error) }
BoardsStore provides access to board records
type CreateFolderRequest ¶
func (CreateFolderRequest) Validate ¶
func (v CreateFolderRequest) Validate() error
type DbCatalogStore ¶
type DbCatalogStore interface { Catalogs() DbCatalogsStore LoadDbCatalogSummary(ctx context.Context) (catalog *models.DbCatalogSummary, err error) }
type DbCatalogsStore ¶
type DbCatalogsStore interface { Server() DbServerStore DbCatalog(id string) DbCatalogStore }
type DbModelStore ¶
type DbModelStore interface { ProjectStoreRef ID() string DbModels() DbModelsStore }
type DbModelsStore ¶
type DbModelsStore interface {
DbModel(id string) DbModelStore
}
type DbServerStore ¶
type DbServerStore interface { ID() models.ServerReference Catalogs() DbCatalogsStore // LoadDbServerSummary loads summary on DB server LoadDbServerSummary(ctx context.Context, dbServer models.ServerReference) (summary *models.ProjDbServerSummary, err error) SaveDbServer(ctx context.Context, dbServer models.ProjDbServer, project models.DatatugProject) (err error) DeleteDbServer(ctx context.Context, dbServer models.ServerReference) (err error) }
type DbServersStore ¶
type DbServersStore interface { ProjectStoreRef DbServer(id models.ServerReference) DbServerStore }
type EntitiesStore ¶
type EntitiesStore interface { ProjectStoreRef Entity(id string) EntityStore // LoadEntities loads entities LoadEntities(ctx context.Context) (entities models.Entities, err error) }
type EntityStore ¶
type EntityStore interface { ID() string Entities() EntitiesStore // LoadEntity loads entity LoadEntity(ctx context.Context) (entity *models.Entity, err error) DeleteEntity(ctx context.Context) (err error) SaveEntity(ctx context.Context, entity *models.Entity) (err error) }
EntityStore defines DAL for entities
type EnvDbCatalogStore ¶
type EnvDbCatalogStore interface { Catalogs() EnvDbCatalogsStore // LoadEnvironmentCatalog returns DB info for a specific environment LoadEnvironmentCatalog() (*models.EnvDb, error) }
type EnvDbCatalogsStore ¶
type EnvDbCatalogsStore interface {
Catalog(id string) EnvDbCatalogStore
}
type EnvServerStore ¶
type EnvServerStore interface { Catalogs() EnvDbCatalogsStore LoadEnvServer() (*models.EnvDbServer, error) SaveEnvServer(envServer *models.EnvDbServer) error }
type EnvServersStore ¶
type EnvServersStore interface {
Server(id string) EnvServerStore
}
type EnvironmentStore ¶
type EnvironmentStore interface { // ID returns environment ID ID() string Project() ProjectStore Servers() EnvServersStore // LoadEnvironmentSummary return summary metadata about environment LoadEnvironmentSummary() (*models.EnvironmentSummary, error) DeleteEnvironment() (err error) SaveEnvironment(environment *models.Environment) (err error) }
EnvironmentStore provides access to environment record
type EnvironmentsLoader ¶
type EnvironmentsLoader interface { }
EnvironmentsLoader loads environments
type EnvironmentsSaver ¶
type EnvironmentsSaver interface { }
type EnvironmentsStore ¶
type EnvironmentsStore interface { ProjectStoreRef Environment(id string) EnvironmentStore }
type FoldersStore ¶
type NoOpStore ¶
type NoOpStore struct { }
func (NoOpStore) CreateProject ¶
func (n NoOpStore) CreateProject(ctx context.Context, request dto.CreateProjectRequest) (summary *models.ProjectSummary, err error)
func (NoOpStore) DeleteProject ¶
func (NoOpStore) GetProjects ¶
func (NoOpStore) Project ¶
func (n NoOpStore) Project(id string) ProjectStore
type ProjectStore ¶
type ProjectStore interface { ID() string Folders() FoldersStore Queries() QueriesStore Boards() BoardsStore Environments() EnvironmentsStore Entities() EntitiesStore DbModels() DbModelsStore DbServers() DbServersStore Recordsets() RecordsetsStore SaveProject(ctx context.Context, project models.DatatugProject) (err error) // LoadProject returns full DataTug project LoadProject(ctx context.Context) (*models.DatatugProject, error) // LoadProjectSummary return summary metadata about DataTug project LoadProjectSummary(ctx context.Context) (models.ProjectSummary, error) }
type ProjectStoreRef ¶
type ProjectStoreRef interface {
Project() ProjectStore
}
type QueriesStore ¶
type QueriesStore interface { ProjectStoreRef CreateQuery(ctx context.Context, query models.QueryDefWithFolderPath) (*models.QueryDefWithFolderPath, error) UpdateQuery(ctx context.Context, query models.QueryDef) (*models.QueryDefWithFolderPath, error) GetQuery(ctx context.Context, id string) (query *models.QueryDefWithFolderPath, err error) DeleteQuery(ctx context.Context, id string) (err error) }
QueriesStore provides access to queries
type RecordsetLoader ¶
type RecordsetLoader interface { // ID returns recordset id ID() string // LoadRecordsetDefinition loads recordset definition LoadRecordsetDefinition(ctx context.Context) (dataset *models.RecordsetDefinition, err error) // LoadRecordsetData loads recordset data LoadRecordsetData(ctx context.Context, fileName string) (recordset *models.Recordset, err error) }
RecordsetLoader loads recordset data
type RecordsetsStore ¶
type RecordsetsStore interface { ProjectStoreRef Recordset(id string) RecordsetLoader // LoadRecordsetDefinitions loads list of recordsets summary LoadRecordsetDefinitions(ctx context.Context) (datasets []*models.RecordsetDefinition, err error) }
RecordsetsStore provides access to recordset records
type Store ¶
type Store interface { Project(id string) ProjectStore // CreateProject creates a new DataTug project CreateProject(ctx context.Context, request dto.CreateProjectRequest) (summary *models.ProjectSummary, err error) DeleteProject(ctx context.Context, id string) error // GetProjects returns list of projects GetProjects(ctx context.Context) (projectBriefs []models.ProjectBrief, err error) }
Store defines interface for loading & saving DataTug projects
var Current Store
Current holds currently active storage interface
TODO: to be replaced with `func NewDatatugStore(id string) Store`
Source Files ¶
Click to show internal directories.
Click to hide internal directories.