Documentation ¶
Overview ¶
Package validator contains implementations of the ga4gh.Validator interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RequestTTLInNanoFloat64 contextKey
RequestTTLInNanoFloat64 is the context key to use with golang.org/x/net/context's WithValue function to associate a "requested_ttl" value with a context.
Functions ¶
Types ¶
type And ¶
type And []Validator
And is a Validator that returns false if any of the wrapped validators returns false. Evaluation short-circuits and does not necessarily evaluate all wrapped validators.
type ClaimValidator ¶
type ClaimValidator struct { Name string ConstantMap map[string]bool RegexValues []*regexp.Regexp IsNot bool Sources map[string]bool By map[string]bool }
ClaimValidator is a ga4gh.Validator that compares GA4GH claims.
type MockValidator ¶
type MockValidator struct {
// contains filtered or unexported fields
}
MockValidator is a mock of Validator interface
func NewMockValidator ¶
func NewMockValidator(ctrl *gomock.Controller) *MockValidator
NewMockValidator creates a new mock instance
func (*MockValidator) EXPECT ¶
func (m *MockValidator) EXPECT() *MockValidatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockValidatorMockRecorder ¶
type MockValidatorMockRecorder struct {
// contains filtered or unexported fields
}
MockValidatorMockRecorder is the mock recorder for MockValidator
func (*MockValidatorMockRecorder) Validate ¶
func (mr *MockValidatorMockRecorder) Validate(ctx, identity interface{}) *gomock.Call
Validate indicates an expected call of Validate
type Or ¶
type Or []Validator
Or is a Validator that succeeds if any of the wrapped validators returns true. Evaluation short-circuits and does not necessarily evaluate all wrapped validators.
type Policy ¶
Policy is a ga4gh.Validator that succeeds if any of the wrapped validators returns true. Evaluation short-circuits and does not necessarily evaluate all wrapped validators.