Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5 from armosec/ci-fix-build
Browse files Browse the repository at this point in the history
fix: designator types after breaking changes upstream
  • Loading branch information
vladklokun authored Aug 23, 2023
2 parents 5e52898 + 81f0843 commit be06b65
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions system-reports/utilities/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strconv"

"github.com/armosec/armoapi-go/armotypes"
"github.com/armosec/armoapi-go/identifiers"
"github.com/armosec/logger-go/system-reports/datastructures"
"github.com/armosec/utils-go/httputils"
"github.com/golang/glog"
Expand All @@ -15,8 +15,8 @@ var (
EmptyString = []string{}
)

//TODO
//takes annotation and return the jobID, annotationObject, err
// TODO
// takes annotation and return the jobID, annotationObject, err
func GetJobIDByContext(jobs []byte, context string) (string, datastructures.JobsAnnotations, error) {

var jobject datastructures.JobsAnnotations
Expand Down Expand Up @@ -61,7 +61,7 @@ func SendImmutableReport(target, reporter, actionID, action, status string, jobI

}

func InitReporter(customerGUID, reporterName, actionName, wlid, eventReceiverUrl string, httpClient httputils.IHttpClient, designator *armotypes.PortalDesignator, errChan chan<- error) *datastructures.BaseReport {
func InitReporter(customerGUID, reporterName, actionName, wlid, eventReceiverUrl string, httpClient httputils.IHttpClient, designator *identifiers.PortalDesignator, errChan chan<- error) *datastructures.BaseReport {
reporter := datastructures.NewBaseReport(customerGUID, reporterName, eventReceiverUrl, httpClient)
if actionName != "" {
reporter.SetActionName(actionName)
Expand All @@ -75,13 +75,13 @@ func InitReporter(customerGUID, reporterName, actionName, wlid, eventReceiverUrl
return reporter
}

func GetTargetFromDesignator(designator *armotypes.PortalDesignator) string {
func GetTargetFromDesignator(designator *identifiers.PortalDesignator) string {
switch designator.DesignatorType {
case armotypes.DesignatorWlid:
case identifiers.DesignatorWlid:
return designator.WLID
case armotypes.DesignatorWildWlid:
case identifiers.DesignatorWildWlid:
return designator.WildWLID
case armotypes.DesignatorAttributes:
case identifiers.DesignatorAttributes:
if designator.Attributes != nil {
return convertMapToString(designator.Attributes)
}
Expand Down

0 comments on commit be06b65

Please sign in to comment.