feat: rename

This commit is contained in:
Urko 2023-04-24 12:03:15 +02:00
parent d41c7fb4a5
commit dcab3994b2
5 changed files with 21 additions and 21 deletions

View File

@ -78,7 +78,7 @@ func main() {
log.Fatalln("client.Connect", err)
}
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.EmployeeWorkInformationCollection)
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.WorkInformationCollection)
if err = employeeWICollection.Drop(ctx); err != nil {
log.Fatalln("employeeWICollection.Drop", err)
}

View File

@ -71,7 +71,7 @@ func main() {
log.Fatalln("client.Connect", err)
}
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.EmployeeWorkInformationCollection)
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.WorkInformationCollection)
professionalRepo := employee_wi.NewRepo(employeeWICollection)
restServer := apihttp.

View File

@ -13,17 +13,17 @@ func RootDir() string {
}
type Config struct {
ApiPort string `required:"true" split_words:"true"`
AmsApi string `required:"true" split_words:"true"`
AmsApiKey string `required:"true" split_words:"true"`
DbAddress string `required:"true" split_words:"true"`
DbName string `required:"true" split_words:"true"`
EmployeeWorkInformationCollection string `required:"true" split_words:"true"`
EmployeeIdList []string `required:"true" split_words:"true"`
TestGoHost string `required:"true" split_words:"true"`
TestGoEmployee string `required:"true" split_words:"true"`
TestNestHost string `required:"true" split_words:"true"`
TestNestEmployee int `required:"true" split_words:"true"`
ApiPort string `required:"true" split_words:"true"`
AmsApi string `required:"true" split_words:"true"`
AmsApiKey string `required:"true" split_words:"true"`
DbAddress string `required:"true" split_words:"true"`
DbName string `required:"true" split_words:"true"`
WorkInformationCollection string `required:"true" split_words:"true"`
EmployeeIdList []string `required:"true" split_words:"true"`
TestGoHost string `required:"true" split_words:"true"`
TestGoEmployee string `required:"true" split_words:"true"`
TestNestHost string `required:"true" split_words:"true"`
TestNestEmployee int `required:"true" split_words:"true"`
}
func NewConfig(envFile string) *Config {

View File

@ -41,7 +41,7 @@ func BenchmarkETLFanout(b *testing.B) {
require.NoError(b, client.Connect(ctx), "client.Connect")
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.EmployeeWorkInformationCollection)
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.WorkInformationCollection)
require.NoError(b, employeeWICollection.Drop(ctx), "employeeWICollection.Drop")
repo := employee_wi.NewRepo(employeeWICollection)
@ -79,7 +79,7 @@ func BenchmarkETLFanout2(b *testing.B) {
require.NoError(b, client.Connect(ctx), "client.Connect")
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.EmployeeWorkInformationCollection)
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.WorkInformationCollection)
require.NoError(b, employeeWICollection.Drop(ctx), "employeeWICollection.Drop")
repo := employee_wi.NewRepo(employeeWICollection)
@ -115,7 +115,7 @@ func BenchmarkETLMain(b *testing.B) {
require.NoError(b, client.Connect(ctx), "client.Connect")
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.EmployeeWorkInformationCollection)
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.WorkInformationCollection)
require.NoError(b, employeeWICollection.Drop(ctx), "employeeWICollection.Drop")
repo := employee_wi.NewRepo(employeeWICollection)
@ -154,7 +154,7 @@ func TestETLFanout(t *testing.T) {
require.NoError(t, client.Connect(ctx), "client.Connect")
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.EmployeeWorkInformationCollection)
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.WorkInformationCollection)
require.NoError(t, employeeWICollection.Drop(ctx), "employeeWICollection.Drop")
repo := employee_wi.NewRepo(employeeWICollection)
@ -191,7 +191,7 @@ func TestETLFanOut2(t *testing.T) {
require.NoError(t, client.Connect(ctx), "client.Connect")
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.EmployeeWorkInformationCollection)
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.WorkInformationCollection)
require.NoError(t, employeeWICollection.Drop(ctx), "employeeWICollection.Drop")
repo := employee_wi.NewRepo(employeeWICollection)
@ -227,7 +227,7 @@ func TestETLMain(t *testing.T) {
require.NoError(t, client.Connect(ctx), "client.Connect")
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.EmployeeWorkInformationCollection)
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.WorkInformationCollection)
require.NoError(t, employeeWICollection.Drop(ctx), "employeeWICollection.Drop")
repo := employee_wi.NewRepo(employeeWICollection)
@ -251,7 +251,7 @@ func TestLoad(t *testing.T) {
require.NoError(t, client.Connect(ctx), "client.Connect")
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.EmployeeWorkInformationCollection)
employeeWICollection := client.Database(cfg.DbName).Collection(cfg.WorkInformationCollection)
if err = employeeWICollection.Drop(ctx); err != nil {
log.Fatalln("employeeWICollection.Drop", err)
}

View File

@ -44,7 +44,7 @@ func (p *EmployeeWIService) GetByAll(ctx context.Context, id string) (*domain.Em
func (p *EmployeeWIService) InsertMany(ctx context.Context, ei []domain.EmployeeWorkInformation) error {
err := p.repo.InsertMany(ctx, ei)
if err != nil {
return fmt.Errorf("repo.AddAppointmentTo: %s", err)
return fmt.Errorf("repo.InsertMany: %s", err)
}
return nil
}