-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathfailvalidator.go
More file actions
37 lines (28 loc) · 825 Bytes
/
failvalidator.go
File metadata and controls
37 lines (28 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: BUSL-1.1
*/
package quote
import (
"fmt"
)
// FailValidator always fails.
type FailValidator struct{}
// NewFailValidator returns a new FailValidator object.
func NewFailValidator() *FailValidator {
return &FailValidator{}
}
// Validate implements the Validator interface for FailValidator.
func (m *FailValidator) Validate(_ []byte, _ []byte, _ PackageProperties, _ InfrastructureProperties) error {
return fmt.Errorf("cannot validate quote")
}
// FailIssuer always fails.
type FailIssuer struct{}
// NewFailIssuer returns a new FailIssuer object.
func NewFailIssuer() *FailIssuer {
return &FailIssuer{}
}
// Issue implements the Issuer interface.
func (m *FailIssuer) Issue(_ []byte) ([]byte, error) {
return nil, fmt.Errorf("OE_UNSUPPORTED")
}