Compare commits
10 Commits
6c23369c06
...
bd02bb83a7
| Author | SHA1 | Date | |
|---|---|---|---|
| bd02bb83a7 | |||
| 266d937c51 | |||
| 35fb96b1e7 | |||
| 71fd910b29 | |||
| 26765fcc51 | |||
| abaddf2589 | |||
| 3af7a7ecbb | |||
| 5185a37da2 | |||
| f9d4c22c24 | |||
| ac085afd26 |
33
.env
Normal file
33
.env
Normal file
@@ -0,0 +1,33 @@
|
||||
PORT=8084
|
||||
|
||||
SATUDATA_HOST=10.10.123.165
|
||||
SATUDATA_USER=stim
|
||||
SATUDATA_PASS=stim*RS54
|
||||
SATUDATA_NAME=satu_db
|
||||
SATUDATA_PORT=5000
|
||||
|
||||
SIMRS_HOST=10.10.123.160
|
||||
SIMRS_USERNAME=simrs
|
||||
SIMRS_PASSWORD=simrs.rssa
|
||||
SIMRS_NAME=simrs
|
||||
SIMRS_PORT=5000
|
||||
|
||||
SIMRS_STAG_HOST=10.10.123.223
|
||||
SIMRS_STAG_USER=simtest
|
||||
SIMRS_STAG_PASS=12345
|
||||
SIMRS_STAG_NAME=simrs-stag
|
||||
SIMRS_STAG_PORT=5432
|
||||
|
||||
MONGODB_DEV_HOST=10.10.123.206
|
||||
MONGODB_DEV_PORT=27017
|
||||
MONGODB_DEV_USER=admin
|
||||
MONGODB_DEV_PASS=stim*rs54
|
||||
MONGODB_DEV_MASTER=master
|
||||
MONGODB_DEV_LOCAL=local
|
||||
|
||||
POSTGRES_ANTREAN_USERNAME=stim_read
|
||||
POSTGRES_ANTREAN_PASSWORD=itikom123
|
||||
POSTGRES_ANTREAN_HOST=10.10.123.198
|
||||
POSTGRES_ANTREAN_DATABASE=db_antrean
|
||||
POSTGRES_ANTREAN_PORT=5100
|
||||
POSTGRES_ANTREAN_SSLMODE=disable
|
||||
26
Dockerfile
26
Dockerfile
@@ -1,42 +1,26 @@
|
||||
FROM golang:1.23 AS builder
|
||||
# Install curl dan Tailwind dependencies
|
||||
RUN apt-get update && apt-get install -y curl ca-certificates
|
||||
FROM golang:1.23-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy go.mod dan go.sum untuk dependency management
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
RUN go mod download
|
||||
RUN go mod tidy
|
||||
|
||||
# Copy seluruh project
|
||||
COPY . .
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main ./cmd/api
|
||||
|
||||
# Install Tailwind CSS untuk generate output.css
|
||||
RUN go install github.com/a-h/templ/cmd/templ@latest && \
|
||||
templ generate && \
|
||||
curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 -o tailwindcss && \
|
||||
chmod +x tailwindcss && \
|
||||
./tailwindcss -i cmd/web/assets/css/input.css -o cmd/web/assets/css/output.css
|
||||
# RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
# Set timezone ke Asia/Jakarta
|
||||
ENV TZ=Asia/Jakarta
|
||||
|
||||
# Install dependensi runtime yang diperlukan
|
||||
RUN apk --no-cache add ca-certificates tzdata
|
||||
|
||||
WORKDIR /root/
|
||||
|
||||
# Copy binary yang sudah ter-build dari stage sebelumnya
|
||||
COPY --from=builder /app/main .
|
||||
COPY --from=builder /app/.env .
|
||||
|
||||
# Expose port aplikasi
|
||||
EXPOSE 8803
|
||||
|
||||
# Jalankan aplikasi
|
||||
CMD ["./main"]
|
||||
EXPOSE 8084
|
||||
CMD ["./main"]
|
||||
504
cmd/api/docs/docs.go
Normal file
504
cmd/api/docs/docs.go
Normal file
@@ -0,0 +1,504 @@
|
||||
// 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": "https://tos.santoshk.dev",
|
||||
"contact": {
|
||||
"name": "Santosh Kumar",
|
||||
"url": "https://twitter.com/sntshk",
|
||||
"email": "sntshkmr60@gmail.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache 2.0",
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
},
|
||||
"version": "{{.Version}}"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/api/local/getalluser": {
|
||||
"get": {
|
||||
"description": "Retrieves all users from the database",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"users"
|
||||
],
|
||||
"summary": "Get all users",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of users",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/user.User"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Database connection failed",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/local/getuser/{id}": {
|
||||
"get": {
|
||||
"description": "Retrieves a user by their ID",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"users"
|
||||
],
|
||||
"summary": "Get user by ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "User ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "User data",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/user.User"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/localinsertuser": {
|
||||
"post": {
|
||||
"description": "Adds a new user to the database",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"users"
|
||||
],
|
||||
"summary": "Insert a new user",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "User Data",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/user.ReqInsertUser"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successfully Inserted User",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Database connection failed",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/retribusi/deleteretribusi/{ID}": {
|
||||
"delete": {
|
||||
"description": "Remove retribution data by id",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Retribusi"
|
||||
],
|
||||
"summary": "Delete retribution",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "ID",
|
||||
"name": "ID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Data Berhasil dihapus",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/retribusi/getData/Limit/{limit}/Offset/{offset}": {
|
||||
"get": {
|
||||
"description": "return list of all retribution from the database",
|
||||
"tags": [
|
||||
"Retribusi"
|
||||
],
|
||||
"summary": "all retribution",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "limit",
|
||||
"name": "limit",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "offset",
|
||||
"name": "offset",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/satu_data.Retribusi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/retribusi/insertretribusi": {
|
||||
"post": {
|
||||
"description": "Save retribution data in DB",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Retribusi"
|
||||
],
|
||||
"summary": "Create retribution",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "data Retribusi",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/satu_data.Retribusi"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Data Berhasil disimpan",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/retribusi/searchData/{kelompok_obyek}": {
|
||||
"get": {
|
||||
"description": "search retribution data by id",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Retribusi"
|
||||
],
|
||||
"summary": "Search retribution",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Kelompok_obyek",
|
||||
"name": "Kelompok_obyek",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/satu_data.Retribusi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/retribusi/updateretribusi": {
|
||||
"put": {
|
||||
"description": "Change retribution data in DB",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Retribusi"
|
||||
],
|
||||
"summary": "Update retribution",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "data Retribusi",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/satu_data.Retribusi"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Data Berhasil Diubah",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users": {
|
||||
"put": {
|
||||
"description": "Updates user information",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"users"
|
||||
],
|
||||
"summary": "Update a user",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "User Data",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/user.User"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successfully Updated User",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Database connection failed",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"satu_data.Retribusi": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Dinas": {
|
||||
"type": "string"
|
||||
},
|
||||
"Jenis": {
|
||||
"type": "string"
|
||||
},
|
||||
"Kelompok_obyek": {
|
||||
"type": "string"
|
||||
},
|
||||
"Kode_tarif": {
|
||||
"type": "string"
|
||||
},
|
||||
"Pelayanan": {
|
||||
"type": "string"
|
||||
},
|
||||
"Rekening_denda": {
|
||||
"type": "string"
|
||||
},
|
||||
"Rekening_pokok": {
|
||||
"type": "string"
|
||||
},
|
||||
"Satuan": {
|
||||
"type": "string"
|
||||
},
|
||||
"Satuan_overtime": {
|
||||
"type": "string"
|
||||
},
|
||||
"Tarif": {
|
||||
"type": "string"
|
||||
},
|
||||
"Tarif_overtime": {
|
||||
"type": "string"
|
||||
},
|
||||
"Uraian_1": {
|
||||
"type": "string"
|
||||
},
|
||||
"Uraian_2": {
|
||||
"type": "string"
|
||||
},
|
||||
"Uraian_3": {
|
||||
"type": "string"
|
||||
},
|
||||
"date_created": {
|
||||
"type": "string"
|
||||
},
|
||||
"date_updated": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"sort": {
|
||||
"type": "integer"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_created": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_updated": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"user.ReqInsertUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {
|
||||
"type": "string"
|
||||
},
|
||||
"age": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gender": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"religion": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"user.User": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {
|
||||
"type": "string"
|
||||
},
|
||||
"age": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gender": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"religion": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo = &swag.Spec{
|
||||
Version: "1.0",
|
||||
Host: "10.10.150.181:8084",
|
||||
BasePath: "/api",
|
||||
Schemes: []string{},
|
||||
Title: "Tag Service API0",
|
||||
Description: "A Tag service API in Go using Gin framework",
|
||||
InfoInstanceName: "swagger",
|
||||
SwaggerTemplate: docTemplate,
|
||||
LeftDelim: "{{",
|
||||
RightDelim: "}}",
|
||||
}
|
||||
|
||||
func init() {
|
||||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
||||
}
|
||||
480
cmd/api/docs/swagger.json
Normal file
480
cmd/api/docs/swagger.json
Normal file
@@ -0,0 +1,480 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "A Tag service API in Go using Gin framework",
|
||||
"title": "Tag Service API0",
|
||||
"termsOfService": "https://tos.santoshk.dev",
|
||||
"contact": {
|
||||
"name": "Santosh Kumar",
|
||||
"url": "https://twitter.com/sntshk",
|
||||
"email": "sntshkmr60@gmail.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache 2.0",
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
},
|
||||
"version": "1.0"
|
||||
},
|
||||
"host": "10.10.150.181:8084",
|
||||
"basePath": "/api",
|
||||
"paths": {
|
||||
"/api/local/getalluser": {
|
||||
"get": {
|
||||
"description": "Retrieves all users from the database",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"users"
|
||||
],
|
||||
"summary": "Get all users",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of users",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/user.User"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Database connection failed",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/local/getuser/{id}": {
|
||||
"get": {
|
||||
"description": "Retrieves a user by their ID",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"users"
|
||||
],
|
||||
"summary": "Get user by ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "User ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "User data",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/user.User"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/localinsertuser": {
|
||||
"post": {
|
||||
"description": "Adds a new user to the database",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"users"
|
||||
],
|
||||
"summary": "Insert a new user",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "User Data",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/user.ReqInsertUser"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successfully Inserted User",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Database connection failed",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/retribusi/deleteretribusi/{ID}": {
|
||||
"delete": {
|
||||
"description": "Remove retribution data by id",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Retribusi"
|
||||
],
|
||||
"summary": "Delete retribution",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "ID",
|
||||
"name": "ID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Data Berhasil dihapus",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/retribusi/getData/Limit/{limit}/Offset/{offset}": {
|
||||
"get": {
|
||||
"description": "return list of all retribution from the database",
|
||||
"tags": [
|
||||
"Retribusi"
|
||||
],
|
||||
"summary": "all retribution",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "limit",
|
||||
"name": "limit",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "offset",
|
||||
"name": "offset",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/satu_data.Retribusi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/retribusi/insertretribusi": {
|
||||
"post": {
|
||||
"description": "Save retribution data in DB",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Retribusi"
|
||||
],
|
||||
"summary": "Create retribution",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "data Retribusi",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/satu_data.Retribusi"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Data Berhasil disimpan",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/retribusi/searchData/{kelompok_obyek}": {
|
||||
"get": {
|
||||
"description": "search retribution data by id",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Retribusi"
|
||||
],
|
||||
"summary": "Search retribution",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Kelompok_obyek",
|
||||
"name": "Kelompok_obyek",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/satu_data.Retribusi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/retribusi/updateretribusi": {
|
||||
"put": {
|
||||
"description": "Change retribution data in DB",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Retribusi"
|
||||
],
|
||||
"summary": "Update retribution",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "data Retribusi",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/satu_data.Retribusi"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Data Berhasil Diubah",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users": {
|
||||
"put": {
|
||||
"description": "Updates user information",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"users"
|
||||
],
|
||||
"summary": "Update a user",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "User Data",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/user.User"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successfully Updated User",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Database connection failed",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"satu_data.Retribusi": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Dinas": {
|
||||
"type": "string"
|
||||
},
|
||||
"Jenis": {
|
||||
"type": "string"
|
||||
},
|
||||
"Kelompok_obyek": {
|
||||
"type": "string"
|
||||
},
|
||||
"Kode_tarif": {
|
||||
"type": "string"
|
||||
},
|
||||
"Pelayanan": {
|
||||
"type": "string"
|
||||
},
|
||||
"Rekening_denda": {
|
||||
"type": "string"
|
||||
},
|
||||
"Rekening_pokok": {
|
||||
"type": "string"
|
||||
},
|
||||
"Satuan": {
|
||||
"type": "string"
|
||||
},
|
||||
"Satuan_overtime": {
|
||||
"type": "string"
|
||||
},
|
||||
"Tarif": {
|
||||
"type": "string"
|
||||
},
|
||||
"Tarif_overtime": {
|
||||
"type": "string"
|
||||
},
|
||||
"Uraian_1": {
|
||||
"type": "string"
|
||||
},
|
||||
"Uraian_2": {
|
||||
"type": "string"
|
||||
},
|
||||
"Uraian_3": {
|
||||
"type": "string"
|
||||
},
|
||||
"date_created": {
|
||||
"type": "string"
|
||||
},
|
||||
"date_updated": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"sort": {
|
||||
"type": "integer"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_created": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_updated": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"user.ReqInsertUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {
|
||||
"type": "string"
|
||||
},
|
||||
"age": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gender": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"religion": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"user.User": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {
|
||||
"type": "string"
|
||||
},
|
||||
"age": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gender": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"religion": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
316
cmd/api/docs/swagger.yaml
Normal file
316
cmd/api/docs/swagger.yaml
Normal file
@@ -0,0 +1,316 @@
|
||||
basePath: /api
|
||||
definitions:
|
||||
satu_data.Retribusi:
|
||||
properties:
|
||||
Dinas:
|
||||
type: string
|
||||
Jenis:
|
||||
type: string
|
||||
Kelompok_obyek:
|
||||
type: string
|
||||
Kode_tarif:
|
||||
type: string
|
||||
Pelayanan:
|
||||
type: string
|
||||
Rekening_denda:
|
||||
type: string
|
||||
Rekening_pokok:
|
||||
type: string
|
||||
Satuan:
|
||||
type: string
|
||||
Satuan_overtime:
|
||||
type: string
|
||||
Tarif:
|
||||
type: string
|
||||
Tarif_overtime:
|
||||
type: string
|
||||
Uraian_1:
|
||||
type: string
|
||||
Uraian_2:
|
||||
type: string
|
||||
Uraian_3:
|
||||
type: string
|
||||
date_created:
|
||||
type: string
|
||||
date_updated:
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
sort:
|
||||
type: integer
|
||||
status:
|
||||
type: string
|
||||
user_created:
|
||||
type: string
|
||||
user_updated:
|
||||
type: string
|
||||
type: object
|
||||
user.ReqInsertUser:
|
||||
properties:
|
||||
address:
|
||||
type: string
|
||||
age:
|
||||
type: integer
|
||||
gender:
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
religion:
|
||||
type: string
|
||||
type: object
|
||||
user.User:
|
||||
properties:
|
||||
address:
|
||||
type: string
|
||||
age:
|
||||
type: integer
|
||||
gender:
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
religion:
|
||||
type: string
|
||||
type: object
|
||||
host: 10.10.150.181:8084
|
||||
info:
|
||||
contact:
|
||||
email: sntshkmr60@gmail.com
|
||||
name: Santosh Kumar
|
||||
url: https://twitter.com/sntshk
|
||||
description: A Tag service API in Go using Gin framework
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
termsOfService: https://tos.santoshk.dev
|
||||
title: Tag Service API0
|
||||
version: "1.0"
|
||||
paths:
|
||||
/api/local/getalluser:
|
||||
get:
|
||||
description: Retrieves all users from the database
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: List of users
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/user.User'
|
||||
type: array
|
||||
"500":
|
||||
description: Database connection failed
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Get all users
|
||||
tags:
|
||||
- users
|
||||
/api/local/getuser/{id}:
|
||||
get:
|
||||
description: Retrieves a user by their ID
|
||||
parameters:
|
||||
- description: User ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: User data
|
||||
schema:
|
||||
$ref: '#/definitions/user.User'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Get user by ID
|
||||
tags:
|
||||
- users
|
||||
/api/localinsertuser:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Adds a new user to the database
|
||||
parameters:
|
||||
- description: User Data
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/user.ReqInsertUser'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Successfully Inserted User
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"500":
|
||||
description: Database connection failed
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Insert a new user
|
||||
tags:
|
||||
- users
|
||||
/retribusi/deleteretribusi/{ID}:
|
||||
delete:
|
||||
description: Remove retribution data by id
|
||||
parameters:
|
||||
- description: ID
|
||||
in: path
|
||||
name: ID
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Data Berhasil dihapus
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Delete retribution
|
||||
tags:
|
||||
- Retribusi
|
||||
/retribusi/getData/Limit/{limit}/Offset/{offset}:
|
||||
get:
|
||||
description: return list of all retribution from the database
|
||||
parameters:
|
||||
- description: limit
|
||||
in: path
|
||||
name: limit
|
||||
required: true
|
||||
type: string
|
||||
- description: offset
|
||||
in: path
|
||||
name: offset
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/satu_data.Retribusi'
|
||||
summary: all retribution
|
||||
tags:
|
||||
- Retribusi
|
||||
/retribusi/insertretribusi:
|
||||
post:
|
||||
description: Save retribution data in DB
|
||||
parameters:
|
||||
- description: data Retribusi
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/satu_data.Retribusi'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Data Berhasil disimpan
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Create retribution
|
||||
tags:
|
||||
- Retribusi
|
||||
/retribusi/searchData/{kelompok_obyek}:
|
||||
get:
|
||||
description: search retribution data by id
|
||||
parameters:
|
||||
- description: Kelompok_obyek
|
||||
in: path
|
||||
name: Kelompok_obyek
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/satu_data.Retribusi'
|
||||
summary: Search retribution
|
||||
tags:
|
||||
- Retribusi
|
||||
/retribusi/updateretribusi:
|
||||
put:
|
||||
description: Change retribution data in DB
|
||||
parameters:
|
||||
- description: data Retribusi
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/satu_data.Retribusi'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Data Berhasil Diubah
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Update retribution
|
||||
tags:
|
||||
- Retribusi
|
||||
/users:
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Updates user information
|
||||
parameters:
|
||||
- description: User Data
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/user.User'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Successfully Updated User
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"500":
|
||||
description: Database connection failed
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Update a user
|
||||
tags:
|
||||
- users
|
||||
swagger: "2.0"
|
||||
@@ -7,9 +7,12 @@ import (
|
||||
"net/http"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
//_ "template_blueprint/docs"
|
||||
_ "template_blueprint/cmd/api/docs"
|
||||
//_ "template_blueprint/internal/docs"
|
||||
"template_blueprint/internal/server"
|
||||
"time"
|
||||
)
|
||||
|
||||
func gracefulShutdown(apiServer *http.Server, done chan bool) {
|
||||
@@ -36,8 +39,28 @@ func gracefulShutdown(apiServer *http.Server, done chan bool) {
|
||||
done <- true
|
||||
}
|
||||
|
||||
func main() {
|
||||
// @title Tag Service API0
|
||||
// @version 1.0
|
||||
// @description A Tag service API in Go using Gin framework
|
||||
// @termsOfService https://tos.santoshk.dev
|
||||
|
||||
// @contact.name Santosh Kumar
|
||||
// @contact.url https://twitter.com/sntshk
|
||||
// @contact.email sntshkmr60@gmail.com
|
||||
|
||||
// @license.name Apache 2.0
|
||||
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
// @host 10.10.150.181:8084
|
||||
// @BasePath /api
|
||||
|
||||
func main() {
|
||||
//docs.SwaggerInfo.Title = "Swagger Example API"
|
||||
//docs.SwaggerInfo.Description = "This is a sample server Petstore server."
|
||||
//docs.SwaggerInfo.Version = "1.0"
|
||||
//docs.SwaggerInfo.Host = "petstore.swagger.io"
|
||||
//docs.SwaggerInfo.BasePath = "/v2"
|
||||
//docs.SwaggerInfo.Schemes = []string{"http", "https"}
|
||||
server := server.NewServer()
|
||||
|
||||
// Create a done channel to signal when the shutdown is complete
|
||||
|
||||
@@ -1,21 +1 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func HelloWebHandler(w http.ResponseWriter, r *http.Request) {
|
||||
err := r.ParseForm()
|
||||
if err != nil {
|
||||
http.Error(w, "Bad Request", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
name := r.FormValue("name")
|
||||
component := HelloPost(name)
|
||||
err = component.Render(r.Context(), w)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
log.Fatalf("Error rendering in HelloWebHandler: %e", err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,14 +3,40 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: api-template
|
||||
restart: always
|
||||
ports:
|
||||
- 8803:8803
|
||||
- 8084:8084
|
||||
volumes:
|
||||
- .:/app
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
environment:
|
||||
TZ: Asia/Jakarta
|
||||
MONGODB_DEV_HOST: 10.10.123.206
|
||||
MONGODB_DEV_PORT: 27017
|
||||
MONGODB_DEV_USER: admin
|
||||
MONGODB_DEV_PASS: stim*rs54
|
||||
MONGODB_DEV_MASTER: master
|
||||
MONGODB_DEV_LOCAL: local
|
||||
# TIMEZONE
|
||||
- TZ=Asia/Jakarta
|
||||
# DATABASE SIMRS V3.0
|
||||
- SIMRS_STAG_HOST=10.10.123.223
|
||||
- SIMRS_STAG_PORT=5432
|
||||
- SIMRS_STAG_NAME=simrs-stag
|
||||
- SIMRS_STAG_USER=simtest
|
||||
- SIMRS_STAG_PASS=12345
|
||||
# DATABASE SATU DATA
|
||||
- SATUDATA_HOST=10.10.123.165
|
||||
- SATUDATA_USER=stim
|
||||
- SATUDATA_PASS=stim*RS54
|
||||
- SATUDATA_NAME=satu_db
|
||||
- SATUDATA_PORT=5000
|
||||
# MONGODB DEV
|
||||
- MONGODB_DEV_HOST=10.10.123.206
|
||||
- MONGODB_DEV_PORT=27017
|
||||
- MONGODB_DEV_USER=admin
|
||||
- MONGODB_DEV_PASS=stim*rs54
|
||||
- MONGODB_DEV_MASTER=master
|
||||
- MONGODB_DEV_LOCAL=local
|
||||
# DATABASE ANTREAN
|
||||
- POSTGRES_ANTREAN_USERNAME=stim_read
|
||||
- POSTGRES_ANTREAN_PASSWORD=itikom123
|
||||
- POSTGRES_ANTREAN_HOST=10.10.123.198
|
||||
- POSTGRES_ANTREAN_DATABASE=db_antrean
|
||||
- POSTGRES_ANTREAN_PORT=5100
|
||||
- POSTGRES_ANTREAN_SSLMODE=disable
|
||||
58
go.mod
58
go.mod
@@ -3,15 +3,14 @@ module template_blueprint
|
||||
go 1.23.1
|
||||
|
||||
require (
|
||||
github.com/a-h/templ v0.3.833
|
||||
github.com/coder/websocket v1.8.12
|
||||
github.com/gin-contrib/cors v1.7.4
|
||||
github.com/gin-gonic/gin v1.10.0
|
||||
github.com/gin-gonic/gin v1.10.1
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/jackc/pgx/v5 v5.7.5
|
||||
github.com/joho/godotenv v1.5.1
|
||||
github.com/testcontainers/testcontainers-go/modules/mongodb v0.35.0
|
||||
go.mongodb.org/mongo-driver v1.17.3
|
||||
go.mongodb.org/mongo-driver v1.17.4
|
||||
gorm.io/driver/postgres v1.6.0
|
||||
gorm.io/gorm v1.30.1
|
||||
)
|
||||
@@ -19,43 +18,54 @@ require (
|
||||
require (
|
||||
dario.cat/mergo v1.0.0 // indirect
|
||||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
|
||||
github.com/KyleBanks/depth v1.2.1 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.2 // indirect
|
||||
github.com/bytedance/sonic v1.12.10 // indirect
|
||||
github.com/bytedance/sonic/loader v0.2.3 // indirect
|
||||
github.com/PuerkitoBio/purell v1.2.1 // indirect
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||
github.com/bytedance/sonic v1.14.0 // indirect
|
||||
github.com/bytedance/sonic/loader v0.3.0 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||
github.com/cloudwego/base64x v0.1.5 // indirect
|
||||
github.com/containerd/containerd v1.7.18 // indirect
|
||||
github.com/containerd/log v0.1.0 // indirect
|
||||
github.com/containerd/platforms v0.2.1 // indirect
|
||||
github.com/cpuguy83/dockercfg v0.3.2 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/distribution/reference v0.6.0 // indirect
|
||||
github.com/docker/docker v27.1.1+incompatible // indirect
|
||||
github.com/docker/go-connections v0.5.0 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
|
||||
github.com/gin-contrib/sse v1.0.0 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
|
||||
github.com/gin-contrib/sse v1.1.0 // indirect
|
||||
github.com/go-logr/logr v1.4.1 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.21.1 // indirect
|
||||
github.com/go-openapi/jsonreference v0.21.0 // indirect
|
||||
github.com/go-openapi/spec v0.21.0 // indirect
|
||||
github.com/go-openapi/swag v0.23.1 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.25.0 // indirect
|
||||
github.com/go-playground/validator/v10 v10.27.0 // indirect
|
||||
github.com/goccy/go-json v0.10.5 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/golang/snappy v1.0.0 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
|
||||
github.com/jackc/puddle/v2 v2.2.2 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/compress v1.17.4 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
|
||||
github.com/klauspost/compress v1.18.0 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
||||
github.com/kr/pretty v0.3.1 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
|
||||
github.com/magiconair/properties v1.8.7 // indirect
|
||||
github.com/mailru/easyjson v0.9.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/moby/docker-image-spec v1.3.1 // indirect
|
||||
github.com/moby/patternmatcher v0.6.0 // indirect
|
||||
@@ -68,34 +78,46 @@ require (
|
||||
github.com/morikuni/aec v1.0.0 // indirect
|
||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||
github.com/opencontainers/image-spec v1.1.0 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
|
||||
github.com/rogpeppe/go-internal v1.11.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/shirou/gopsutil/v3 v3.23.12 // indirect
|
||||
github.com/shoenig/go-m1cpu v0.1.6 // indirect
|
||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||
github.com/stretchr/testify v1.10.0 // indirect
|
||||
github.com/swaggo/files v1.0.1 // indirect
|
||||
github.com/swaggo/gin-swagger v1.6.0 // indirect
|
||||
github.com/swaggo/swag v1.16.6 // indirect
|
||||
github.com/testcontainers/testcontainers-go v0.35.0 // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.12 // indirect
|
||||
github.com/tklauser/numcpus v0.6.1 // indirect
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
github.com/ugorji/go/codec v1.2.12 // indirect
|
||||
github.com/ugorji/go/codec v1.3.0 // indirect
|
||||
github.com/urfave/cli/v2 v2.27.7 // indirect
|
||||
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
|
||||
github.com/xdg-go/scram v1.1.2 // indirect
|
||||
github.com/xdg-go/stringprep v1.0.4 // indirect
|
||||
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 // indirect
|
||||
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
|
||||
github.com/yusufpapurcu/wmi v1.2.3 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
|
||||
go.opentelemetry.io/otel v1.24.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.24.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.24.0 // indirect
|
||||
golang.org/x/arch v0.15.0 // indirect
|
||||
golang.org/x/crypto v0.37.0 // indirect
|
||||
golang.org/x/net v0.37.0 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.2 // indirect
|
||||
golang.org/x/arch v0.19.0 // indirect
|
||||
golang.org/x/crypto v0.40.0 // indirect
|
||||
golang.org/x/mod v0.26.0 // indirect
|
||||
golang.org/x/net v0.42.0 // indirect
|
||||
golang.org/x/sync v0.16.0 // indirect
|
||||
golang.org/x/sys v0.32.0 // indirect
|
||||
golang.org/x/sys v0.34.0 // indirect
|
||||
golang.org/x/text v0.27.0 // indirect
|
||||
google.golang.org/protobuf v1.36.5 // indirect
|
||||
golang.org/x/tools v0.35.0 // indirect
|
||||
google.golang.org/protobuf v1.36.6 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
sigs.k8s.io/yaml v1.6.0 // indirect
|
||||
)
|
||||
|
||||
143
go.sum
143
go.sum
@@ -4,15 +4,19 @@ github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
|
||||
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
|
||||
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
|
||||
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
||||
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
||||
github.com/a-h/templ v0.3.833 h1:L/KOk/0VvVTBegtE0fp2RJQiBm7/52Zxv5fqlEHiQUU=
|
||||
github.com/a-h/templ v0.3.833/go.mod h1:cAu4AiZhtJfBjMY0HASlyzvkrtjnHWPeEsyGK2YYmfk=
|
||||
github.com/bytedance/sonic v1.12.10 h1:uVCQr6oS5669E9ZVW0HyksTLfNS7Q/9hV6IVS4nEMsI=
|
||||
github.com/bytedance/sonic v1.12.10/go.mod h1:uVvFidNmlt9+wa31S1urfwwthTWteBgG0hWuoKAXTx8=
|
||||
github.com/PuerkitoBio/purell v1.2.1 h1:QsZ4TjvwiMpat6gBCBxEQI0rcS9ehtkKtSpiUnd9N28=
|
||||
github.com/PuerkitoBio/purell v1.2.1/go.mod h1:ZwHcC/82TOaovDi//J/804umJFFmbOHPngi8iYYv/Eo=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ=
|
||||
github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA=
|
||||
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
|
||||
github.com/bytedance/sonic/loader v0.2.3 h1:yctD0Q3v2NOGfSWPLPvG2ggA2kV6TS6s4wioyEqssH0=
|
||||
github.com/bytedance/sonic/loader v0.2.3/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=
|
||||
github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA=
|
||||
github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4=
|
||||
@@ -28,6 +32,9 @@ github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpS
|
||||
github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw=
|
||||
github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA=
|
||||
github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
|
||||
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@@ -43,14 +50,14 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4
|
||||
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/gabriel-vasile/mimetype v1.4.8 h1:FfZ3gj38NjllZIeJAmMhr+qKL8Wu+nOoI3GqacKw1NM=
|
||||
github.com/gabriel-vasile/mimetype v1.4.8/go.mod h1:ByKUIKGjh1ODkGM1asKUbQZOLGrPjydw3hYPU2YU9t8=
|
||||
github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY=
|
||||
github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok=
|
||||
github.com/gin-contrib/cors v1.7.4 h1:/fC6/wk7rCRtqKqki8lLr2Xq+hnV49aXDLIuSek9g4k=
|
||||
github.com/gin-contrib/cors v1.7.4/go.mod h1:vGc/APSgLMlQfEJV5NAzkrAHb0C8DetL3K6QZuvGii0=
|
||||
github.com/gin-contrib/sse v1.0.0 h1:y3bT1mUWUxDpW4JLQg/HnTqV4rozuW4tC9eFKTxYI9E=
|
||||
github.com/gin-contrib/sse v1.0.0/go.mod h1:zNuFdwarAygJBht0NTKiSi3jRf6RbqeILZ9Sp6Slhe0=
|
||||
github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=
|
||||
github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
|
||||
github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w=
|
||||
github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM=
|
||||
github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ=
|
||||
github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
|
||||
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
@@ -58,24 +65,33 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/go-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic=
|
||||
github.com/go-openapi/jsonpointer v0.21.1/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk=
|
||||
github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ=
|
||||
github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4=
|
||||
github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY=
|
||||
github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk=
|
||||
github.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZU=
|
||||
github.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||
github.com/go-playground/validator/v10 v10.25.0 h1:5Dh7cjvzR7BRZadnsVOzPhWsrwUr0nmsZJxEAnFLNO8=
|
||||
github.com/go-playground/validator/v10 v10.25.0/go.mod h1:GGzBIJMuE98Ic/kJsBXbz1x/7cByt++cQ+YOuDM5wus=
|
||||
github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4=
|
||||
github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo=
|
||||
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
|
||||
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs=
|
||||
github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
@@ -95,18 +111,20 @@ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4=
|
||||
github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
|
||||
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
|
||||
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
|
||||
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
|
||||
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
||||
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
|
||||
@@ -115,6 +133,8 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ
|
||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
||||
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
|
||||
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
||||
github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4=
|
||||
github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
|
||||
@@ -140,22 +160,30 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
|
||||
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
||||
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
|
||||
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
|
||||
github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
|
||||
github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
|
||||
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
|
||||
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
||||
github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
|
||||
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
|
||||
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
|
||||
github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww=
|
||||
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4=
|
||||
github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM=
|
||||
github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=
|
||||
github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ=
|
||||
github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU=
|
||||
github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
@@ -171,6 +199,12 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE=
|
||||
github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg=
|
||||
github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+zy8M=
|
||||
github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo=
|
||||
github.com/swaggo/swag v1.16.6 h1:qBNcx53ZaX+M5dxVyTrgQ0PJ/ACK+NzhwcbieTt+9yI=
|
||||
github.com/swaggo/swag v1.16.6/go.mod h1:ngP2etMK5a0P3QBizic5MEwpRmluJZPHjXcMoj4Xesg=
|
||||
github.com/testcontainers/testcontainers-go v0.35.0 h1:uADsZpTKFAtp8SLK+hMwSaa+X+JiERHtd4sQAFmXeMo=
|
||||
github.com/testcontainers/testcontainers-go v0.35.0/go.mod h1:oEVBj5zrfJTrgjwONs1SsRbnBtH9OKl+IGl3UMcr2B4=
|
||||
github.com/testcontainers/testcontainers-go/modules/mongodb v0.35.0 h1:i1Kh9fmXgHG9z3uzJv5Arz7pDKVaaNpLrqyd+0xhYMA=
|
||||
@@ -181,14 +215,19 @@ github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+F
|
||||
github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||
github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
|
||||
github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||
github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA=
|
||||
github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4=
|
||||
github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8=
|
||||
github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU=
|
||||
github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4=
|
||||
github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
|
||||
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
|
||||
github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY=
|
||||
github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4=
|
||||
github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8=
|
||||
github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=
|
||||
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 h1:FnBeRrxr7OU4VvAzt5X7s6266i6cSVkkFPS0TuXWbIg=
|
||||
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
|
||||
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM=
|
||||
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
@@ -196,8 +235,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
|
||||
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||
go.mongodb.org/mongo-driver v1.17.3 h1:TQyXhnsWfWtgAhMtOgtYHMTkZIfBTpMTsMnd9ZBeHxQ=
|
||||
go.mongodb.org/mongo-driver v1.17.3/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ=
|
||||
go.mongodb.org/mongo-driver v1.17.4 h1:jUorfmVzljjr0FLzYQsGP8cgN/qzzxlY9Vh0C9KFXVw=
|
||||
go.mongodb.org/mongo-driver v1.17.4/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw=
|
||||
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
|
||||
@@ -214,31 +253,34 @@ go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y
|
||||
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
|
||||
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
|
||||
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
|
||||
golang.org/x/arch v0.15.0 h1:QtOrQd0bTUnhNVNndMpLHNWrDmYzZ2KDqSrEymqInZw=
|
||||
golang.org/x/arch v0.15.0/go.mod h1:JmwW7aLIoRUKgaTzhkiEFxvcEiQGyOg9BMonBJUS7EE=
|
||||
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
|
||||
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
|
||||
golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU=
|
||||
golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE=
|
||||
golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc=
|
||||
golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
|
||||
golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg=
|
||||
golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c=
|
||||
golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
|
||||
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610=
|
||||
golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
|
||||
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -252,22 +294,23 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20=
|
||||
golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
|
||||
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o=
|
||||
golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg=
|
||||
golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0=
|
||||
golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
|
||||
golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
|
||||
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44=
|
||||
@@ -277,6 +320,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0=
|
||||
golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@@ -288,11 +333,13 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
|
||||
google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA=
|
||||
google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0=
|
||||
google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
|
||||
google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
||||
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
|
||||
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
@@ -303,3 +350,5 @@ gorm.io/gorm v1.30.1/go.mod h1:8Z33v652h4//uMA76KjeDH8mJXPm1QNCYrMeatR0DOE=
|
||||
gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=
|
||||
gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=
|
||||
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
|
||||
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
|
||||
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=
|
||||
|
||||
@@ -39,11 +39,17 @@ var (
|
||||
dbNameSimrs = os.Getenv("SIMRS_STAG_NAME")
|
||||
portSimrs = os.Getenv("SIMRS_STAG_PORT")
|
||||
|
||||
hostSatudata = os.Getenv("SATUDATA_HOST")
|
||||
userNameSatudata = os.Getenv("SATUDATA_USER")
|
||||
passwordSatudata = os.Getenv("SATUDATA_PASS")
|
||||
dbNameSatudata = os.Getenv("SATUDATA_NAME")
|
||||
portSatudata = os.Getenv("SATUDATA_PORT")
|
||||
//hostSatudata = os.Getenv("SATUDATA_HOST")
|
||||
//userNameSatudata = os.Getenv("SATUDATA_USER")
|
||||
//passwordSatudata = os.Getenv("SATUDATA_PASS")
|
||||
//dbNameSatudata = os.Getenv("SATUDATA_NAME")
|
||||
//portSatudata = os.Getenv("SATUDATA_PORT")
|
||||
|
||||
hostAntrean = os.Getenv("POSTGRES_ANTREAN_HOST")
|
||||
userNameAntrean = os.Getenv("POSTGRES_ANTREAN_USERNAME")
|
||||
passwordAntrean = os.Getenv("POSTGRES_ANTREAN_PASSWORD")
|
||||
dbNameAntrean = os.Getenv("POSTGRES_ANTREAN_DATABASE")
|
||||
portAntrean = os.Getenv("POSTGRES_ANTREAN_PORT")
|
||||
|
||||
hostMongo = os.Getenv("MONGODB_DEV_HOST")
|
||||
portMongo = os.Getenv("MONGODB_DEV_PORT")
|
||||
@@ -86,9 +92,9 @@ func New(database ...string) Service {
|
||||
} else {
|
||||
log.Println("Successfully connected to the database")
|
||||
}
|
||||
satudata := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%s sslmode=disable TimeZone=Asia/Jakarta", hostSatudata, userNameSatudata, passwordSatudata, dbNameSatudata, portSatudata)
|
||||
Antrean := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%s sslmode=disable TimeZone=Asia/Jakarta", hostAntrean, userNameAntrean, passwordAntrean, dbNameAntrean, portAntrean)
|
||||
|
||||
SatudataDB, err := gorm.Open(postgres.Open(satudata), &gorm.Config{})
|
||||
AntreanDB, err := gorm.Open(postgres.Open(Antrean), &gorm.Config{})
|
||||
if err != nil {
|
||||
log.Fatal("Failed to connect to SIM database: ", err)
|
||||
} else {
|
||||
@@ -127,7 +133,7 @@ func New(database ...string) Service {
|
||||
log.Println("Successfully connected to MongoDB!")
|
||||
dbInstance = &service{
|
||||
simrsDB: SimrsDB,
|
||||
satuDataDB: SatudataDB,
|
||||
satuDataDB: AntreanDB,
|
||||
mongoDB: client.Database(mongoDBName),
|
||||
}
|
||||
return dbInstance
|
||||
@@ -216,7 +222,7 @@ func (s *service) Close() error {
|
||||
func (s *service) GetDB(database string) *gorm.DB {
|
||||
if strings.ToLower(database) == "simrs" {
|
||||
return s.simrsDB
|
||||
} else if strings.ToLower(database) == "satudata" {
|
||||
} else if strings.ToLower(database) == "antrean" {
|
||||
return s.satuDataDB
|
||||
}
|
||||
log.Println("Database tidak ditemukan")
|
||||
|
||||
55
internal/middleware/error_handler.go
Normal file
55
internal/middleware/error_handler.go
Normal file
@@ -0,0 +1,55 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"template_blueprint/pkg/models"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// ErrorHandler handles errors globally
|
||||
func ErrorHandler() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
c.Next()
|
||||
|
||||
if len(c.Errors) > 0 {
|
||||
err := c.Errors.Last()
|
||||
status := http.StatusInternalServerError
|
||||
|
||||
// Determine status code based on error type
|
||||
switch err.Type {
|
||||
case gin.ErrorTypeBind:
|
||||
status = http.StatusBadRequest
|
||||
case gin.ErrorTypeRender:
|
||||
status = http.StatusUnprocessableEntity
|
||||
case gin.ErrorTypePrivate:
|
||||
status = http.StatusInternalServerError
|
||||
}
|
||||
|
||||
response := models.ErrorResponse{
|
||||
Error: "internal_error",
|
||||
Message: err.Error(),
|
||||
Code: status,
|
||||
}
|
||||
|
||||
c.JSON(status, response)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// CORS middleware configuration
|
||||
func CORSConfig() gin.HandlerFunc {
|
||||
return gin.HandlerFunc(func(c *gin.Context) {
|
||||
c.Header("Access-Control-Allow-Origin", "*")
|
||||
c.Header("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS, PATCH")
|
||||
c.Header("Access-Control-Allow-Headers", "Origin, Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization")
|
||||
|
||||
if c.Request.Method == "OPTIONS" {
|
||||
c.AbortWithStatus(204)
|
||||
return
|
||||
}
|
||||
|
||||
c.Next()
|
||||
})
|
||||
}
|
||||
@@ -5,25 +5,36 @@ import (
|
||||
"github.com/coder/websocket"
|
||||
"github.com/gin-contrib/cors"
|
||||
"github.com/gin-gonic/gin"
|
||||
swaggerFiles "github.com/swaggo/files"
|
||||
ginSwagger "github.com/swaggo/gin-swagger"
|
||||
AntreanHandler "template_blueprint/pkg/handlers/antrean"
|
||||
patientHandler "template_blueprint/pkg/handlers/patient"
|
||||
datapoliklinikHandler "template_blueprint/pkg/handlers/poliklinik"
|
||||
dataRetribusi "template_blueprint/pkg/handlers/retribusi"
|
||||
|
||||
//_ "template_blueprint/docs"
|
||||
//swaggerFiles "github.com/swaggo/files"
|
||||
//ginSwagger "github.com/swaggo/gin-swagger"
|
||||
"io/fs"
|
||||
"log"
|
||||
"net/http"
|
||||
//_ "template_blueprint/cmd/api/docs"
|
||||
"template_blueprint/cmd/web"
|
||||
patientHandler "template_blueprint/pkg/handlers/patient"
|
||||
datapoliklinikHandler "template_blueprint/pkg/handlers/poliklinik"
|
||||
|
||||
"time"
|
||||
)
|
||||
|
||||
func (s *Server) RegisterRoutes() http.Handler {
|
||||
r := gin.Default()
|
||||
|
||||
r.Use(cors.New(cors.Config{
|
||||
AllowOrigins: []string{"*"}, // or specific domains like "http://example.com"
|
||||
AllowMethods: []string{"GET", "POST", "PUT", "DELETE"},
|
||||
AllowHeaders: []string{"Origin", "Content-Type"},
|
||||
AllowCredentials: true,
|
||||
}))
|
||||
|
||||
//r.Use(middleware.CORSConfig())
|
||||
//r.Use(middleware.ErrorHandler())
|
||||
//r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
||||
r.GET("/", s.HelloWorldHandler)
|
||||
|
||||
r.GET("/websocket", s.websocketHandler)
|
||||
@@ -31,11 +42,8 @@ func (s *Server) RegisterRoutes() http.Handler {
|
||||
staticFiles, _ := fs.Sub(web.Files, "assets")
|
||||
r.StaticFS("/assets", http.FS(staticFiles))
|
||||
|
||||
r.POST("/hello", func(c *gin.Context) {
|
||||
web.HelloWebHandler(c.Writer, c.Request)
|
||||
})
|
||||
|
||||
v1 := r.Group("/api")
|
||||
|
||||
patient := v1.Group("/patient")
|
||||
{
|
||||
patient.POST("/insertpatient", patientHandler.InsertPatient)
|
||||
@@ -46,13 +54,39 @@ func (s *Server) RegisterRoutes() http.Handler {
|
||||
{
|
||||
Poliklinik.GET("/getdata/statuspelayanan/:statuspelayanan", datapoliklinikHandler.GetDataPoliklinik)
|
||||
}
|
||||
Antrean := v1.Group("/kios")
|
||||
{
|
||||
Antrean.POST("/detail", AntreanHandler.GetKios)
|
||||
Antrean.POST("/insert", AntreanHandler.InsertKios)
|
||||
Antrean.PUT("/update/:id", AntreanHandler.UpdateKios)
|
||||
Antrean.DELETE("/delete/:id", AntreanHandler.DeleteKios)
|
||||
}
|
||||
retribusi := v1.Group("/retribusi")
|
||||
{
|
||||
retribusi.GET("/getData/Limit/:limit/Offset/:offset", dataRetribusi.GetDataRetribusi)
|
||||
retribusi.POST("/insertretribusi", dataRetribusi.InsertRetribution)
|
||||
retribusi.PUT("/updateretribusi", dataRetribusi.UpdateRetribution)
|
||||
retribusi.DELETE("/deleteretribusi/:id", dataRetribusi.DeleteDataRetribusi)
|
||||
retribusi.GET("/searchData/:kelompok_obyek", dataRetribusi.SearchDataRetribusi)
|
||||
}
|
||||
//add swagger
|
||||
//url := ginSwagger.URL("http://localhost:8084/swagger/doc.json")
|
||||
//r.GET("/docs/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
||||
|
||||
//r.GET("/swagger/*any", func(c *gin.Context) {
|
||||
// if c.Request.RequestURI == "/swagger/" {
|
||||
// c.Redirect(302, "/swagger/index.html")
|
||||
// return
|
||||
// }
|
||||
// ginSwagger.WrapHandler(swaggerFiles.Handler, ginSwagger.URL("http://localhost:8084/swagger/doc.json"))(c)
|
||||
//})
|
||||
r.GET("/docs/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
||||
return r
|
||||
}
|
||||
|
||||
func (s *Server) HelloWorldHandler(c *gin.Context) {
|
||||
resp := make(map[string]string)
|
||||
resp["message"] = "Hello World"
|
||||
resp["message"] = "Hello World 2"
|
||||
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
134
pkg/database/satu_data/antrean.go
Normal file
134
pkg/database/satu_data/antrean.go
Normal file
@@ -0,0 +1,134 @@
|
||||
package satu_data
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"log"
|
||||
"template_blueprint/pkg/models/antrean"
|
||||
)
|
||||
|
||||
func (s *DatabaseService) GetKios(ID int) ([]*antrean.Antrean, error) {
|
||||
var result []*antrean.Antrean
|
||||
query := `SELECT k."id", k."name" ,k.active ,k.icon , k.url , k.fk_ref_healthcare_type_id , r."name" as refnamehealth, k.fk_ref_service_type_id ,
|
||||
rpt."name" as refnamepayment , k.fk_sd_location_id ,k.ds_sd_location
|
||||
FROM master.ms_kiosk k
|
||||
JOIN master.ms_kiosk_healthcare_service h ON k.fk_ref_healthcare_type_id = h.id
|
||||
JOIN reference.ref_healthcare_type r ON h.fk_ms_healthcare_service_id = r.id
|
||||
left join master.ms_kiosk_payment_type p on k.fk_ref_service_type_id = p.id
|
||||
left join reference.ref_payment_type rpt on p.fk_ref_payment_type_id = rpt.id
|
||||
where k.id = ?`
|
||||
errQuery := s.DB.Debug().Raw(query, ID).Scan(&result).Error
|
||||
if errQuery != nil {
|
||||
log.Println("errQuery:", errQuery)
|
||||
return nil, errQuery
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (s *DatabaseService) InsertKiosk(data *antrean.KioskData) error {
|
||||
log.Println("InsertKiosk data:", data)
|
||||
|
||||
queryKiosk := `INSERT INTO master.ms_kiosk ("name", active, icon, url, fk_ref_healthcare_type_id,
|
||||
fk_ref_service_type_id, fk_sd_location_id, ds_sd_location)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
||||
RETURNING id`
|
||||
|
||||
var newKioskID int64
|
||||
err := s.DB.Raw(queryKiosk, data.Name, data.Active, data.Icon, data.URL,
|
||||
data.FKRefHealthcareTypeID, data.FKRefServiceTypeID,
|
||||
data.FKSDLocationID, data.DSSDLocation).
|
||||
Scan(&newKioskID).Error
|
||||
|
||||
if err != nil {
|
||||
log.Println("Error insert ms_kiosk:", err)
|
||||
return errors.New("Gagal menyimpan data kiosk")
|
||||
}
|
||||
|
||||
log.Println("New kiosk ID:", newKioskID)
|
||||
|
||||
if data.HealthcareServiceData != nil {
|
||||
queryHealthcare := `INSERT INTO master.ms_kiosk_healthcare_service
|
||||
(fk_ms_kiosk_id, fk_ms_healthcare_service_id)
|
||||
VALUES (?, ?)`
|
||||
|
||||
errHC := s.DB.Exec(queryHealthcare, newKioskID, data.HealthcareServiceData.FKMSHealthcareServiceID).Error
|
||||
if errHC != nil {
|
||||
log.Println("Error insert healthcare service:", errHC)
|
||||
return errors.New("Gagal menyimpan data healthcare service")
|
||||
}
|
||||
}
|
||||
|
||||
if data.PaymentTypeData != nil {
|
||||
queryPayment := `INSERT INTO master.ms_kiosk_payment_type
|
||||
(fk_ms_kiosk_id, fk_ref_payment_type_id)
|
||||
VALUES (?, ?)`
|
||||
|
||||
errPT := s.DB.Exec(queryPayment, newKioskID, data.PaymentTypeData.FKRefPaymentTypeID).Error
|
||||
if errPT != nil {
|
||||
log.Println("Error insert payment type:", errPT)
|
||||
return errors.New("Gagal menyimpan data payment type")
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *DatabaseService) UpdateKiosk(id string, data *antrean.KioskData) error {
|
||||
log.Println("UpdateKiosk ID:", id, "data:", data)
|
||||
|
||||
queryKiosk := `UPDATE master.ms_kiosk
|
||||
SET name = ?, active = ?, icon = ?, url = ?,
|
||||
fk_ref_healthcare_type_id = ?, fk_ref_service_type_id = ?,
|
||||
fk_sd_location_id = ?, ds_sd_location = ?
|
||||
WHERE id = ?`
|
||||
|
||||
err := s.DB.Exec(queryKiosk, data.Name, data.Active, data.Icon, data.URL,
|
||||
data.FKRefHealthcareTypeID, data.FKRefServiceTypeID,
|
||||
data.FKSDLocationID, data.DSSDLocation, id).Error
|
||||
if err != nil {
|
||||
log.Println("Error update ms_kiosk:", err)
|
||||
return errors.New("Gagal update data kiosk")
|
||||
}
|
||||
|
||||
if data.HealthcareServiceData != nil {
|
||||
queryHealthcare := `UPDATE master.ms_kiosk_healthcare_service
|
||||
SET fk_ms_healthcare_service_id = ?
|
||||
WHERE fk_ms_kiosk_id = ?`
|
||||
errHC := s.DB.Exec(queryHealthcare, data.HealthcareServiceData.FKMSHealthcareServiceID, id).Error
|
||||
if errHC != nil {
|
||||
log.Println("Error update healthcare service:", errHC)
|
||||
return errors.New("Gagal update data healthcare service")
|
||||
}
|
||||
}
|
||||
|
||||
if data.PaymentTypeData != nil {
|
||||
queryPayment := `UPDATE master.ms_kiosk_payment_type
|
||||
SET fk_ref_payment_type_id = ?
|
||||
WHERE fk_ms_kiosk_id = ?`
|
||||
errPT := s.DB.Exec(queryPayment, data.PaymentTypeData.FKRefPaymentTypeID, id).Error
|
||||
if errPT != nil {
|
||||
log.Println("Error update payment type:", errPT)
|
||||
return errors.New("Gagal update data payment type")
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *DatabaseService) DeleteKiosk(id int64) error {
|
||||
err := s.DB.Exec(`DELETE FROM master.ms_kiosk_healthcare_service WHERE fk_ms_kiosk_id = ?`, id).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = s.DB.Exec(`DELETE FROM master.ms_kiosk_payment_type WHERE fk_ms_kiosk_id = ?`, id).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = s.DB.Exec(`DELETE FROM master.ms_kiosk WHERE id = ?`, id).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
73
pkg/database/satu_data/retribusi.go
Normal file
73
pkg/database/satu_data/retribusi.go
Normal file
@@ -0,0 +1,73 @@
|
||||
package satu_data
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"log"
|
||||
"template_blueprint/pkg/models/satu_data"
|
||||
)
|
||||
|
||||
func (s *DatabaseService) GetRetribusi(Limit string, Offset string) ([]*satu_data.Retribusi, error) {
|
||||
var result []*satu_data.Retribusi
|
||||
query := `select * from data_retribusi dr limit ? offset ?`
|
||||
errQuery := s.DB.Debug().Raw(query, Limit, Offset).Scan(&result).Error
|
||||
if errQuery != nil {
|
||||
log.Println("errQuery:", errQuery)
|
||||
return nil, errQuery
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (s *DatabaseService) InsertRetribusi(data *satu_data.Retribusi) error {
|
||||
//id := uuid.New()
|
||||
log.Println("ini data:", data)
|
||||
//data.ID = id.String()
|
||||
|
||||
//log.Println("InsertRetribusi:", data)
|
||||
query := `insert into data_retribusi ("id", "status", "sort", "user_created", "date_created", "Jenis", "Pelayanan", "Dinas",
|
||||
"Kelompok_obyek", "Kode_tarif", "Tarif", "Satuan", "Tarif_overtime", "Satuan_overtime",
|
||||
"Rekening_pokok", "Rekening_denda","Uraian_1", "Uraian_2", "Uraian_3")
|
||||
values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)`
|
||||
errQuery := s.DB.Debug().Exec(query, data.ID, data.Status, data.Sort, data.UserCreated, data.DateCreated,
|
||||
data.Jenis, data.Pelayanan, data.Dinas, data.KelompokObyek,
|
||||
data.KodeTarif, data.Tarif, data.Satuan, data.TarifOverTime, data.SatuanOverTime, data.RekeningPokok, data.RekeningDenda,
|
||||
data.Uraian1, data.Uraian2, data.Uraian3).Error
|
||||
if errQuery != nil {
|
||||
log.Println(errQuery)
|
||||
return errors.New("Tidak dapat Simpan data retribusi")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *DatabaseService) UpdateRetribusi(data *satu_data.Retribusi) error {
|
||||
log.Println("update data_retribusi:", data)
|
||||
query := `update data_retribusi set status=?, sort=?, user_updated=?, date_updated=?, "Jenis"=?, "Pelayanan"=?, "Dinas"=?, "Kelompok_obyek"=?, "Kode_tarif"=?, "Tarif"=?, "Satuan"=?, "Tarif_overtime"=?, "Satuan_overtime"=?, "Rekening_pokok"=?, "Rekening_denda"=?, "Uraian_1"=?, "Uraian_2"=?, "Uraian_3"=? where id=?`
|
||||
errQuery := s.DB.Debug().Exec(query, data.Status, data.Sort, data.UserUpdated, data.DateUpdated, data.Jenis, data.Pelayanan, data.Dinas, data.KelompokObyek, data.KodeTarif, data.Tarif, data.Satuan, data.TarifOverTime, data.SatuanOverTime, data.RekeningPokok, data.RekeningDenda, data.Uraian1, data.Uraian2, data.Uraian3, data.ID).Error
|
||||
if errQuery != nil {
|
||||
log.Println(errQuery)
|
||||
return errors.New("Tidak dapat ubah data retribusi")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *DatabaseService) DeleteRetribusi(id string) error {
|
||||
query := `delete from data_retribusi where id=?`
|
||||
errQuery := s.DB.Debug().Exec(query, id).Error
|
||||
if errQuery != nil {
|
||||
log.Println(errQuery)
|
||||
return errors.New("Tidak dapat hapus data retribusi")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *DatabaseService) SearchRetribusi(kelompok_obyek string) ([]*satu_data.Retribusi, error) {
|
||||
//log.Println("search retribusi by:", kelompok_obyek)
|
||||
var result []*satu_data.Retribusi
|
||||
query := `select * from data_retribusi where "Kelompok_obyek"=?`
|
||||
errQuery := s.DB.Debug().Raw(query, kelompok_obyek).Scan(&result).Error
|
||||
if errQuery != nil {
|
||||
log.Println(errQuery)
|
||||
return nil, errors.New("Tidak dapat data retribusi")
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
89
pkg/handlers/antrean/antrean.go
Normal file
89
pkg/handlers/antrean/antrean.go
Normal file
@@ -0,0 +1,89 @@
|
||||
package antrean
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"template_blueprint/internal/database"
|
||||
connDatabase "template_blueprint/pkg/database/satu_data"
|
||||
"template_blueprint/pkg/models/antrean"
|
||||
)
|
||||
|
||||
func GetKios(c *gin.Context) {
|
||||
db := database.New().GetDB("antrean")
|
||||
satudata := connDatabase.NewDatabaseService(db)
|
||||
|
||||
var req *antrean.Request
|
||||
err := c.Bind(&req)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
DataKios, errInsertData := satudata.GetKios(req.ID)
|
||||
if errInsertData != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": errInsertData.Error()})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusCreated, gin.H{
|
||||
"message": "Data Ditemukan",
|
||||
"data": DataKios,
|
||||
})
|
||||
}
|
||||
|
||||
func InsertKios(c *gin.Context) {
|
||||
db := database.New().GetDB("antrean")
|
||||
satudata := connDatabase.NewDatabaseService(db)
|
||||
|
||||
var req *antrean.KioskData
|
||||
err := c.Bind(&req)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
errInsertData := satudata.InsertKiosk(req)
|
||||
if errInsertData != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": errInsertData.Error()})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusCreated, gin.H{"message": "Data Berhasil disimpan"})
|
||||
}
|
||||
|
||||
func UpdateKios(c *gin.Context) {
|
||||
db := database.New().GetDB("antrean")
|
||||
satudata := connDatabase.NewDatabaseService(db)
|
||||
ID := c.Param("id")
|
||||
|
||||
var req *antrean.KioskData
|
||||
err := c.Bind(&req)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
err = satudata.UpdateKiosk(ID, req)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{"message": "Data kios berhasil diupdate"})
|
||||
|
||||
}
|
||||
|
||||
func DeleteKios(c *gin.Context) {
|
||||
db := database.New().GetDB("antrean")
|
||||
satudata := connDatabase.NewDatabaseService(db)
|
||||
|
||||
idParam := c.Param("id")
|
||||
id, err := strconv.ParseInt(idParam, 10, 64)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid ID"})
|
||||
return
|
||||
}
|
||||
if err := satudata.DeleteKiosk(id); err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{"message": "Kios Berhasil di delete"})
|
||||
}
|
||||
@@ -19,7 +19,7 @@ func InsertDataMaster(c *gin.Context) {
|
||||
"code": 400,
|
||||
})
|
||||
}
|
||||
db := database.New(master).GetDB()
|
||||
db := database.New(master).GetMongoDB()
|
||||
mongoDB := mongo.NewDatabaseService(db)
|
||||
ReqInsertData.ID = uuid.New().String()
|
||||
errInsert := mongoDB.InsertDataMaster(ReqInsertData)
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
func GetDataLog(c *gin.Context) {
|
||||
locals := os.Getenv("BLUEPRINT_DB_LOCAL")
|
||||
db := database.New(locals).GetDB()
|
||||
db := database.New(locals).GetMongoDB()
|
||||
if db == nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"message": "Database connection failed"})
|
||||
return
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
func InsertPatient(c *gin.Context) {
|
||||
local := os.Getenv("MONGODB_DEV_LOCAL")
|
||||
db := database.New(local).GetDB()
|
||||
db := database.New(local).GetMongoDB()
|
||||
if db == nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"message": "Database connection failed"})
|
||||
return
|
||||
@@ -39,7 +39,7 @@ func InsertPatient(c *gin.Context) {
|
||||
|
||||
func GetAllPatient(c *gin.Context) {
|
||||
local := os.Getenv("MONGODB_DEV_LOCAL")
|
||||
db := database.New(local).GetDB()
|
||||
db := database.New(local).GetMongoDB()
|
||||
if db == nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"message": "Database connection failed"})
|
||||
return
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package poliklinik
|
||||
|
||||
import (
|
||||
""
|
||||
"github.com/gin-gonic/gin"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
205
pkg/handlers/retribusi/retribusi.go
Normal file
205
pkg/handlers/retribusi/retribusi.go
Normal file
@@ -0,0 +1,205 @@
|
||||
package retribusi
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/google/uuid"
|
||||
"log"
|
||||
"net/http"
|
||||
"template_blueprint/internal/database"
|
||||
//_ "template_blueprint/cmd/api/docs"
|
||||
//_ "template_blueprint/docs"
|
||||
//_ "template_blueprint/docs"
|
||||
//_ "template_blueprint/internal/docs"
|
||||
connDatabase "template_blueprint/pkg/database/satu_data"
|
||||
"template_blueprint/pkg/models/satu_data"
|
||||
"time"
|
||||
)
|
||||
|
||||
// GetDataRetribusi return list of all retribution from the database
|
||||
// @Summary all retribution
|
||||
// @Description return list of all retribution from the database
|
||||
// @Param limit path string true "limit"
|
||||
// @Param offset path string true "offset"
|
||||
// @Tags Retribusi
|
||||
// @Success 200 {object} satu_data.Retribusi
|
||||
// @Router /retribusi/getData/Limit/{limit}/Offset/{offset} [get]
|
||||
func GetDataRetribusi(c *gin.Context) {
|
||||
db := database.New().GetDB("satudata")
|
||||
satudata := connDatabase.NewDatabaseService(db)
|
||||
limit := c.Param("limit")
|
||||
offset := c.Param("offset")
|
||||
|
||||
log.Println("limit:", limit, ",offset:", offset)
|
||||
dataRetribusi, err := satudata.GetRetribusi(limit, offset)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"message": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
if len(dataRetribusi) == 0 {
|
||||
//log.Println("data retribusi tidak ditemukan")
|
||||
c.JSON(http.StatusNotFound, gin.H{"message": "data retribusi tidak ditemukan"})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, dataRetribusi)
|
||||
}
|
||||
|
||||
// InsertRetribution godoc
|
||||
// @Summary Create retribution
|
||||
// @Description Save retribution data in DB
|
||||
// @Param data body satu_data.Retribusi true "data Retribusi"
|
||||
// @Produce application/json
|
||||
// @Tags Retribusi
|
||||
// @Success 200 {object} map[string]string "Data Berhasil disimpan"
|
||||
// @Router /retribusi/insertretribusi [post]
|
||||
func InsertRetribution(c *gin.Context) {
|
||||
db := database.New().GetDB("satudata")
|
||||
satudata := connDatabase.NewDatabaseService(db)
|
||||
|
||||
var request *satu_data.Retribusi
|
||||
err := c.Bind(&request)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
ID := uuid.New().String()
|
||||
timeNow := time.Now().Format("2006-01-02 15:04:05")
|
||||
reqInsert := &satu_data.Retribusi{
|
||||
ID: ID,
|
||||
Status: request.Status,
|
||||
Sort: request.Sort,
|
||||
UserCreated: request.UserCreated,
|
||||
DateCreated: timeNow,
|
||||
Jenis: request.Jenis,
|
||||
Pelayanan: request.Pelayanan,
|
||||
Dinas: request.Dinas,
|
||||
KelompokObyek: request.KelompokObyek,
|
||||
KodeTarif: request.KodeTarif,
|
||||
Tarif: request.Tarif,
|
||||
Satuan: request.Satuan,
|
||||
TarifOverTime: request.TarifOverTime,
|
||||
SatuanOverTime: request.SatuanOverTime,
|
||||
RekeningPokok: request.RekeningPokok,
|
||||
RekeningDenda: request.RekeningDenda,
|
||||
Uraian1: request.Uraian1,
|
||||
Uraian2: request.Uraian2,
|
||||
Uraian3: request.Uraian3,
|
||||
}
|
||||
|
||||
//log.Println("request:", request)
|
||||
//fmt.Println(reflect.TypeOf(reqInsert))
|
||||
errInsertData := satudata.InsertRetribusi(reqInsert)
|
||||
if errInsertData != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": errInsertData.Error()})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusCreated, gin.H{"message": "Data Berhasil disimpan"})
|
||||
}
|
||||
|
||||
// UpdateRetribution godoc
|
||||
// @Summary Update retribution
|
||||
// @Description Change retribution data in DB
|
||||
// @Param data body satu_data.Retribusi true "data Retribusi"
|
||||
// @Produce application/json
|
||||
// @Tags Retribusi
|
||||
// @Success 200 {object} map[string]string "Data Berhasil Diubah"
|
||||
// @Router /retribusi/updateretribusi [put]
|
||||
func UpdateRetribution(c *gin.Context) {
|
||||
db := database.New().GetDB("satudata")
|
||||
satudata := connDatabase.NewDatabaseService(db)
|
||||
|
||||
var request *satu_data.Retribusi
|
||||
err := c.Bind(&request)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
timeNow := time.Now().Format("2006-01-02 15:04:05")
|
||||
reqUpdate := &satu_data.Retribusi{
|
||||
ID: request.ID,
|
||||
Status: request.Status,
|
||||
Sort: request.Sort,
|
||||
UserUpdated: request.UserUpdated,
|
||||
DateUpdated: timeNow,
|
||||
Jenis: request.Jenis,
|
||||
Pelayanan: request.Pelayanan,
|
||||
Dinas: request.Dinas,
|
||||
KelompokObyek: request.KelompokObyek,
|
||||
KodeTarif: request.KodeTarif,
|
||||
Tarif: request.Tarif,
|
||||
Satuan: request.Satuan,
|
||||
TarifOverTime: request.TarifOverTime,
|
||||
SatuanOverTime: request.SatuanOverTime,
|
||||
RekeningPokok: request.RekeningPokok,
|
||||
RekeningDenda: request.RekeningDenda,
|
||||
Uraian1: request.Uraian1,
|
||||
Uraian2: request.Uraian2,
|
||||
Uraian3: request.Uraian3,
|
||||
}
|
||||
errUpdateData := satudata.UpdateRetribusi(reqUpdate)
|
||||
if errUpdateData != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": errUpdateData.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{"message": "Data Berhasil Diubah", "data": reqUpdate})
|
||||
}
|
||||
|
||||
// DeleteDataRetribusi godoc
|
||||
// @Summary Delete retribution
|
||||
// @Description Remove retribution data by id
|
||||
// @Param ID path string true "ID"
|
||||
// @Produce application/json
|
||||
// @Tags Retribusi
|
||||
// @Success 200 {object} map[string]string "Data Berhasil dihapus"
|
||||
// @Router /retribusi/deleteretribusi/{ID} [delete]
|
||||
func DeleteDataRetribusi(c *gin.Context) {
|
||||
db := database.New().GetDB("satudata")
|
||||
satudata := connDatabase.NewDatabaseService(db)
|
||||
|
||||
//var request *satu_data.Retribusi
|
||||
ID := c.Param("id")
|
||||
//err := c.Bind(&request)
|
||||
//if err != nil {
|
||||
// c.JSON(http.StatusInternalServerError, gin.H{"message": err.Error})
|
||||
// return
|
||||
//}
|
||||
|
||||
errDelete := satudata.DeleteRetribusi(ID)
|
||||
if errDelete != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": error.Error})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{"message": "Data Berhasil dihapus"})
|
||||
}
|
||||
|
||||
// SearchDataRetribusi godoc
|
||||
// @Summary Search retribution
|
||||
// @Description search retribution data by id
|
||||
// @Param Kelompok_obyek path string true "Kelompok_obyek"
|
||||
// @Produce application/json
|
||||
// @Tags Retribusi
|
||||
// @Success 200 {object} satu_data.Retribusi
|
||||
// @Router /retribusi/searchData/{kelompok_obyek} [get]
|
||||
func SearchDataRetribusi(c *gin.Context) {
|
||||
db := database.New().GetDB("satudata")
|
||||
satudata := connDatabase.NewDatabaseService(db)
|
||||
|
||||
Kelompok_obyek := c.Param("kelompok_obyek")
|
||||
|
||||
//log.Println("Kelompok_obyek :", Kelompok_obyek)
|
||||
dataRetribusi, err := satudata.SearchRetribusi(Kelompok_obyek)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
if len(dataRetribusi) == 0 {
|
||||
//log.Println("data retribusi tidak ditemukan")
|
||||
c.JSON(http.StatusNotFound, gin.H{"message": "data retribusi tidak ditemukan"})
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, dataRetribusi)
|
||||
}
|
||||
@@ -23,8 +23,8 @@ import (
|
||||
// @Failure 500 {object} map[string]string "Database connection failed"
|
||||
// @Router /api/localinsertuser [post]
|
||||
func InsertUser(c *gin.Context) {
|
||||
local := os.Getenv("BLUEPRINT_DB_LOCAL")
|
||||
db := database.New(local).GetDB()
|
||||
local := os.Getenv("MONGODB_DEV_LOCAL")
|
||||
db := database.New(local).GetMongoDB()
|
||||
if db == nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"message": "Database connection failed"})
|
||||
return
|
||||
@@ -60,8 +60,8 @@ func InsertUser(c *gin.Context) {
|
||||
// @Failure 500 {object} map[string]string "Database connection failed"
|
||||
// @Router /api/local/getalluser [get]
|
||||
func GetAllUser(c *gin.Context) {
|
||||
local := os.Getenv("BLUEPRINT_DB_LOCAL")
|
||||
db := database.New(local).GetDB()
|
||||
local := os.Getenv("MONGODB_DEV_LOCAL")
|
||||
db := database.New(local).GetMongoDB()
|
||||
if db == nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"message": "Database connection failed"})
|
||||
return
|
||||
@@ -88,7 +88,7 @@ func GetAllUser(c *gin.Context) {
|
||||
// @Router /api/local/getuser/{id} [get]
|
||||
func GetUserByID(c *gin.Context) {
|
||||
local := os.Getenv("BLUEPRINT_DB_LOCAL")
|
||||
db := database.New(local).GetDB()
|
||||
db := database.New(local).GetMongoDB()
|
||||
if db == nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"message": "Database connection failed"})
|
||||
return
|
||||
@@ -119,7 +119,7 @@ func GetUserByID(c *gin.Context) {
|
||||
// @Router /users [put]
|
||||
func UpdateUser(c *gin.Context) {
|
||||
local := os.Getenv("BLUEPRINT_DB_LOCAL")
|
||||
db := database.New(local).GetDB()
|
||||
db := database.New(local).GetMongoDB()
|
||||
if db == nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"message": "Database connection failed"})
|
||||
return
|
||||
@@ -146,7 +146,7 @@ func UpdateUser(c *gin.Context) {
|
||||
|
||||
func DeleteUser(c *gin.Context) {
|
||||
local := os.Getenv("BLUEPRINT_DB_LOCAL")
|
||||
db := database.New(local).GetDB()
|
||||
db := database.New(local).GetMongoDB()
|
||||
if db == nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"message": "Database connection failed"})
|
||||
return
|
||||
|
||||
40
pkg/models/antrean/antrean.go
Normal file
40
pkg/models/antrean/antrean.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package antrean
|
||||
|
||||
type Antrean struct {
|
||||
ID int `gorm:"column:id" json:"id"`
|
||||
Name string `gorm:"column:name" json:"name"`
|
||||
Icon string `gorm:"column:icon" json:"icon"`
|
||||
URL string `gorm:"column:url" json:"url"`
|
||||
Active bool `gorm:"column:active" json:"active"`
|
||||
FKrefHealthcare int `gorm:"column:fk_ref_healthcare_type_id" json:"healthcare_type_id"`
|
||||
DisplayHealth string `gorm:"column:refnamehealth" json:"healthcare_name"`
|
||||
FKrefserviceType int `gorm:"column:fk_ref_service_type_id" json:"service_type_id"`
|
||||
DisplayPayment string `gorm:"column:refnamepayment" json:"payment_name"`
|
||||
FKLocation string `gorm:"column:fk_sd_location_id" json:"location_id"`
|
||||
DisplayLocation string `gorm:"column:ds_sd_location" json:"display_location"`
|
||||
}
|
||||
|
||||
type Request struct {
|
||||
ID int `json:"id"`
|
||||
}
|
||||
|
||||
type KioskData struct {
|
||||
Name string `json:"name"`
|
||||
Active bool `json:"active"`
|
||||
Icon string `json:"icon"`
|
||||
URL string `json:"url"`
|
||||
FKRefHealthcareTypeID int64 `json:"fk_ref_healthcare_type_id"`
|
||||
FKRefServiceTypeID int64 `json:"fk_ref_service_type_id"`
|
||||
FKSDLocationID string `json:"fk_sd_location_id"`
|
||||
DSSDLocation string `json:"ds_sd_location"`
|
||||
HealthcareServiceData *HealthcareServiceData `json:"healthcare_service_data,omitempty"`
|
||||
PaymentTypeData *PaymentTypeData `json:"payment_type_data,omitempty"`
|
||||
}
|
||||
|
||||
type HealthcareServiceData struct {
|
||||
FKMSHealthcareServiceID int64 `json:"fk_ms_healthcare_service_id"`
|
||||
}
|
||||
|
||||
type PaymentTypeData struct {
|
||||
FKRefPaymentTypeID int64 `json:"fk_ref_payment_type_id"`
|
||||
}
|
||||
42
pkg/models/health.go
Normal file
42
pkg/models/health.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package models
|
||||
|
||||
// HealthResponse represents the health check response
|
||||
type HealthResponse struct {
|
||||
Status string `json:"status"`
|
||||
Timestamp string `json:"timestamp"`
|
||||
Details map[string]string `json:"details"`
|
||||
}
|
||||
|
||||
// HelloWorldResponse represents the hello world response
|
||||
type HelloWorldResponse struct {
|
||||
Message string `json:"message"`
|
||||
Version string `json:"version"`
|
||||
}
|
||||
|
||||
// ErrorResponse represents an error response
|
||||
type ErrorResponse struct {
|
||||
Error string `json:"error"`
|
||||
Message string `json:"message"`
|
||||
Code int `json:"code"`
|
||||
}
|
||||
|
||||
// SuccessResponse represents a generic success response
|
||||
type SuccessResponse struct {
|
||||
Success bool `json:"success"`
|
||||
Message string `json:"message"`
|
||||
Data interface{} `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
// Pagination represents pagination metadata
|
||||
type Pagination struct {
|
||||
Page int `json:"page"`
|
||||
Limit int `json:"limit"`
|
||||
Total int `json:"total"`
|
||||
TotalPages int `json:"total_pages"`
|
||||
}
|
||||
|
||||
// PaginatedResponse represents a paginated response
|
||||
type PaginatedResponse struct {
|
||||
Data interface{} `json:"data"`
|
||||
Pagination Pagination `json:"pagination"`
|
||||
}
|
||||
25
pkg/models/satu_data/retribusi.go
Normal file
25
pkg/models/satu_data/retribusi.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package satu_data
|
||||
|
||||
type Retribusi struct {
|
||||
ID string `gorm:"column:id" json:"id"`
|
||||
Status string `gorm:"column:status" json:"status"`
|
||||
Sort int `gorm:"column:sort" json:"sort"`
|
||||
UserCreated string `gorm:"column:user_created" json:"user_created"`
|
||||
DateCreated string `gorm:"column:date_created" json:"date_created"`
|
||||
UserUpdated string `gorm:"column:user_updated" json:"user_updated"`
|
||||
DateUpdated string `gorm:"column:date_updated" json:"date_updated"`
|
||||
Jenis string `gorm:"column:Jenis" json:"Jenis"`
|
||||
Pelayanan string `gorm:"column:Pelayanan" json:"Pelayanan"`
|
||||
Dinas string `gorm:"column:Dinas" json:"Dinas"`
|
||||
KelompokObyek string `gorm:"column:Kelompok_obyek" json:"Kelompok_obyek"`
|
||||
KodeTarif string `gorm:"column:Kode_tarif" json:"Kode_tarif"`
|
||||
Tarif string `gorm:"column:Tarif" json:"Tarif"`
|
||||
Satuan string `gorm:"column:Satuan" json:"Satuan"`
|
||||
TarifOverTime string `gorm:"column:Tarif_overtime" json:"Tarif_overtime"`
|
||||
SatuanOverTime string `gorm:"column:Satuan_overtime" json:"Satuan_overtime"`
|
||||
RekeningPokok string `gorm:"column:Rekening_pokok" json:"Rekening_pokok"`
|
||||
RekeningDenda string `gorm:"column:Rekening_denda" json:"Rekening_denda"`
|
||||
Uraian1 string `gorm:"column:Uraian_1" json:"Uraian_1"`
|
||||
Uraian2 string `gorm:"column:Uraian_2" json:"Uraian_2"`
|
||||
Uraian3 string `gorm:"column:Uraian_3" json:"Uraian_3"`
|
||||
}
|
||||
Reference in New Issue
Block a user