github.com/circl-dev/go-swagger@v0.31.0/examples/external-types/fred/my_type.go (about) 1 package fred 2 3 import ( 4 "context" 5 "io" 6 7 "github.com/go-openapi/strfmt" 8 ) 9 10 // MyAlternateType ... 11 type MyAlternateType string 12 13 // Validate MyAlternateType 14 func (MyAlternateType) Validate(strfmt.Registry) error { return nil } 15 func (MyAlternateType) ContextValidate(context.Context, strfmt.Registry) error { return nil } 16 17 // MyAlternateInteger ... 18 type MyAlternateInteger int 19 20 // Validate MyAlternateInteger 21 func (MyAlternateInteger) Validate(strfmt.Registry) error { return nil } 22 func (MyAlternateInteger) ContextValidate(context.Context, strfmt.Registry) error { return nil } 23 24 // MyAlternateString ... 25 type MyAlternateString string 26 27 // Validate MyAlternateString 28 func (MyAlternateString) Validate(strfmt.Registry) error { return nil } 29 func (MyAlternateString) ContextValidate(context.Context, strfmt.Registry) error { return nil } 30 31 // MyAlternateOtherType ... 32 type MyAlternateOtherType struct{} 33 34 // Validate MyAlternateOtherType 35 func (MyAlternateOtherType) Validate(strfmt.Registry) error { return nil } 36 func (MyAlternateOtherType) ContextValidate(context.Context, strfmt.Registry) error { return nil } 37 38 // MyAlternateStreamer ... 39 type MyAlternateStreamer io.Reader 40 41 // MyAlternateInterface ... 42 type MyAlternateInterface interface{}