first commit

This commit is contained in:
Sas Andy
2024-12-09 09:51:19 +07:00
commit ecc5dfd9c0
69 changed files with 5365 additions and 0 deletions

314
docs/docs.go Normal file
View File

@@ -0,0 +1,314 @@
// 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": {},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/westone/api/v1/auth/login": {
"post": {
"description": "login using westone account",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "login using westone account",
"parameters": [
{
"description": "parameter",
"name": "parameter",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.SignInPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/westone/api/v1/mddoctor/searchdoctor": {
"post": {
"description": "Search Doctors by name, NIK, Doctor Code, DOB, or phone number",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Doctor"
],
"summary": "Search Doctors listing",
"parameters": [
{
"type": "string",
"description": "Authorization token",
"name": "authorization",
"in": "header",
"required": true
},
{
"description": "parameter",
"name": "parameter",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.SearchDoctorPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/westone/api/v1/mdpatient/searchpatient": {
"post": {
"description": "Search patients by name, NIK, registration number, DOB, or phone number",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Patient"
],
"summary": "Search patient listing",
"parameters": [
{
"type": "string",
"description": "Authorization token",
"name": "authorization",
"in": "header",
"required": true
},
{
"description": "parameter",
"name": "parameter",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.SearchPatientPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/westone/api/v1/mdpatient/searchpatientold": {
"post": {
"description": "Search patients by name, NIK, registration number, DOB, or phone number",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Patient"
],
"summary": "Search patient listing old methods",
"parameters": [
{
"type": "string",
"description": "Authorization token",
"name": "authorization",
"in": "header",
"required": true
},
{
"description": "parameter",
"name": "parameter",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.SearchPatientPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
}
},
"definitions": {
"types.SearchDoctorPayload": {
"type": "object",
"required": [
"page",
"perpage"
],
"properties": {
"keyword": {
"type": "string"
},
"page": {
"type": "integer"
},
"perpage": {
"type": "integer"
}
}
},
"types.SearchPatientPayload": {
"type": "object",
"required": [
"page",
"perpage"
],
"properties": {
"keyword": {
"type": "string"
},
"page": {
"type": "integer"
},
"perpage": {
"type": "integer"
}
}
},
"types.SignInPayload": {
"type": "object",
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string",
"maxLength": 130,
"minLength": 6
}
}
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "",
BasePath: "",
Schemes: []string{},
Title: "WESTONE API",
Description: "westone api documentation test",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}

288
docs/swagger.json Normal file
View File

@@ -0,0 +1,288 @@
{
"swagger": "2.0",
"info": {
"description": "westone api documentation test",
"title": "WESTONE API",
"termsOfService": "http://swagger.io/terms/",
"contact": {},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0"
},
"paths": {
"/westone/api/v1/auth/login": {
"post": {
"description": "login using westone account",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "login using westone account",
"parameters": [
{
"description": "parameter",
"name": "parameter",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.SignInPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/westone/api/v1/mddoctor/searchdoctor": {
"post": {
"description": "Search Doctors by name, NIK, Doctor Code, DOB, or phone number",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Doctor"
],
"summary": "Search Doctors listing",
"parameters": [
{
"type": "string",
"description": "Authorization token",
"name": "authorization",
"in": "header",
"required": true
},
{
"description": "parameter",
"name": "parameter",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.SearchDoctorPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/westone/api/v1/mdpatient/searchpatient": {
"post": {
"description": "Search patients by name, NIK, registration number, DOB, or phone number",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Patient"
],
"summary": "Search patient listing",
"parameters": [
{
"type": "string",
"description": "Authorization token",
"name": "authorization",
"in": "header",
"required": true
},
{
"description": "parameter",
"name": "parameter",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.SearchPatientPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/westone/api/v1/mdpatient/searchpatientold": {
"post": {
"description": "Search patients by name, NIK, registration number, DOB, or phone number",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Patient"
],
"summary": "Search patient listing old methods",
"parameters": [
{
"type": "string",
"description": "Authorization token",
"name": "authorization",
"in": "header",
"required": true
},
{
"description": "parameter",
"name": "parameter",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.SearchPatientPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
}
},
"definitions": {
"types.SearchDoctorPayload": {
"type": "object",
"required": [
"page",
"perpage"
],
"properties": {
"keyword": {
"type": "string"
},
"page": {
"type": "integer"
},
"perpage": {
"type": "integer"
}
}
},
"types.SearchPatientPayload": {
"type": "object",
"required": [
"page",
"perpage"
],
"properties": {
"keyword": {
"type": "string"
},
"page": {
"type": "integer"
},
"perpage": {
"type": "integer"
}
}
},
"types.SignInPayload": {
"type": "object",
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string",
"maxLength": 130,
"minLength": 6
}
}
}
}
}

197
docs/swagger.yaml Normal file
View File

@@ -0,0 +1,197 @@
definitions:
types.SearchDoctorPayload:
properties:
keyword:
type: string
page:
type: integer
perpage:
type: integer
required:
- page
- perpage
type: object
types.SearchPatientPayload:
properties:
keyword:
type: string
page:
type: integer
perpage:
type: integer
required:
- page
- perpage
type: object
types.SignInPayload:
properties:
email:
type: string
password:
maxLength: 130
minLength: 6
type: string
required:
- email
- password
type: object
info:
contact: {}
description: westone api documentation test
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
termsOfService: http://swagger.io/terms/
title: WESTONE API
version: "1.0"
paths:
/westone/api/v1/auth/login:
post:
consumes:
- application/json
description: login using westone account
parameters:
- description: parameter
in: body
name: parameter
required: true
schema:
$ref: '#/definitions/types.SignInPayload'
produces:
- application/json
responses:
"200":
description: OK
schema:
additionalProperties: true
type: object
"400":
description: Bad Request
schema:
additionalProperties: true
type: object
"500":
description: Internal Server Error
schema:
additionalProperties: true
type: object
summary: login using westone account
tags:
- Auth
/westone/api/v1/mddoctor/searchdoctor:
post:
consumes:
- application/json
description: Search Doctors by name, NIK, Doctor Code, DOB, or phone number
parameters:
- description: Authorization token
in: header
name: authorization
required: true
type: string
- description: parameter
in: body
name: parameter
required: true
schema:
$ref: '#/definitions/types.SearchDoctorPayload'
produces:
- application/json
responses:
"200":
description: OK
schema:
additionalProperties: true
type: object
"400":
description: Bad Request
schema:
additionalProperties: true
type: object
"500":
description: Internal Server Error
schema:
additionalProperties: true
type: object
summary: Search Doctors listing
tags:
- Doctor
/westone/api/v1/mdpatient/searchpatient:
post:
consumes:
- application/json
description: Search patients by name, NIK, registration number, DOB, or phone
number
parameters:
- description: Authorization token
in: header
name: authorization
required: true
type: string
- description: parameter
in: body
name: parameter
required: true
schema:
$ref: '#/definitions/types.SearchPatientPayload'
produces:
- application/json
responses:
"200":
description: OK
schema:
additionalProperties: true
type: object
"400":
description: Bad Request
schema:
additionalProperties: true
type: object
"500":
description: Internal Server Error
schema:
additionalProperties: true
type: object
summary: Search patient listing
tags:
- Patient
/westone/api/v1/mdpatient/searchpatientold:
post:
consumes:
- application/json
description: Search patients by name, NIK, registration number, DOB, or phone
number
parameters:
- description: Authorization token
in: header
name: authorization
required: true
type: string
- description: parameter
in: body
name: parameter
required: true
schema:
$ref: '#/definitions/types.SearchPatientPayload'
produces:
- application/json
responses:
"200":
description: OK
schema:
additionalProperties: true
type: object
"400":
description: Bad Request
schema:
additionalProperties: true
type: object
"500":
description: Internal Server Error
schema:
additionalProperties: true
type: object
summary: Search patient listing old methods
tags:
- Patient
swagger: "2.0"