|
| 1 | + |
| 2 | +// Service is the RawObjectPayloadTypeNameCollision service interface. |
| 3 | +type Service interface { |
| 4 | + // Foo implements Foo. |
| 5 | + Foo(context.Context, *FooPayload3) (err error) |
| 6 | +} |
| 7 | + |
| 8 | +// APIName is the name of the API as defined in the design. |
| 9 | +const APIName = "test api" |
| 10 | + |
| 11 | +// APIVersion is the version of the API as defined in the design. |
| 12 | +const APIVersion = "0.0.1" |
| 13 | + |
| 14 | +// ServiceName is the name of the service as defined in the design. This is the |
| 15 | +// same value that is set in the endpoint request contexts under the ServiceKey |
| 16 | +// key. |
| 17 | +const ServiceName = "RawObjectPayloadTypeNameCollision" |
| 18 | + |
| 19 | +// MethodNames lists the service method names as defined in the design. These |
| 20 | +// are the same values that are set in the endpoint request contexts under the |
| 21 | +// MethodKey key. |
| 22 | +var MethodNames = [1]string{"Foo"} |
| 23 | + |
| 24 | +type FooPayload struct { |
| 25 | + X *string |
| 26 | +} |
| 27 | + |
| 28 | +type FooPayload2 struct { |
| 29 | + Y *string |
| 30 | +} |
| 31 | + |
| 32 | +// FooPayload3 is the payload type of the RawObjectPayloadTypeNameCollision |
| 33 | +// service Foo method. |
| 34 | +type FooPayload3 struct { |
| 35 | + A string |
| 36 | +} |
| 37 | + |
| 38 | +// Error returns an error description. |
| 39 | +func (e *FooPayload) Error() string { |
| 40 | + return "" |
| 41 | +} |
| 42 | + |
| 43 | +// ErrorName returns the error name. |
| 44 | +// |
| 45 | +// Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105 |
| 46 | +func (e *FooPayload) ErrorName() string { |
| 47 | + return e.GoaErrorName() |
| 48 | +} |
| 49 | + |
| 50 | +// GoaErrorName returns the error name. |
| 51 | +func (e *FooPayload) GoaErrorName() string { |
| 52 | + return "reserve_foo_payload" |
| 53 | +} |
| 54 | + |
| 55 | +// Error returns an error description. |
| 56 | +func (e *FooPayload2) Error() string { |
| 57 | + return "" |
| 58 | +} |
| 59 | + |
| 60 | +// ErrorName returns the error name. |
| 61 | +// |
| 62 | +// Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105 |
| 63 | +func (e *FooPayload2) ErrorName() string { |
| 64 | + return e.GoaErrorName() |
| 65 | +} |
| 66 | + |
| 67 | +// GoaErrorName returns the error name. |
| 68 | +func (e *FooPayload2) GoaErrorName() string { |
| 69 | + return "reserve_foo_payload2" |
| 70 | +} |
0 commit comments