Documentation ¶
Index ¶
- Constants
- func GetProjectPath(id string) string
- func LoadProjectFile(projPath string) (v models.ProjectFile, err error)
- func NewSingleProjectLoader(path string) (loader storage.ProjectStore, projectID string)
- func NewSingleProjectStore(projectPath, projectID string) (storeInterface *fsStore, projID string)
- func NewStore(id string, pathsByID map[string]string) (fsStore *fsStore, err error)
- func SetProjectPath(id, path string)
- type DbCatalogFile
- type DbModelFile
- type Decoder
- type ProjDbServerFile
- type TableColumnsFile
- type TableFile
- type TableForeignKeysFile
- type TableModelColumnsFile
- type TableModelFile
- type TablePrimaryKeyFile
- type TablePropsFile
- type TableRefsByFile
Constants ¶
const ( BoardsFolder = "boards" ProjectSummaryFileName = "datatug-project.json" DataFolder = "data" DatatugFolder = "datatug" DbFolder = "db" DbCatalogsFolder = "catalogs" DbModelsFolder = "dbmodels" EntitiesFolder = "entities" EnvironmentsFolder = "environments" QueriesFolder = "queries" RecordsetsFolder = "recordsets" ServersFolder = "servers" SchemasFolder = "schemas" TablesFolder = "tables" ViewsFolder = "views" )
DatatugFolder defines a folder name in a repo where to storage DataTug project
Variables ¶
This section is empty.
Functions ¶
func LoadProjectFile ¶
func LoadProjectFile(projPath string) (v models.ProjectFile, err error)
LoadProjectFile loads project file
func NewSingleProjectLoader ¶
func NewSingleProjectLoader(path string) (loader storage.ProjectStore, projectID string)
NewSingleProjectLoader create new single project loader
func NewSingleProjectStore ¶
NewSingleProjectStore creates an instance of storage that implements storage.Store for a single project
Types ¶
type DbCatalogFile ¶
type DbCatalogFile struct { Driver string `json:"driver"` // It's excessive but good to have for validation Path string `json:"path,omitempty"` DbModel string `json:"dbmodel,omitempty"` }
DbCatalogFile defines metadata to be stored in a JSON file in the db folder
func (DbCatalogFile) Validate ¶
func (v DbCatalogFile) Validate() error
Validate returns error if not valid
type DbModelFile ¶
type DbModelFile struct { models.ProjectItem Environments models.DbModelEnvironments `json:"environments,omitempty"` }
DbModelFile defines what to storage to dbmodel file
func (DbModelFile) Validate ¶
func (v DbModelFile) Validate() error
Validate returns error if not valid
type ProjDbServerFile ¶
type ProjDbServerFile struct {
models.ProjectItem
}
ProjDbServerFile stores info about project DB server
type TableColumnsFile ¶
type TableColumnsFile struct { models.TableKey Columns []*models.TableColumn `json:"columns,omitempty"` }
TableColumnsFile info to be stored about column in a JSON file
type TableFile ¶
type TableFile struct { models.TableProps PrimaryKey *models.UniqueKey `json:"primaryKey,omitempty"` ForeignKeys []*models.ForeignKey `json:"foreignKeys,omitempty"` ReferencedBy []*models.TableReferencedBy `json:"referencedBy,omitempty"` Columns []*models.TableColumn `json:"columns,omitempty"` Indexes []*models.Index `json:"indexes,omitempty"` }
TableFile hold summary on table or view
type TableForeignKeysFile ¶
type TableForeignKeysFile struct { models.TableKey ForeignKeys []*models.ForeignKey `json:"foreignKeys"` }
TableForeignKeysFile info to be stored about FK in a JSON file
type TableModelColumnsFile ¶
type TableModelColumnsFile struct {
Columns models.ColumnModels `json:"columns,omitempty"`
}
TableModelColumnsFile info to be stored about column in a JSON file
func (TableModelColumnsFile) Validate ¶
func (v TableModelColumnsFile) Validate() error
Validate returns error if not valid
type TableModelFile ¶
TableModelFile defines what to storage in table model file
type TablePrimaryKeyFile ¶
type TablePrimaryKeyFile struct { models.TableKey PrimaryKey *models.UniqueKey `json:"primaryKey"` }
TablePrimaryKeyFile info to be stored about PK in a JSON file
type TablePropsFile ¶
type TablePropsFile struct { models.TableKey models.TableProps }
TablePropsFile info to be stored about table in a JSON file
type TableRefsByFile ¶
type TableRefsByFile struct { models.TableKey ReferencedBy []*models.TableReferencedBy `json:"referencedBy"` }
TableRefsByFile info to be stored about reference in a JSON file
Source Files ¶
- constants.go
- loader_env_servers.go
- loader_internals.go
- loader_recordsets.go
- models.go
- projects.go
- readme.go
- saver_filesystem.go
- saver_readme.go
- saver_update_proj_file.go
- store.go
- store_boards.go
- store_dbcatalog.go
- store_dbcatalogs.go
- store_dbmodels.go
- store_dbschema_saver.go
- store_dbserver.go
- store_dbservers.go
- store_entities.go
- store_entity.go
- store_entity_saver.go
- store_env_catalog.go
- store_env_catalogs.go
- store_env_server.go
- store_env_servers.go
- store_environment.go
- store_environments.go
- store_folders.go
- store_loader.go
- store_project.go
- store_project_saver.go
- store_queries.go
- store_queries_saver.go
- updater.go
- utils.go