Skip to content

Commit

Permalink
Temporary remove helper.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanni1993 committed Jun 21, 2021
1 parent bd881a9 commit c421e0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 31 deletions.
11 changes: 6 additions & 5 deletions venafi-snowflake-connector/lambda/request_cert/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ func RequestCert(ctx context.Context, request events.APIGatewayProxyRequest) (ev
// Parse parameters sent by Snowflake from Lambda Event
dataForRequestCert.TppURL = fmt.Sprintf("%v", snowflakeData.Data[0][1])
dataForRequestCert.DNSName = fmt.Sprintf("%v", snowflakeData.Data[0][2]) // TODO: UPN, DNS should allow multiple values
dataForRequestCert.UPN = fmt.Sprintf("%v", snowflakeData.Data[0][3])
dataForRequestCert.CommonName = fmt.Sprintf("%v", snowflakeData.Data[0][4])
dataForRequestCert.Zone = fmt.Sprintf("%v", snowflakeData.Data[0][3])
dataForRequestCert.UPN = fmt.Sprintf("%v", snowflakeData.Data[0][4])
dataForRequestCert.CommonName = fmt.Sprintf("%v", snowflakeData.Data[0][5])

log.Infof("Finished parse parameters from event object")

Expand All @@ -60,10 +61,10 @@ func RequestCert(ctx context.Context, request events.APIGatewayProxyRequest) (ev
AccessToken: accessToken},
}
// Create a new Connector for Venafi API calls
c, err := utils.CreateVenafiConnectorFromParameters(snowflakeData, accessToken)
c, err := vcert.NewClient(config)
if err != nil {
log.Errorf("Failed to create venafi client %s", err)
return events.APIGatewayProxyResponse{
log.Errorf("Failed to create new client")
return events.APIGatewayProxyResponse{ // Error HTTP response
Body: err.Error(),
StatusCode: 500,
}, err
Expand Down
26 changes: 0 additions & 26 deletions venafi-snowflake-connector/lambda/utils/helper.go

This file was deleted.

0 comments on commit c421e0a

Please sign in to comment.