Skip to content

Commit

Permalink
Add common func GetFoloRecordAsString
Browse files Browse the repository at this point in the history
  • Loading branch information
ruhan1 committed Apr 3, 2024
1 parent d1cc35c commit b626e2b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/common/indy_folo_ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ func GetFoloRecord(indyURL, foloRecordId string) TrackedContent {
return *trackContent
}

func GetFoloRecordAsString(indyURL, foloRecordId string) string {
URL := fmt.Sprintf("%s/api/folo/admin/%s/record", indyURL, foloRecordId)
fmt.Printf("Start to get folo tracking record through: %s\n", URL)
s, err := GetRespAsPlaintext(URL)
if err != nil {
fmt.Printf("Error: cannot get folo record %s at indy instance %s, error is: %s\n", foloRecordId, indyURL, err.Error())
os.Exit(1)
}
return s
}

func GetFoloRecordFromFile(fileLoc string) TrackedContent {
trackContent := &TrackedContent{}
b := ReadByteFromFile(fileLoc)
Expand Down

0 comments on commit b626e2b

Please sign in to comment.