Documentation
¶
Overview ¶
Package jev defines the typed decision boundary used by lintpal.
Index ¶
- Variables
- func ValidateRequest(request Request) error
- func ValidateResponse(request Request, response Response) error
- type Answer
- type ChoiceAnswer
- type ChoiceQuestion
- type NoulAnswer
- type NoulCriteria
- type NoulQuestion
- type Provider
- type Question
- type Request
- type Response
- type ScoreAnswer
- type ScoreQuestion
- type Usage
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidRequest = errors.New("invalid Jev request")
View Source
var ErrInvalidResponse = errors.New("invalid Jev response")
Functions ¶
func ValidateRequest ¶
ValidateRequest checks the native contract without exposing state or question text in errors.
func ValidateResponse ¶
ValidateResponse rejects partial or inconsistent decisions before policy uses them.
Types ¶
type ChoiceAnswer ¶
type ChoiceQuestion ¶
type NoulAnswer ¶
type NoulAnswer struct {
Probability float64
}
type NoulCriteria ¶
NoulCriteria optionally describes the two ends of a yes/no answer.
type NoulQuestion ¶
type NoulQuestion struct {
Instructions string
Criteria *NoulCriteria
}
type Question ¶
type Question interface {
// contains filtered or unexported methods
}
Question is one of the supported Jev decision primitives.
type ScoreAnswer ¶
type ScoreQuestion ¶
Click to show internal directories.
Click to hide internal directories.