import lab3 files
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package domain
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
)
|
||||
|
||||
type IdempotencyScope struct {
|
||||
UserID string
|
||||
Method string
|
||||
Path string
|
||||
Key string
|
||||
}
|
||||
|
||||
type CreateIdempotentResult struct {
|
||||
Status int
|
||||
Body []byte
|
||||
Replayed bool
|
||||
}
|
||||
|
||||
func RequestHash(text string) []byte {
|
||||
sum := sha256.Sum256([]byte(text))
|
||||
return sum[:]
|
||||
}
|
||||
Reference in New Issue
Block a user