Categorygithub.com/komgrip/helpers
modulepackage
1.1.0
Repository: https://github.com/komgrip/helpers.git
Documentation: pkg.go.dev

# Functions

add footer in Excel report.
Add icon img to cell in Excel report (accept only .jpeg and .png).
ตรวจสอบว่า file ที่ส่งมาเป็นไฟล์ภาพหรือไม่.
รับค่า hashedPassword กับ password ที่ user ระบุ เพื่อตรวจสอบความถูกต้องของ password.
รับพิกัด latitude หรือ longitude ที่เป็น string แล้วแปลงเป็น string ที่เป็นทศนิมยม 6 ตำแหน่ง.
รับ time.Time และแปลงเป็นเวลา กรุงเทพฯ ประเทศไทย.
format type 1: 31 January 2024 00:00:00 AM 2: 31 January 2024 00:00 AM 3: 31 January 2024 4: 31 JAN 2024 00:00:00 AM 5: 31 JAN 2024 00:00 AM 6: 31 JAN 2024 7: 31 JAN 24 00:00:00 AM 8: 31 JAN 24 00:00 AM 9: 31 JAN 24 10: 31/01/2024 00:00:00 AM 11: 31/01/2024 00:00 AM 12: 31/01/2024 13: 31/01/24 00:00:00 AM 14: 31/01/24 00:00 AM 15: 31/01/24.
format type 1: 31 มกราคม 2567 00:00:00 น.
export HTML report.
export PDF report.
export PNG img from HTML file.
แตกไฟล์ RAR โดยการส่ง RARfilePath (/path/to/your/archive.rar) และ extractDestination (/destination/folder).
แปลง format KM เช่น 10 เป็น 0+010.
รับตัวเลข, จำนวนทศนิยม และ การบังคับให้แสดงทศนิยมแม้ว่าตัวเลขจะเป็นจำนวนเต็ม.
อ่านรายการช้อมูลในไฟล์ RAR โดยการส่ง RARfilePath ("/path/to/your/archive.rar").
รับ password และ return hashed password.
ตรวจสอบสิทธิ์ รัย permissions และ accessKeys จะ return true ถ้ามีสิทธิ์.
รับ imagePath ("/path/to/your_folder/your_img.png") เพื่อแปลงเป็น base64.
No description provided by the author
รับ token ที่เป็น string และ return true ถ้่า token หมดอายุแล้ว.
สร้าง folder โดยการส่ง path ("/root/myDirectory") dirMode 0755: เจ้าของสามารถอ่าน เขียน และรันได้ แต่กลุ่มและผู้อื่นสามารถอ่านและรันได้เท่านั้น (rwxr-xr-x) 0777: เจ้าของ, กลุ่ม, และผู้อื่นสามารถอ่าน เขียน และรันได้ (rwxrwxrwx) 0644: เจ้าของสามารถอ่านและเขียนได้ แต่กลุ่มและผู้อื่นสามารถอ่านได้เท่านั้น (rw-r--r--).
ย้ายไฟล์ โดยการส่ง sourcePath ("/origin_folder/archive.rar") และ destPath ("/destination_folder/archive.rar").
รับค่า parameter เพื่อ return format paginate.
รับ data เพื่อ print เป็น json.
No description provided by the author
No description provided by the author
ลบไฟล์หรือโฟลเดอร์ทั้งหมด (รวมถึงไฟล์และโฟลเดอร์ย่อยภายใน) โดยการส่ง path ("/path/to/your/archive.rar") หรือ ("/path/to/your_folder").
ลบไฟล์หรือโฟลเดอร์ว่าง โดยการส่ง path ("/path/to/your/archive.rar") หรือ ("/path/to/your_folder").
No description provided by the author
รับ text format และ LINE Token เพื่อส่งแจ้งเตือนผ่าน LINE notification.
ตรวจสอบความถูกค้องของรหัสบัตรประจำตัวประชาชน.
อัพโหลดรูปภาพจาก Base64 โดยการส่ง base64Code, ชื่อไฟล์ที่ต้องการ และ folderPath ("/path/to/your_folder").
อัพโหลดไฟล์ โดยการส่ง *gin.Context และ folderPath ("/path/to/your_folder").
อัพโหลดไฟล์ โดยการรับ URL และ folderPath ("/path/to/your_folder").
ตรวจสอบเงื่อนไขการตั้งค่ารหัสผ่าน.
ตรวจสอบความถูกค้องของเบอร์โทรศัพท์.
รับ token และ secretKey เพื่อตรวจสอบ token ถ้าเป็น token ที่สร้างจาก secretKey จะ return true แต่จะ return false ถ้าไม่ใช่.

# Variables

map เดือนเป็นภาษาไทย.
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author