feat: add safe growth report persistence and AvalAI client
This commit is contained in:
13
internal/growthreport/service.go
Normal file
13
internal/growthreport/service.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package growthreport
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func RequestHash(merchantID int64, terminalID string, refresh bool) string {
|
||||
sum := sha256.Sum256([]byte(fmt.Sprintf("%d\x00%s\x00%t", merchantID, terminalID, refresh)))
|
||||
return hex.EncodeToString(sum[:])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user