quran-go

Read Qur'an right in the terminal.
git clone http://git.hanabi.in/repos/quran-go.git
Log | Files | Refs | README | LICENSE

type.go (1840B)


      1 package types
      2 
      3 type TranslationList struct {
      4 	Translations []Translations `json:"translations"`
      5 }
      6 
      7 type TranslatedName struct {
      8 	Name         string `json:"name"`
      9 	LanguageName string `json:"language_name"`
     10 }
     11 
     12 type Translations struct {
     13 	ID             int            `json:"id"`
     14 	Name           string         `json:"name"`
     15 	AuthorName     string         `json:"author_name"`
     16 	Slug           string         `json:"slug"`
     17 	LanguageName   string         `json:"language_name"`
     18 	TranslatedName TranslatedName `json:"translated_name"`
     19 }
     20 
     21 type VerseData struct {
     22 	Translations []struct {
     23 		ID         int    `json:"id"`
     24 		ResourceID int    `json:"resource_id"`
     25 		Text       string `json:"text"`
     26 	} `json:"translations"`
     27 	Pagination struct {
     28 		PerPage      int         `json:"per_page"`
     29 		CurrentPage  int         `json:"current_page"`
     30 		NextPage     interface{} `json:"next_page"`
     31 		TotalPages   int         `json:"total_pages"`
     32 		TotalRecords int         `json:"total_records"`
     33 	} `json:"pagination"`
     34 }
     35 
     36 type ChapterDetails struct {
     37 	Chapter `json:"chapter"`
     38 }
     39 
     40 type Chapter struct {
     41 	ID              int            `json:"id"`
     42 	RevelationPlace string         `json:"revelation_place"`
     43 	RevelationOrder int            `json:"revelation_order"`
     44 	BismillahPre    bool           `json:"bismillah_pre"`
     45 	NameSimple      string         `json:"name_simple"`
     46 	NameComplex     string         `json:"name_complex"`
     47 	NameArabic      string         `json:"name_arabic"`
     48 	VersesCount     int            `json:"verses_count"`
     49 	Pages           []int          `json:"pages"`
     50 	TranslatedName  TranslatedName `json:"translated_name"`
     51 }
     52 
     53 type ChaptersList struct {
     54 	Chapters []Chapter `json:"chapters"`
     55 }
     56 
     57 type Chap uint64
     58 type Delay float64
     59 type Trans int // As of now, I have only seen integers, could be negative in future, for all I know.
     60 type Verse uint64