quran

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_quran_proto protoreflect.FileDescriptor

Functions

func NewQuranEndpoints

func NewQuranEndpoints() []*api.Endpoint

func RegisterQuranHandler

func RegisterQuranHandler(s server.Server, hdlr QuranHandler, opts ...server.HandlerOption) error

Types

type Chapter

type Chapter struct {

	// The id of the chapter as a number e.g 1
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// The number of verses in the chapter
	Verses int32 `protobuf:"varint,2,opt,name=verses,proto3" json:"verses,omitempty"`
	// The simple name of the chapter
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// The arabic name of the chapter
	ArabicName string `protobuf:"bytes,4,opt,name=arabic_name,json=arabicName,proto3" json:"arabic_name,omitempty"`
	// The complex name of the chapter
	ComplexName string `protobuf:"bytes,5,opt,name=complex_name,json=complexName,proto3" json:"complex_name,omitempty"`
	// The translated name
	TranslatedName string `protobuf:"bytes,6,opt,name=translated_name,json=translatedName,proto3" json:"translated_name,omitempty"`
	// Should the chapter start with bismillah
	PrefixBismillah bool `protobuf:"varint,7,opt,name=prefix_bismillah,json=prefixBismillah,proto3" json:"prefix_bismillah,omitempty"`
	// The place of revelation
	RevelationPlace string `protobuf:"bytes,8,opt,name=revelation_place,json=revelationPlace,proto3" json:"revelation_place,omitempty"`
	// The order in which it was revealed
	RevelationOrder int32 `protobuf:"varint,9,opt,name=revelation_order,json=revelationOrder,proto3" json:"revelation_order,omitempty"`
	// The pages from and to e.g 1, 1
	Pages []int32 `protobuf:"varint,10,rep,packed,name=pages,proto3" json:"pages,omitempty"`
	// contains filtered or unexported fields
}

func (*Chapter) Descriptor deprecated

func (*Chapter) Descriptor() ([]byte, []int)

Deprecated: Use Chapter.ProtoReflect.Descriptor instead.

func (*Chapter) GetArabicName

func (x *Chapter) GetArabicName() string

func (*Chapter) GetComplexName

func (x *Chapter) GetComplexName() string

func (*Chapter) GetId

func (x *Chapter) GetId() int32

func (*Chapter) GetName

func (x *Chapter) GetName() string

func (*Chapter) GetPages

func (x *Chapter) GetPages() []int32

func (*Chapter) GetPrefixBismillah

func (x *Chapter) GetPrefixBismillah() bool

func (*Chapter) GetRevelationOrder

func (x *Chapter) GetRevelationOrder() int32

func (*Chapter) GetRevelationPlace

func (x *Chapter) GetRevelationPlace() string

func (*Chapter) GetTranslatedName

func (x *Chapter) GetTranslatedName() string

func (*Chapter) GetVerses

func (x *Chapter) GetVerses() int32

func (*Chapter) ProtoMessage

func (*Chapter) ProtoMessage()

func (*Chapter) ProtoReflect

func (x *Chapter) ProtoReflect() protoreflect.Message

func (*Chapter) Reset

func (x *Chapter) Reset()

func (*Chapter) String

func (x *Chapter) String() string

type ChaptersRequest

type ChaptersRequest struct {

	// Specify the language e.g en
	Language string `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"`
	// contains filtered or unexported fields
}

List the Chapters (surahs) of the Quran

func (*ChaptersRequest) Descriptor deprecated

func (*ChaptersRequest) Descriptor() ([]byte, []int)

Deprecated: Use ChaptersRequest.ProtoReflect.Descriptor instead.

func (*ChaptersRequest) GetLanguage

func (x *ChaptersRequest) GetLanguage() string

func (*ChaptersRequest) ProtoMessage

func (*ChaptersRequest) ProtoMessage()

func (*ChaptersRequest) ProtoReflect

func (x *ChaptersRequest) ProtoReflect() protoreflect.Message

func (*ChaptersRequest) Reset

func (x *ChaptersRequest) Reset()

func (*ChaptersRequest) String

func (x *ChaptersRequest) String() string

type ChaptersResponse

type ChaptersResponse struct {
	Chapters []*Chapter `protobuf:"bytes,1,rep,name=chapters,proto3" json:"chapters,omitempty"`
	// contains filtered or unexported fields
}

func (*ChaptersResponse) Descriptor deprecated

func (*ChaptersResponse) Descriptor() ([]byte, []int)

Deprecated: Use ChaptersResponse.ProtoReflect.Descriptor instead.

func (*ChaptersResponse) GetChapters

func (x *ChaptersResponse) GetChapters() []*Chapter

func (*ChaptersResponse) ProtoMessage

func (*ChaptersResponse) ProtoMessage()

func (*ChaptersResponse) ProtoReflect

func (x *ChaptersResponse) ProtoReflect() protoreflect.Message

func (*ChaptersResponse) Reset

func (x *ChaptersResponse) Reset()

func (*ChaptersResponse) String

func (x *ChaptersResponse) String() string

type Interpretation

type Interpretation struct {

	// The unique id of the interpretation
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// The source of the interpretation
	Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
	// The translated text
	Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*Interpretation) Descriptor deprecated

func (*Interpretation) Descriptor() ([]byte, []int)

Deprecated: Use Interpretation.ProtoReflect.Descriptor instead.

func (*Interpretation) GetId

func (x *Interpretation) GetId() int32

func (*Interpretation) GetSource

func (x *Interpretation) GetSource() string

func (*Interpretation) GetText

func (x *Interpretation) GetText() string

func (*Interpretation) ProtoMessage

func (*Interpretation) ProtoMessage()

func (*Interpretation) ProtoReflect

func (x *Interpretation) ProtoReflect() protoreflect.Message

func (*Interpretation) Reset

func (x *Interpretation) Reset()

func (*Interpretation) String

func (x *Interpretation) String() string

type QuranService

type QuranService interface {
	Chapters(ctx context.Context, in *ChaptersRequest, opts ...client.CallOption) (*ChaptersResponse, error)
	Summary(ctx context.Context, in *SummaryRequest, opts ...client.CallOption) (*SummaryResponse, error)
	Verses(ctx context.Context, in *VersesRequest, opts ...client.CallOption) (*VersesResponse, error)
	Search(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error)
}

func NewQuranService

func NewQuranService(name string, c client.Client) QuranService

type Result

type Result struct {

	// The unique verse id across the Quran
	VerseId int32 `protobuf:"varint,1,opt,name=verse_id,json=verseId,proto3" json:"verse_id,omitempty"`
	// The verse key e.g 1:1
	VerseKey string `protobuf:"bytes,2,opt,name=verse_key,json=verseKey,proto3" json:"verse_key,omitempty"`
	// The associated arabic text
	Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
	// The related translations to the text
	Translations []*Translation `protobuf:"bytes,4,rep,name=translations,proto3" json:"translations,omitempty"`
	// contains filtered or unexported fields
}

func (*Result) Descriptor deprecated

func (*Result) Descriptor() ([]byte, []int)

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetText

func (x *Result) GetText() string

func (*Result) GetTranslations

func (x *Result) GetTranslations() []*Translation

func (*Result) GetVerseId

func (x *Result) GetVerseId() int32

func (*Result) GetVerseKey

func (x *Result) GetVerseKey() string

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

func (x *Result) ProtoReflect() protoreflect.Message

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type SearchRequest

type SearchRequest struct {

	// The query to ask
	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// The language for translation
	Language string `protobuf:"bytes,2,opt,name=language,proto3" json:"language,omitempty"`
	// The number of results to return
	Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// The pagination number
	Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"`
	// contains filtered or unexported fields
}

Search the Quran for any form of query or questions

func (*SearchRequest) Descriptor deprecated

func (*SearchRequest) Descriptor() ([]byte, []int)

Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.

func (*SearchRequest) GetLanguage

func (x *SearchRequest) GetLanguage() string

func (*SearchRequest) GetLimit

func (x *SearchRequest) GetLimit() int32

func (*SearchRequest) GetPage

func (x *SearchRequest) GetPage() int32

func (*SearchRequest) GetQuery

func (x *SearchRequest) GetQuery() string

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) ProtoReflect

func (x *SearchRequest) ProtoReflect() protoreflect.Message

func (*SearchRequest) Reset

func (x *SearchRequest) Reset()

func (*SearchRequest) String

func (x *SearchRequest) String() string

type SearchResponse

type SearchResponse struct {

	// The question asked
	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// The total results returned
	TotalResults int32 `protobuf:"varint,2,opt,name=total_results,json=totalResults,proto3" json:"total_results,omitempty"`
	// The current page
	Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
	// The total pages
	TotalPages int32 `protobuf:"varint,4,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"`
	// The results for the query
	Results []*Result `protobuf:"bytes,5,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchResponse) Descriptor deprecated

func (*SearchResponse) Descriptor() ([]byte, []int)

Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.

func (*SearchResponse) GetPage

func (x *SearchResponse) GetPage() int32

func (*SearchResponse) GetQuery

func (x *SearchResponse) GetQuery() string

func (*SearchResponse) GetResults

func (x *SearchResponse) GetResults() []*Result

func (*SearchResponse) GetTotalPages

func (x *SearchResponse) GetTotalPages() int32

func (*SearchResponse) GetTotalResults

func (x *SearchResponse) GetTotalResults() int32

func (*SearchResponse) ProtoMessage

func (*SearchResponse) ProtoMessage()

func (*SearchResponse) ProtoReflect

func (x *SearchResponse) ProtoReflect() protoreflect.Message

func (*SearchResponse) Reset

func (x *SearchResponse) Reset()

func (*SearchResponse) String

func (x *SearchResponse) String() string

type SummaryRequest

type SummaryRequest struct {

	// The chapter id e.g 1
	Chapter int32 `protobuf:"varint,1,opt,name=chapter,proto3" json:"chapter,omitempty"`
	// Specify the language e.g en
	Language string `protobuf:"bytes,2,opt,name=language,proto3" json:"language,omitempty"`
	// contains filtered or unexported fields
}

Get a summary for a given chapter (surah)

func (*SummaryRequest) Descriptor deprecated

func (*SummaryRequest) Descriptor() ([]byte, []int)

Deprecated: Use SummaryRequest.ProtoReflect.Descriptor instead.

func (*SummaryRequest) GetChapter

func (x *SummaryRequest) GetChapter() int32

func (*SummaryRequest) GetLanguage

func (x *SummaryRequest) GetLanguage() string

func (*SummaryRequest) ProtoMessage

func (*SummaryRequest) ProtoMessage()

func (*SummaryRequest) ProtoReflect

func (x *SummaryRequest) ProtoReflect() protoreflect.Message

func (*SummaryRequest) Reset

func (x *SummaryRequest) Reset()

func (*SummaryRequest) String

func (x *SummaryRequest) String() string

type SummaryResponse

type SummaryResponse struct {

	// The chapter id
	Chapter int32 `protobuf:"varint,1,opt,name=chapter,proto3" json:"chapter,omitempty"`
	// The short summary for the chapter
	Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
	// The source of the summary
	Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
	// The full description for the chapter
	Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*SummaryResponse) Descriptor deprecated

func (*SummaryResponse) Descriptor() ([]byte, []int)

Deprecated: Use SummaryResponse.ProtoReflect.Descriptor instead.

func (*SummaryResponse) GetChapter

func (x *SummaryResponse) GetChapter() int32

func (*SummaryResponse) GetSource

func (x *SummaryResponse) GetSource() string

func (*SummaryResponse) GetSummary

func (x *SummaryResponse) GetSummary() string

func (*SummaryResponse) GetText

func (x *SummaryResponse) GetText() string

func (*SummaryResponse) ProtoMessage

func (*SummaryResponse) ProtoMessage()

func (*SummaryResponse) ProtoReflect

func (x *SummaryResponse) ProtoReflect() protoreflect.Message

func (*SummaryResponse) Reset

func (x *SummaryResponse) Reset()

func (*SummaryResponse) String

func (x *SummaryResponse) String() string

type Translation

type Translation struct {

	// The unique id of the translation
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// The source of the translation
	Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
	// The translated text
	Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*Translation) Descriptor deprecated

func (*Translation) Descriptor() ([]byte, []int)

Deprecated: Use Translation.ProtoReflect.Descriptor instead.

func (*Translation) GetId

func (x *Translation) GetId() int32

func (*Translation) GetSource

func (x *Translation) GetSource() string

func (*Translation) GetText

func (x *Translation) GetText() string

func (*Translation) ProtoMessage

func (*Translation) ProtoMessage()

func (*Translation) ProtoReflect

func (x *Translation) ProtoReflect() protoreflect.Message

func (*Translation) Reset

func (x *Translation) Reset()

func (*Translation) String

func (x *Translation) String() string

type Verse

type Verse struct {

	// The unique id of the verse in the whole book
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// The verse number in this chapter
	Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
	// The key of this verse (chapter:verse) e.g 1:1
	Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	// The page of the Quran this verse is on
	Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"`
	// The arabic text for this verse
	Text string `protobuf:"bytes,5,opt,name=text,proto3" json:"text,omitempty"`
	// The phonetic transliteration from arabic
	Transliteration string `protobuf:"bytes,6,opt,name=transliteration,proto3" json:"transliteration,omitempty"`
	// The basic translation of the verse
	TranslatedText string `protobuf:"bytes,7,opt,name=translated_text,json=translatedText,proto3" json:"translated_text,omitempty"`
	// The alternative translations for the verse
	Translations []*Translation `protobuf:"bytes,8,rep,name=translations,proto3" json:"translations,omitempty"`
	// The interpretations of the verse
	Interpretations []*Interpretation `protobuf:"bytes,9,rep,name=interpretations,proto3" json:"interpretations,omitempty"`
	// The individual words within the verse (Ayah)
	Words []*Word `protobuf:"bytes,10,rep,name=words,proto3" json:"words,omitempty"`
	// contains filtered or unexported fields
}

func (*Verse) Descriptor deprecated

func (*Verse) Descriptor() ([]byte, []int)

Deprecated: Use Verse.ProtoReflect.Descriptor instead.

func (*Verse) GetId

func (x *Verse) GetId() int32

func (*Verse) GetInterpretations

func (x *Verse) GetInterpretations() []*Interpretation

func (*Verse) GetKey

func (x *Verse) GetKey() string

func (*Verse) GetNumber

func (x *Verse) GetNumber() int32

func (*Verse) GetPage

func (x *Verse) GetPage() int32

func (*Verse) GetText

func (x *Verse) GetText() string

func (*Verse) GetTranslatedText

func (x *Verse) GetTranslatedText() string

func (*Verse) GetTranslations

func (x *Verse) GetTranslations() []*Translation

func (*Verse) GetTransliteration

func (x *Verse) GetTransliteration() string

func (*Verse) GetWords

func (x *Verse) GetWords() []*Word

func (*Verse) ProtoMessage

func (*Verse) ProtoMessage()

func (*Verse) ProtoReflect

func (x *Verse) ProtoReflect() protoreflect.Message

func (*Verse) Reset

func (x *Verse) Reset()

func (*Verse) String

func (x *Verse) String() string

type VersesRequest

type VersesRequest struct {

	// The chapter id to retrieve
	Chapter int32 `protobuf:"varint,1,opt,name=chapter,proto3" json:"chapter,omitempty"`
	// The language of translation
	Language string `protobuf:"bytes,2,opt,name=language,proto3" json:"language,omitempty"`
	// Return the individual words with the verses
	Words bool `protobuf:"varint,3,opt,name=words,proto3" json:"words,omitempty"`
	// Return the interpretation (tafsir)
	Interpret bool `protobuf:"varint,4,opt,name=interpret,proto3" json:"interpret,omitempty"`
	// Return alternate translations
	Translate bool `protobuf:"varint,5,opt,name=translate,proto3" json:"translate,omitempty"`
	// The page number to request
	Page int32 `protobuf:"varint,6,opt,name=page,proto3" json:"page,omitempty"`
	// The verses per page
	Limit int32 `protobuf:"varint,7,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

Lookup the verses (ayahs) for a chapter

func (*VersesRequest) Descriptor deprecated

func (*VersesRequest) Descriptor() ([]byte, []int)

Deprecated: Use VersesRequest.ProtoReflect.Descriptor instead.

func (*VersesRequest) GetChapter

func (x *VersesRequest) GetChapter() int32

func (*VersesRequest) GetInterpret

func (x *VersesRequest) GetInterpret() bool

func (*VersesRequest) GetLanguage

func (x *VersesRequest) GetLanguage() string

func (*VersesRequest) GetLimit

func (x *VersesRequest) GetLimit() int32

func (*VersesRequest) GetPage

func (x *VersesRequest) GetPage() int32

func (*VersesRequest) GetTranslate

func (x *VersesRequest) GetTranslate() bool

func (*VersesRequest) GetWords

func (x *VersesRequest) GetWords() bool

func (*VersesRequest) ProtoMessage

func (*VersesRequest) ProtoMessage()

func (*VersesRequest) ProtoReflect

func (x *VersesRequest) ProtoReflect() protoreflect.Message

func (*VersesRequest) Reset

func (x *VersesRequest) Reset()

func (*VersesRequest) String

func (x *VersesRequest) String() string

type VersesResponse

type VersesResponse struct {

	// The chapter requested
	Chapter int32 `protobuf:"varint,1,opt,name=chapter,proto3" json:"chapter,omitempty"`
	// The page requested
	Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
	// The total pages
	TotalPages int32 `protobuf:"varint,3,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"`
	// The verses on the page
	Verses []*Verse `protobuf:"bytes,4,rep,name=verses,proto3" json:"verses,omitempty"`
	// contains filtered or unexported fields
}

func (*VersesResponse) Descriptor deprecated

func (*VersesResponse) Descriptor() ([]byte, []int)

Deprecated: Use VersesResponse.ProtoReflect.Descriptor instead.

func (*VersesResponse) GetChapter

func (x *VersesResponse) GetChapter() int32

func (*VersesResponse) GetPage

func (x *VersesResponse) GetPage() int32

func (*VersesResponse) GetTotalPages

func (x *VersesResponse) GetTotalPages() int32

func (*VersesResponse) GetVerses

func (x *VersesResponse) GetVerses() []*Verse

func (*VersesResponse) ProtoMessage

func (*VersesResponse) ProtoMessage()

func (*VersesResponse) ProtoReflect

func (x *VersesResponse) ProtoReflect() protoreflect.Message

func (*VersesResponse) Reset

func (x *VersesResponse) Reset()

func (*VersesResponse) String

func (x *VersesResponse) String() string

type Word

type Word struct {

	// The id of the word within the verse
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// The position of the word
	Position int32 `protobuf:"varint,2,opt,name=position,proto3" json:"position,omitempty"`
	// The character type e.g word, end
	CharType string `protobuf:"bytes,3,opt,name=char_type,json=charType,proto3" json:"char_type,omitempty"`
	// The page number
	Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"`
	// The line number
	Line int32 `protobuf:"varint,5,opt,name=line,proto3" json:"line,omitempty"`
	// The arabic text for this word
	Text string `protobuf:"bytes,6,opt,name=text,proto3" json:"text,omitempty"`
	// The QCF v2 font code
	Code string `protobuf:"bytes,7,opt,name=code,proto3" json:"code,omitempty"`
	// The translated text
	Translation string `protobuf:"bytes,8,opt,name=translation,proto3" json:"translation,omitempty"`
	// The transliteration text
	Transliteration string `protobuf:"bytes,9,opt,name=transliteration,proto3" json:"transliteration,omitempty"`
	// contains filtered or unexported fields
}

func (*Word) Descriptor deprecated

func (*Word) Descriptor() ([]byte, []int)

Deprecated: Use Word.ProtoReflect.Descriptor instead.

func (*Word) GetCharType

func (x *Word) GetCharType() string

func (*Word) GetCode

func (x *Word) GetCode() string

func (*Word) GetId

func (x *Word) GetId() int32

func (*Word) GetLine

func (x *Word) GetLine() int32

func (*Word) GetPage

func (x *Word) GetPage() int32

func (*Word) GetPosition

func (x *Word) GetPosition() int32

func (*Word) GetText

func (x *Word) GetText() string

func (*Word) GetTranslation

func (x *Word) GetTranslation() string

func (*Word) GetTransliteration

func (x *Word) GetTransliteration() string

func (*Word) ProtoMessage

func (*Word) ProtoMessage()

func (*Word) ProtoReflect

func (x *Word) ProtoReflect() protoreflect.Message

func (*Word) Reset

func (x *Word) Reset()

func (*Word) String

func (x *Word) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL