//GetInstance returns repository for databases func GetInstance() RepositoryDB { once.Do(func() { instance = &sQLiteRepository{} instance.DBContext = dbcontextsqlite.GetInstance() }) return instance }
//GetInstance create repository of parameters func GetInstance() RepositoryParams { once.Do(func() { instance = &sqliteRepositoryParams{} instance.DBContext = dbcontextsqlite.GetInstance() //Create prdefined params if instance.DBContext.IsCreated() { if err := instance.setPreDefinedParams(); err != nil { panic(err) } } }) return instance }