|
| 1 | +/* |
| 2 | + * User API |
| 3 | + * |
| 4 | + * A notifications proof of concept API |
| 5 | + * |
| 6 | + * API version: 0.1.0 |
| 7 | + |
| 8 | + * Generated by: OpenAPI Generator (https://openapi-generator.tech) |
| 9 | + */ |
| 10 | + |
| 11 | +package api |
| 12 | + |
| 13 | +import ( |
| 14 | + "context" |
| 15 | + "errors" |
| 16 | + "net/http" |
| 17 | +) |
| 18 | + |
| 19 | +// NotificationsAPIApiService is a service that implents the logic for the NotificationsAPIApiServicer |
| 20 | +// This service should implement the business logic for every endpoint for the NotificationsAPIApi API. |
| 21 | +// Include any external packages or services that will be required by this service. |
| 22 | +type NotificationsAPIApiService struct { |
| 23 | +} |
| 24 | + |
| 25 | +// NewNotificationsAPIApiService creates a default api service |
| 26 | +func NewNotificationsAPIApiService() NotificationsAPIApiServicer { |
| 27 | + return &NotificationsAPIApiService{} |
| 28 | +} |
| 29 | + |
| 30 | +// AddNotification - adds a new notification |
| 31 | +func (s *NotificationsAPIApiService) AddNotification(ctx context.Context, notificationDetails NotificationDetails) (ImplResponse, error) { |
| 32 | + // TODO - update AddNotification with the required logic for this service method. |
| 33 | + // Add api_notifications_api_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. |
| 34 | + |
| 35 | + //TODO: Uncomment the next line to return response Response(201, Id{}) or use other options such as http.Ok ... |
| 36 | + //return Response(201, Id{}), nil |
| 37 | + |
| 38 | + //TODO: Uncomment the next line to return response Response(400, {}) or use other options such as http.Ok ... |
| 39 | + //return Response(400, nil),nil |
| 40 | + |
| 41 | + //TODO: Uncomment the next line to return response Response(500, {}) or use other options such as http.Ok ... |
| 42 | + //return Response(500, nil),nil |
| 43 | + |
| 44 | + return Response(http.StatusNotImplemented, nil), errors.New("AddNotification method not implemented") |
| 45 | +} |
| 46 | + |
| 47 | +// Ping - tests this api |
| 48 | +func (s *NotificationsAPIApiService) Ping(ctx context.Context) (ImplResponse, error) { |
| 49 | + // TODO - update Ping with the required logic for this service method. |
| 50 | + // Add api_notifications_api_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. |
| 51 | + |
| 52 | + //TODO: Uncomment the next line to return response Response(201, PingResponse{}) or use other options such as http.Ok ... |
| 53 | + //return Response(201, PingResponse{}), nil |
| 54 | + |
| 55 | + return Response(http.StatusNotImplemented, nil), errors.New("Ping method not implemented") |
| 56 | +} |
0 commit comments