// 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}}", "contact": {}, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/api/v1/auth/login": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Login user", "parameters": [ { "description": "Login payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.LoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/auth/me": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Get current user from token", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/auth/refresh": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Refresh access token", "parameters": [ { "description": "Refresh payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.RefreshRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/auth/register": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Register user", "parameters": [ { "description": "Register payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.RegisterRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "Conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/auth/resend-verification": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Resend verification email", "parameters": [ { "description": "Resend verification payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.ResendVerificationRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/auth/verify-email": { "get": { "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Verify email address with token", "parameters": [ { "type": "string", "description": "Email verify token", "name": "token", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/cart": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Get the current user's cart", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.CartDoc" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Clear the entire cart", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.CartDoc" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/cart/items": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Add item to cart", "parameters": [ { "description": "Cart Item Details", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.AddToCartRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.CartDoc" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/cart/items/{item_id}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Update cart item quantity", "parameters": [ { "type": "integer", "description": "Cart Item ID", "name": "item_id", "in": "path", "required": true }, { "description": "Update Quantity", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.UpdateCartItemRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.CartDoc" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Cart" ], "summary": "Remove item from cart", "parameters": [ { "type": "integer", "description": "Cart Item ID", "name": "item_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.CartDoc" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/categories": { "get": { "produces": [ "application/json" ], "tags": [ "Categories" ], "summary": "List categories (public)", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.CategoryDoc" } } } } } }, "/api/v1/categories/{slug}": { "get": { "produces": [ "application/json" ], "tags": [ "Categories" ], "summary": "Get single category (public)", "parameters": [ { "type": "string", "description": "Category slug", "name": "slug", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.CategoryDoc" } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/comments": { "get": { "produces": [ "application/json" ], "tags": [ "Comments" ], "summary": "List comments for a post (public)", "parameters": [ { "type": "integer", "description": "Post ID", "name": "post_id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.CommentDoc" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Comments" ], "summary": "Create comment (public)", "parameters": [ { "description": "Comment payload", "name": "data", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/models.CommentDoc" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/hero": { "get": { "produces": [ "application/json" ], "tags": [ "Hero" ], "summary": "Get active hero/banner", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/heroes": { "get": { "description": "Returns all hero/banner records (no filter)", "produces": [ "application/json" ], "tags": [ "Hero" ], "summary": "Get all heroes", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": true } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/posts": { "get": { "produces": [ "application/json" ], "tags": [ "Posts" ], "summary": "List posts (public) with pagination", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/v1/posts/{slug}": { "get": { "produces": [ "application/json" ], "tags": [ "Posts" ], "summary": "Get single post (public)", "parameters": [ { "type": "string", "description": "Post slug", "name": "slug", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.PostDoc" } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/product-categories/{id}/view": { "post": { "produces": [ "application/json" ], "tags": [ "Products" ], "summary": "Record a view for a product category", "parameters": [ { "type": "integer", "description": "Category ID", "name": "id", "in": "path", "required": true } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/models.ProductCategoryViewDoc" } } } } }, "/api/v1/products": { "get": { "produces": [ "application/json" ], "tags": [ "Products" ], "summary": "List products (public) with pagination", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/v1/products/{id}/comments": { "get": { "produces": [ "application/json" ], "tags": [ "Products" ], "summary": "Get comments for a product", "parameters": [ { "type": "integer", "description": "Product ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.ProductCommentDoc" } } } } } }, "/api/v1/products/{slug}": { "get": { "produces": [ "application/json" ], "tags": [ "Products" ], "summary": "Get single product (public) by slug", "parameters": [ { "type": "string", "description": "Product slug", "name": "slug", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.ProductDoc" } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/setting": { "get": { "produces": [ "application/json" ], "tags": [ "Setting" ], "summary": "Get site settings", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/tags": { "get": { "produces": [ "application/json" ], "tags": [ "Tags" ], "summary": "List tags (public)", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.TagDoc" } } } } } } }, "definitions": { "controllers.AddToCartRequest": { "type": "object", "required": [ "product_id", "quantity" ], "properties": { "product_id": { "type": "integer" }, "quantity": { "type": "integer", "minimum": 1 } } }, "controllers.LoginRequest": { "type": "object", "required": [ "email", "password" ], "properties": { "email": { "type": "string" }, "password": { "type": "string" } } }, "controllers.RefreshRequest": { "type": "object", "required": [ "refresh_token" ], "properties": { "refresh_token": { "type": "string" } } }, "controllers.RegisterRequest": { "type": "object", "required": [ "email", "first_name", "last_name", "password", "username" ], "properties": { "email": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "password": { "type": "string", "minLength": 6 }, "username": { "type": "string", "minLength": 3 } } }, "controllers.ResendVerificationRequest": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string" } } }, "controllers.UpdateCartItemRequest": { "type": "object", "required": [ "quantity" ], "properties": { "quantity": { "type": "integer", "minimum": 1 } } }, "models.CartDoc": { "type": "object", "properties": { "id": { "type": "integer" }, "items": { "type": "array", "items": { "$ref": "#/definitions/models.CartItemDoc" } }, "user_id": { "type": "integer" } } }, "models.CartItemDoc": { "type": "object", "properties": { "cart_id": { "type": "integer" }, "id": { "type": "integer" }, "product": { "$ref": "#/definitions/models.ProductDoc" }, "product_id": { "type": "integer" }, "quantity": { "type": "integer" } } }, "models.CategoryDoc": { "type": "object", "properties": { "children": { "type": "array", "items": { "$ref": "#/definitions/models.CategoryDoc" } }, "description": { "type": "string" }, "id": { "type": "integer" }, "parent_id": { "type": "integer" }, "title": { "type": "string" } } }, "models.CommentDoc": { "type": "object", "properties": { "body": { "type": "string" }, "id": { "type": "integer" }, "post_id": { "type": "integer" }, "user_id": { "type": "integer" } } }, "models.PostDoc": { "type": "object", "properties": { "categories": { "type": "array", "items": { "$ref": "#/definitions/models.CategoryDoc" } }, "content": { "type": "string" }, "id": { "type": "integer" }, "images": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/models.TagDoc" } }, "title": { "type": "string" } } }, "models.ProductCategoryDoc": { "type": "object", "properties": { "children": { "type": "array", "items": { "$ref": "#/definitions/models.ProductCategoryDoc" } }, "description": { "type": "string" }, "id": { "type": "integer" }, "keywords": { "type": "string" }, "parent_id": { "type": "integer" }, "slug": { "type": "string" }, "title": { "type": "string" } } }, "models.ProductCategoryViewDoc": { "type": "object", "properties": { "category_id": { "type": "integer" }, "id": { "type": "integer" }, "ip_address": { "type": "string" } } }, "models.ProductCommentDoc": { "type": "object", "properties": { "body": { "type": "string" }, "id": { "type": "integer" }, "product_id": { "type": "integer" }, "user_id": { "type": "integer" } } }, "models.ProductDoc": { "type": "object", "properties": { "categories": { "type": "array", "items": { "$ref": "#/definitions/models.ProductCategoryDoc" } }, "content": { "type": "string" }, "format": { "type": "string" }, "height": { "type": "integer" }, "id": { "type": "integer" }, "images": { "type": "string" }, "price": { "type": "number" }, "quality": { "type": "integer" }, "slug": { "type": "string" }, "tags": { "type": "array", "items": { "$ref": "#/definitions/models.ProductTagDoc" } }, "title": { "type": "string" }, "width": { "type": "integer" } } }, "models.ProductTagDoc": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "models.TagDoc": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } } }, "securityDefinitions": { "BearerAuth": { "description": "Enter your bearer token in the format 'Bearer {token}'", "type": "apiKey", "name": "Authorization", "in": "header" } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "", Host: "", BasePath: "", Schemes: []string{}, Title: "", Description: "", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }