Documentation ¶
Overview ¶
Package testvalidator contains declarative schema/validator implementations for unit testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bool ¶
type Bool struct { // Bool interface methods DescriptionMethod func(context.Context) string MarkdownDescriptionMethod func(context.Context) string ValidateBoolMethod func(context.Context, validator.BoolRequest, *validator.BoolResponse) }
Declarative validator.Bool for unit testing.
func (Bool) Description ¶
Description satisfies the validator.Bool interface.
func (Bool) MarkdownDescription ¶
MarkdownDescription satisfies the validator.Bool interface.
func (Bool) ValidateBool ¶
func (v Bool) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
Validate satisfies the validator.Bool interface.
type Float64 ¶
type Float64 struct { // Float64 interface methods DescriptionMethod func(context.Context) string MarkdownDescriptionMethod func(context.Context) string ValidateFloat64Method func(context.Context, validator.Float64Request, *validator.Float64Response) }
Declarative validator.Float64 for unit testing.
func (Float64) Description ¶
Description satisfies the validator.Float64 interface.
func (Float64) MarkdownDescription ¶
MarkdownDescription satisfies the validator.Float64 interface.
func (Float64) ValidateFloat64 ¶
func (v Float64) ValidateFloat64(ctx context.Context, req validator.Float64Request, resp *validator.Float64Response)
Validate satisfies the validator.Float64 interface.
type Int64 ¶
type Int64 struct { // Int64 interface methods DescriptionMethod func(context.Context) string MarkdownDescriptionMethod func(context.Context) string ValidateInt64Method func(context.Context, validator.Int64Request, *validator.Int64Response) }
Declarative validator.Int64 for unit testing.
func (Int64) Description ¶
Description satisfies the validator.Int64 interface.
func (Int64) MarkdownDescription ¶
MarkdownDescription satisfies the validator.Int64 interface.
func (Int64) ValidateInt64 ¶
func (v Int64) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
Validate satisfies the validator.Int64 interface.
type List ¶
type List struct { // List interface methods DescriptionMethod func(context.Context) string MarkdownDescriptionMethod func(context.Context) string ValidateListMethod func(context.Context, validator.ListRequest, *validator.ListResponse) }
Declarative validator.List for unit testing.
func (List) Description ¶
Description satisfies the validator.List interface.
func (List) MarkdownDescription ¶
MarkdownDescription satisfies the validator.List interface.
func (List) ValidateList ¶
func (v List) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
Validate satisfies the validator.List interface.
type Map ¶
type Map struct { // Map interface methods DescriptionMethod func(context.Context) string MarkdownDescriptionMethod func(context.Context) string ValidateMapMethod func(context.Context, validator.MapRequest, *validator.MapResponse) }
Declarative validator.Map for unit testing.
func (Map) Description ¶
Description satisfies the validator.Map interface.
func (Map) MarkdownDescription ¶
MarkdownDescription satisfies the validator.Map interface.
func (Map) ValidateMap ¶
func (v Map) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
Validate satisfies the validator.Map interface.
type Number ¶
type Number struct { // Number interface methods DescriptionMethod func(context.Context) string MarkdownDescriptionMethod func(context.Context) string ValidateNumberMethod func(context.Context, validator.NumberRequest, *validator.NumberResponse) }
Declarative validator.Number for unit testing.
func (Number) Description ¶
Description satisfies the validator.Number interface.
func (Number) MarkdownDescription ¶
MarkdownDescription satisfies the validator.Number interface.
func (Number) ValidateNumber ¶
func (v Number) ValidateNumber(ctx context.Context, req validator.NumberRequest, resp *validator.NumberResponse)
Validate satisfies the validator.Number interface.
type Object ¶
type Object struct { // Object interface methods DescriptionMethod func(context.Context) string MarkdownDescriptionMethod func(context.Context) string ValidateObjectMethod func(context.Context, validator.ObjectRequest, *validator.ObjectResponse) }
Declarative validator.Object for unit testing.
func (Object) Description ¶
Description satisfies the validator.Object interface.
func (Object) MarkdownDescription ¶
MarkdownDescription satisfies the validator.Object interface.
func (Object) ValidateObject ¶
func (v Object) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
Validate satisfies the validator.Object interface.
type Set ¶
type Set struct { // Set interface methods DescriptionMethod func(context.Context) string MarkdownDescriptionMethod func(context.Context) string ValidateSetMethod func(context.Context, validator.SetRequest, *validator.SetResponse) }
Declarative validator.Set for unit testing.
func (Set) Description ¶
Description satisfies the validator.Set interface.
func (Set) MarkdownDescription ¶
MarkdownDescription satisfies the validator.Set interface.
func (Set) ValidateSet ¶
func (v Set) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
Validate satisfies the validator.Set interface.
type String ¶
type String struct { // String interface methods DescriptionMethod func(context.Context) string MarkdownDescriptionMethod func(context.Context) string ValidateStringMethod func(context.Context, validator.StringRequest, *validator.StringResponse) }
Declarative validator.String for unit testing.
func (String) Description ¶
Description satisfies the validator.String interface.
func (String) MarkdownDescription ¶
MarkdownDescription satisfies the validator.String interface.
func (String) ValidateString ¶
func (v String) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
Validate satisfies the validator.String interface.