// Package docs Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", "termsOfService": "http://swagger.io/terms/", "contact": { "name": "API Support", "url": "http://www.swagger.io/support", "email": "support@swagger.io" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/auth/login": { "post": { "description": "Authenticate user with username and password to receive JWT token", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Authentication" ], "summary": "Login user and get JWT token", "parameters": [ { "description": "Login credentials", "name": "login", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api-service_internal_models_auth.LoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api-service_internal_models_auth.TokenResponse" } }, "400": { "description": "Bad request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/auth/me": { "get": { "security": [ { "Bearer": [] } ], "description": "Get information about the currently authenticated user", "produces": [ "application/json" ], "tags": [ "Authentication" ], "summary": "Get current user info", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api-service_internal_models_auth.User" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/auth/refresh": { "post": { "description": "Refresh the JWT token using a valid refresh token", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Authentication" ], "summary": "Refresh JWT token", "parameters": [ { "description": "Refresh token", "name": "refresh", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": { "type": "string" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api-service_internal_models_auth.TokenResponse" } }, "400": { "description": "Bad request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/auth/register": { "post": { "description": "Register a new user account", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Authentication" ], "summary": "Register new user", "parameters": [ { "description": "Registration data", "name": "register", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": { "type": "string" } } } ], "responses": { "201": { "description": "Created", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/token/generate": { "post": { "description": "Generate a JWT token for a user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Token" ], "summary": "Generate JWT token", "parameters": [ { "description": "User credentials", "name": "token", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api-service_internal_models_auth.LoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api-service_internal_models_auth.TokenResponse" } }, "400": { "description": "Bad request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/token/generate-direct": { "post": { "description": "Generate a JWT token directly without password verification (for testing)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Token" ], "summary": "Generate token directly", "parameters": [ { "description": "User info", "name": "user", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": { "type": "string" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api-service_internal_models_auth.TokenResponse" } }, "400": { "description": "Bad request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/ws/broadcast/check": { "post": { "description": "Creates and broadcasts a WebSocket message with the specified type and data", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "WebSocket QRIS" ], "summary": "Broadcast a WebSocket message", "parameters": [ { "type": "string", "description": "Type of the message to broadcast", "name": "messageType", "in": "path", "required": true }, { "description": "Data payload for the message", "name": "data", "in": "body", "required": true, "schema": {} } ], "responses": { "200": { "description": "Message successfully queued for broadcast", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "Failed to queue message (queue full)", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/ws/broadcast/qris": { "post": { "description": "Creates and broadcasts a WebSocket message with the specified type and data for QRIS operations", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "WebSocket QRIS" ], "summary": "Broadcast a QRIS-related WebSocket message", "parameters": [ { "type": "string", "description": "Type of the QRIS message to broadcast", "name": "messageType", "in": "path", "required": true }, { "description": "QRIS data payload for the message", "name": "data", "in": "body", "required": true, "schema": {} } ], "responses": { "200": { "description": "QRIS message successfully queued for broadcast", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "Failed to queue QRIS message (queue full)", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } } }, "definitions": { "api-service_internal_models_auth.LoginRequest": { "type": "object", "required": [ "password", "username" ], "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "api-service_internal_models_auth.TokenResponse": { "type": "object", "properties": { "access_token": { "type": "string" }, "expires_in": { "type": "integer" }, "token_type": { "type": "string" } } }, "api-service_internal_models_auth.User": { "type": "object", "properties": { "email": { "type": "string" }, "id": { "type": "string" }, "role": { "type": "string" }, "username": { "type": "string" } } } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0.0", Host: "localhost:8080", BasePath: "/api/v1", Schemes: []string{"http", "https"}, Title: "API Service", Description: "A comprehensive Go API service with Swagger documentation", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }