// 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": { "name": "API Support", "url": "http://hammercode.org/support", "email": "hammercode.org" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/api/v1/admin/events": { "get": { "description": "This endpoint use to get events by filter", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event" ], "summary": "Get Events", "parameters": [ { "type": "string", "description": "string", "name": "limit", "in": "query", "required": true }, { "type": "string", "description": "string", "name": "page", "in": "query", "required": true }, { "type": "string", "description": "string", "name": "orderBy", "in": "query" }, { "type": "string", "description": "string", "name": "start_date", "in": "query" }, { "type": "string", "description": "string", "name": "end_date", "in": "query" }, { "type": "string", "description": "string", "name": "title", "in": "query" }, { "type": "string", "description": "string", "name": "type", "in": "query" }, { "type": "string", "description": "string", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.Event" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "This endpoint create event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event" ], "summary": "Create Event", "parameters": [ { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.CreateEventPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } } }, "/api/v1/admin/events/{id}": { "get": { "description": "This endpoint use to get detail event by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event" ], "summary": "Get Detail Event by ID", "parameters": [ { "type": "string", "description": "id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Event" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "This endpoint use to delete event by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event" ], "summary": "Delete Event By Id", "parameters": [ { "type": "string", "description": "id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } }, "patch": { "security": [ { "BearerAuth": [] } ], "description": "This endpoint update event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event" ], "summary": "Update Event", "parameters": [ { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.UpdateEventPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } } }, "/api/v1/auth/login": { "post": { "description": "This endpoint use to login", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Login", "parameters": [ { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Login" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } } }, "/api/v1/auth/logout": { "post": { "description": "This endpoint use to logout", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Logout", "parameters": [ { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Login" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } } }, "/api/v1/auth/register": { "post": { "description": "This endpoint use to register", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Register", "parameters": [ { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Register" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.User" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } } }, "/api/v1/events": { "get": { "description": "This endpoint use to get events by filter", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event" ], "summary": "Get List Available Event", "parameters": [ { "type": "string", "description": "string", "name": "limit", "in": "query", "required": true }, { "type": "string", "description": "string", "name": "page", "in": "query", "required": true }, { "type": "string", "description": "string", "name": "orderBy", "in": "query" }, { "type": "string", "description": "string", "name": "start_date", "in": "query" }, { "type": "string", "description": "string", "name": "end_date", "in": "query" }, { "type": "string", "description": "string", "name": "title", "in": "query" }, { "type": "string", "description": "string", "name": "type", "in": "query" }, { "type": "string", "description": "string", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.Event" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } } }, "/api/v1/events/pay": { "post": { "description": "This endpoint pay the event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event" ], "summary": "Pay Event", "parameters": [ { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.EventPayPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } } }, "/api/v1/events/pays": { "get": { "description": "This endpoint use to get list of event pay", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event" ], "summary": "Get List event pay", "parameters": [ { "type": "string", "description": "string", "name": "limit", "in": "query", "required": true }, { "type": "string", "description": "string", "name": "page", "in": "query", "required": true }, { "type": "string", "description": "string", "name": "event_id", "in": "query" }, { "type": "string", "description": "string", "name": "start_date", "in": "query" }, { "type": "string", "description": "string", "name": "end_date", "in": "query" }, { "type": "string", "description": "string", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.EventPay" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } }, "post": { "description": "This endpoint use to confirm payment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event" ], "summary": "Pay Process", "parameters": [ { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.PayProcessPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } } }, "/api/v1/events/registartions/:order_no": { "get": { "description": "This endpoint use to check registration status", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event" ], "summary": "Register Status", "parameters": [ { "type": "string", "description": "ABCXX", "name": "order_no", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.RegisterStatusResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } } }, "/api/v1/events/registrations": { "get": { "description": "This endpoint use to get list of user that register on event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event" ], "summary": "Get List Register user to event", "parameters": [ { "type": "string", "description": "string", "name": "limit", "in": "query", "required": true }, { "type": "string", "description": "string", "name": "page", "in": "query", "required": true }, { "type": "string", "description": "string", "name": "event_id", "in": "query" }, { "type": "string", "description": "string", "name": "start_date", "in": "query" }, { "type": "string", "description": "string", "name": "end_date", "in": "query" }, { "type": "string", "description": "string", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.RegistrationEvent" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } }, "post": { "description": "This endpoint use to register event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event" ], "summary": "Register Event", "parameters": [ { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.RegisterEventPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } } }, "/api/v1/events/{id}": { "get": { "description": "This endpoint use to get event by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event" ], "summary": "Get Detail Event by ID", "parameters": [ { "type": "string", "description": "id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Event" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } } }, "/api/v1/users": { "get": { "description": "This endpoint use to get current user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Get User Profile", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.User" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } }, "put": { "description": "This endpoint use to update profile user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Update User", "parameters": [ { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.UserUpdateProfile" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } }, "delete": { "description": "This endpoint use to delete user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Delete User", "parameters": [ { "type": "string", "description": "string", "name": "id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.HttpResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.HttpResponse" } } } } } }, "definitions": { "domain.CreateEventPayload": { "type": "object", "required": [ "author", "capacity", "date", "description", "duration", "file_name", "is_online", "location", "slug", "status", "title", "type" ], "properties": { "author": { "type": "string" }, "capacity": { "type": "integer" }, "date": { "type": "string" }, "description": { "type": "string" }, "duration": { "type": "string" }, "file_name": { "type": "string" }, "is_online": { "type": "string" }, "location": { "type": "string" }, "price": { "type": "number" }, "registration_link": { "type": "string" }, "reservation_start_date": { "type": "string" }, "reseveration_end_date": { "type": "string" }, "slug": { "type": "string" }, "speakers": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "title": { "type": "string" }, "type": { "type": "string" } } }, "domain.Event": { "type": "object", "properties": { "author": { "type": "string" }, "capacity": { "type": "integer" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "date": { "type": "string" }, "deleted_at": { "type": "string" }, "deleted_by": { "type": "integer" }, "description": { "type": "string" }, "duration": { "type": "string" }, "id": { "type": "integer" }, "image_event": { "type": "string" }, "location": { "type": "string" }, "price": { "description": "0 == free", "type": "number" }, "registration_link": { "type": "string" }, "reservation_start_date": { "type": "string" }, "reseveration_end_date": { "type": "string" }, "slug": { "type": "string" }, "speakers": { "description": "Ensure foreign key is correctly referenced", "type": "array", "items": { "$ref": "#/definitions/domain.EventSpeaker" } }, "status": { "description": "comming soon", "type": "string" }, "tags": { "description": "Ensure foreign key is correctly referenced", "type": "array", "items": { "$ref": "#/definitions/domain.EventTag" } }, "title": { "type": "string" }, "type": { "type": "string" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" } } }, "domain.EventPay": { "type": "object", "properties": { "event_id": { "type": "integer" }, "id": { "type": "integer" }, "image_proof_payment": { "type": "string" }, "net_amount": { "type": "number" }, "order_no": { "type": "string" }, "registration_event": { "$ref": "#/definitions/domain.RegistrationEvent" }, "registration_event_id": { "type": "integer" }, "status": { "type": "string" } } }, "domain.EventPayPayload": { "type": "object", "properties": { "image_proof_payment": { "type": "string" }, "net_amount": { "type": "number" }, "order_no": { "type": "string" } } }, "domain.EventSpeaker": { "type": "object", "properties": { "event_id": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" } } }, "domain.EventTag": { "type": "object", "properties": { "event_id": { "type": "integer" }, "id": { "type": "integer" }, "tags": { "type": "string" } } }, "domain.HttpResponse": { "type": "object", "properties": { "code": { "type": "integer" }, "data": {}, "limit": { "type": "integer" }, "message": { "type": "string" }, "page": { "type": "integer" }, "total_count": { "type": "integer" }, "total_pages": { "type": "integer" } } }, "domain.Login": { "type": "object", "required": [ "email", "password" ], "properties": { "email": { "type": "string" }, "password": { "type": "string" } } }, "domain.PayProcessPayload": { "type": "object", "properties": { "note": { "type": "string" }, "order_no": { "type": "string" }, "status": { "type": "string" } } }, "domain.Register": { "type": "object", "required": [ "confirm_password", "email", "password", "username" ], "properties": { "confirm_password": { "type": "string" }, "email": { "type": "string" }, "password": { "type": "string" }, "username": { "type": "string" } } }, "domain.RegisterEventPayload": { "type": "object", "properties": { "email": { "type": "string" }, "event_id": { "type": "integer" }, "image_proof_payment": { "type": "string" }, "name": { "type": "string" }, "net_amount": { "type": "number" }, "phone_number": { "type": "string" }, "user_id": { "type": "string" } } }, "domain.RegisterStatusResponse": { "type": "object", "properties": { "order_no": { "type": "string" }, "string": { "type": "string" } } }, "domain.RegistrationEvent": { "type": "object", "properties": { "created_at": { "type": "string" }, "created_by_user_id": { "type": "integer" }, "deleted_at": { "type": "string" }, "deleted_by_user_id": { "type": "integer" }, "email": { "type": "string" }, "event_id": { "description": "lock event", "type": "integer" }, "id": { "type": "integer" }, "image_proof_payment": { "type": "string" }, "name": { "type": "string" }, "order_no": { "type": "string" }, "payment_date": { "type": "string" }, "phone_number": { "type": "string" }, "status": { "description": "register, pay, approve/cancel/decline", "type": "string" }, "up_to_you": { "type": "string" }, "updated_at": { "type": "string" }, "updated_by_user_id": { "type": "integer" }, "user_id": { "description": "lock user", "type": "string" } } }, "domain.UpdateEventPayload": { "type": "object", "required": [ "author", "capacity", "date", "description", "duration", "file_name", "is_online", "location", "slug", "status", "title", "type" ], "properties": { "author": { "type": "string" }, "capacity": { "type": "integer" }, "date": { "type": "string" }, "description": { "type": "string" }, "duration": { "type": "string" }, "file_name": { "type": "string" }, "is_online": { "type": "string" }, "location": { "type": "string" }, "price": { "type": "number" }, "registration_link": { "type": "string" }, "reservation_start_date": { "type": "string" }, "reseveration_end_date": { "type": "string" }, "slug": { "type": "string" }, "speakers": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "title": { "type": "string" }, "type": { "type": "string" } } }, "domain.User": { "type": "object", "properties": { "address": { "type": "string" }, "created_at": { "type": "string" }, "date_of_birth": { "type": "string" }, "email": { "type": "string" }, "fullname": { "type": "string" }, "gender": { "type": "string" }, "github": { "type": "string" }, "id": { "type": "integer" }, "linkedin": { "type": "string" }, "password": { "type": "string" }, "personal_web": { "type": "string" }, "phone_number": { "type": "string" }, "role": { "type": "string" }, "updated_at": { "type": "string" }, "username": { "type": "string" } } }, "domain.UserUpdateProfile": { "type": "object", "properties": { "address": { "type": "string" }, "date_of_birth": { "type": "string" }, "fullname": { "type": "string" }, "gender": { "type": "string" }, "github": { "type": "string" }, "linkedin": { "type": "string" }, "personal_web": { "type": "string" }, "phone_number": { "type": "string" }, "username": { "type": "string" } } } }, "securityDefinitions": { "BearerAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0", Host: "", BasePath: "", Schemes: []string{}, Title: "Golang API (LMS-BE)", Description: "This is the API documentation for this service.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }