github.com/circl-dev/go-swagger@v0.31.0/examples/external-types/models/my_type.go (about) 1 package models 2 3 import ( 4 "context" 5 "io" 6 7 "github.com/go-openapi/strfmt" 8 ) 9 10 // MyType is a type manually added to the models package (NOT GENERATED) 11 type MyType string 12 13 // Validate MyType 14 func (MyType) Validate(strfmt.Registry) error { return nil } 15 16 // ContextValidate MyType 17 func (MyType) ContextValidate(context.Context, strfmt.Registry) error { return nil } 18 19 // MyInteger ... 20 type MyInteger int 21 22 // Validate MyInteger 23 func (MyInteger) Validate(strfmt.Registry) error { return nil } 24 25 // ContextValidate MyInteger 26 func (MyInteger) ContextValidate(context.Context, strfmt.Registry) error { return nil } 27 28 // MyString ... 29 type MyString string 30 31 // Validate MyString 32 func (MyString) Validate(strfmt.Registry) error { return nil } 33 34 // ContextValidate MyInteger 35 func (MyString) ContextValidate(context.Context, strfmt.Registry) error { return nil } 36 37 // MyOtherType ... 38 type MyOtherType struct{} 39 40 // Validate MyOtherType 41 func (MyOtherType) Validate(strfmt.Registry) error { return nil } 42 43 // ContextValidate MyOtherType 44 func (MyOtherType) ContextValidate(context.Context, strfmt.Registry) error { return nil } 45 46 // MyStreamer ... 47 type MyStreamer io.Reader