Documentation
¶
Index ¶
Constants ¶
View Source
const SqliteInMemoryDSN = "file::memory:?cache=shared"
Variables ¶
This section is empty.
Functions ¶
func GetDBInstance ¶
func MakeDSNFromEnv ¶
func MakeDSNFromEnv() string
func MustConnectToDB ¶
MustConnectToDB will attempt to connect to the database maxDBRetries times. If it isn't successful after that number of retries then it will call log.Fatalf(), which will cause the server to exit. Between retry attempts it will sleep for 3 seconds.
func RunMigrations ¶
Types ¶
type DatasetFileSelector ¶
type DatasetFileSelector struct {
DatasetID int
IncludeFiles map[string]bool
ExcludeFiles map[string]bool
IncludeDirs map[string]bool
ExcludeDirs map[string]bool
EntityFiles map[string]bool
}
func NewDatasetFileSelector ¶
func NewDatasetFileSelector(dataset mcmodel.Dataset) *DatasetFileSelector
func (*DatasetFileSelector) IsIncludedDir ¶
func (s *DatasetFileSelector) IsIncludedDir(dirPath string) bool
func (*DatasetFileSelector) IsIncludedFile ¶
func (s *DatasetFileSelector) IsIncludedFile(filePath string) bool
func (*DatasetFileSelector) LoadEntityFiles ¶
func (s *DatasetFileSelector) LoadEntityFiles(db *gorm.DB) error
Click to show internal directories.
Click to hide internal directories.