Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update to latest contract and adjust to glitches in fp-go #48

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func ToTypeE[A any](data any) E.Either[error, A] {
return F.Pipe2(
data,
O.ToType[A],
E.FromOption[error, A](func() error {
E.FromOption[A](func() error {
return fmt.Errorf("invalid type of input [%T]", data)
}),
)
Expand Down
2 changes: 1 addition & 1 deletion contract/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func createEnvWorkloadSignature(signer func([]byte) func([]byte) E.Either[error,
// lookup the
return F.Pipe3(
seqE(getWorkloadO(contract), getEnvO(contract)),
E.FromOption[error, []byte](func() error {
E.FromOption[[]byte](func() error {
return fmt.Errorf("the contract is missing [%s] or [%s] or both", KeyEnv, KeyWorkload)
}),
E.Chain(sign),
Expand Down
2 changes: 1 addition & 1 deletion contract/contract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestUpsertEncrypted(t *testing.T) {
// validate that the key exists and that it is a token
getKeyE := F.Flow2(
R.Lookup[any](KeyEnv),
E.FromOption[error, any](func() error {
E.FromOption[any](func() error {
return fmt.Errorf("Key not found")
}),
)
Expand Down
4 changes: 2 additions & 2 deletions data/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
_ "embed"
)

//go:embed ibm-hyper-protect-container-runtime-1-0-s390x-11-encrypt.crt
//go:embed ibm-hyper-protect-container-runtime-1-0-s390x-12-encrypt.crt
var DefaultCertificate string

//go:embed hpse-contract-schema-1.0.34.json
//go:embed hpse-contract-schema-1.0.42.json
var ContractSchema string
Loading