From f8f1ee34eaa7ef24525556550542edbee90a7de6 Mon Sep 17 00:00:00 2001 From: Vernon Keenan Date: Sat, 6 Feb 2021 14:33:20 -0800 Subject: [PATCH] fix case --- app/ingest-services.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/app/ingest-services.go b/app/ingest-services.go index cf50193..b202cc1 100644 --- a/app/ingest-services.go +++ b/app/ingest-services.go @@ -11,34 +11,34 @@ import ( // NewIngestParams is a prams type type NewIngestParams struct { - accountID string - backendID string - objectType string - objList []*devops_models.Ingest - principal *User - ref string + AccountID string + BackendID string + ObjectType string + ObjList []*devops_models.Ingest + Principal *User + Ref string } // NewIngest is an ingest helper function func NewIngest(params *NewIngestParams) (string, error) { sugar.Debug("ops.newIngest: 📥") - if params.accountID == "" || params.principal.TenantID == "" { + if params.AccountID == "" || params.Principal.TenantID == "" { return "", fmt.Errorf("ops.newIngest: 💣 â›” params.AccountID or params.TaxnexusAccount are blank") } dt := time.Now().Format(dateTimeFormat) theIngest := &devops_models.Ingest{ - AccountID: ¶ms.accountID, - BackendID: params.backendID, + AccountID: ¶ms.AccountID, + BackendID: params.BackendID, EndDate: dt, ID: uuid.New().String(), IngestDate: dt, IngestType: "fabric", - ObjectType: ¶ms.objectType, - Ref: params.ref, + ObjectType: ¶ms.ObjectType, + Ref: params.Ref, StartDate: dt, Status: "new", } - params.objList = []*devops_models.Ingest{theIngest} + params.ObjList = []*devops_models.Ingest{theIngest} _, err := PostIngests(params) if err != nil { return "", err @@ -49,12 +49,12 @@ func NewIngest(params *NewIngestParams) (string, error) { // PostIngests is an ingest helper function func PostIngests(params *NewIngestParams) ([]*devops_models.Ingest, error) { - sugar.Debugf("ops.postIngests: 📥 len=%d", len(params.objList)) + sugar.Debugf("ops.postIngests: 📥 len=%d", len(params.ObjList)) devopsParams := ingest.NewPostIngestsParams() devopsParams.IngestRequest = &devops_models.IngestRequest{ - Data: params.objList, + Data: params.ObjList, } - response, err := devopsClient.Ingest.PostIngests(devopsParams, params.principal.Auth) + response, err := devopsClient.Ingest.PostIngests(devopsParams, params.Principal.Auth) if err != nil { sugar.Errorf("ops.postIngests: 💣 â›” post to devops error %w", err) return nil, err