Discover Packages
github.com/ak9024/adiatma.tech/api
internal
hadith
package
Version:
v0.0.0-...-a938e7c
Opens a new window with list of versions in this module.
Published: Jan 20, 2024
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
handle read directory of ./data/hadith/
handle to remove file extention
type Data struct {
Arabic string `json:"arabic"`
Number int `json:"number"`
Translate Translate `json:"translate"`
}
type Hadith struct {
Number int `json:"number"`
Arab string `json:"arab"`
ID string `json:"id"`
}
implement pagination to limit data return of hadith's
handle read file hadith form path data
./data/hadith/:author
type IHadith interface {
GetAuthor(c *fiber.Ctx) error
GetHadith(c *fiber.Ctx) error
}
contract of hadith
type ResponseHadith200Ok struct {
StatusCode int `json:"status_code"`
Author string `json:"author"`
TotalHadith int `json:"total_hadith"`
Page int `json:"page"`
PerPage int `json:"per_page"`
Data []Data `json:"data"`
}
type Translate struct {
ID string `json:"id"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.