sunnah

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 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_sunnah_proto protoreflect.FileDescriptor

Functions

func NewSunnahEndpoints

func NewSunnahEndpoints() []*api.Endpoint

func RegisterSunnahHandler

func RegisterSunnahHandler(s server.Server, hdlr SunnahHandler, opts ...server.HandlerOption) error

Types

type Book

type Book struct {

	// number of the book e.g 1
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// name of the book
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// arabic name of the book
	ArabicName string `protobuf:"bytes,3,opt,name=arabic_name,json=arabicName,proto3" json:"arabic_name,omitempty"`
	// number of hadiths in the book
	Hadiths int32 `protobuf:"varint,4,opt,name=hadiths,proto3" json:"hadiths,omitempty"`
	// contains filtered or unexported fields
}

func (*Book) Descriptor deprecated

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

Deprecated: Use Book.ProtoReflect.Descriptor instead.

func (*Book) GetArabicName

func (x *Book) GetArabicName() string

func (*Book) GetHadiths

func (x *Book) GetHadiths() int32

func (*Book) GetId

func (x *Book) GetId() int32

func (*Book) GetName

func (x *Book) GetName() string

func (*Book) ProtoMessage

func (*Book) ProtoMessage()

func (*Book) ProtoReflect

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

func (*Book) Reset

func (x *Book) Reset()

func (*Book) String

func (x *Book) String() string

type BooksRequest

type BooksRequest struct {

	// Name of the collection
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// The page in the pagination
	Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
	// Limit the number of books returned
	Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

Get a list of books from within a collection. A book can contain many chapters each with its own hadiths.

func (*BooksRequest) Descriptor deprecated

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

Deprecated: Use BooksRequest.ProtoReflect.Descriptor instead.

func (*BooksRequest) GetCollection

func (x *BooksRequest) GetCollection() string

func (*BooksRequest) GetLimit

func (x *BooksRequest) GetLimit() int32

func (*BooksRequest) GetPage

func (x *BooksRequest) GetPage() int32

func (*BooksRequest) ProtoMessage

func (*BooksRequest) ProtoMessage()

func (*BooksRequest) ProtoReflect

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

func (*BooksRequest) Reset

func (x *BooksRequest) Reset()

func (*BooksRequest) String

func (x *BooksRequest) String() string

type BooksResponse

type BooksResponse struct {

	// Name of the collection
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// The total overall books
	Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	// The page requested
	Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
	// The limit specified
	Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
	// A list of books
	Books []*Book `protobuf:"bytes,5,rep,name=books,proto3" json:"books,omitempty"`
	// contains filtered or unexported fields
}

func (*BooksResponse) Descriptor deprecated

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

Deprecated: Use BooksResponse.ProtoReflect.Descriptor instead.

func (*BooksResponse) GetBooks

func (x *BooksResponse) GetBooks() []*Book

func (*BooksResponse) GetCollection

func (x *BooksResponse) GetCollection() string

func (*BooksResponse) GetLimit

func (x *BooksResponse) GetLimit() int32

func (*BooksResponse) GetPage

func (x *BooksResponse) GetPage() int32

func (*BooksResponse) GetTotal

func (x *BooksResponse) GetTotal() int32

func (*BooksResponse) ProtoMessage

func (*BooksResponse) ProtoMessage()

func (*BooksResponse) ProtoReflect

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

func (*BooksResponse) Reset

func (x *BooksResponse) Reset()

func (*BooksResponse) String

func (x *BooksResponse) String() string

type Chapter

type Chapter struct {

	// the chapter id e.g 1
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// the chapter key e.g 1.00
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// the book number
	Book int32 `protobuf:"varint,3,opt,name=book,proto3" json:"book,omitempty"`
	// title of the chapter
	Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
	// arabic title
	ArabicTitle string `protobuf:"bytes,5,opt,name=arabic_title,json=arabicTitle,proto3" json:"arabic_title,omitempty"`
	// contains filtered or unexported fields
}

func (*Chapter) Descriptor deprecated

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

Deprecated: Use Chapter.ProtoReflect.Descriptor instead.

func (*Chapter) GetArabicTitle

func (x *Chapter) GetArabicTitle() string

func (*Chapter) GetBook

func (x *Chapter) GetBook() int32

func (*Chapter) GetId

func (x *Chapter) GetId() int32

func (*Chapter) GetKey

func (x *Chapter) GetKey() string

func (*Chapter) GetTitle

func (x *Chapter) GetTitle() string

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 {

	// name of the collection
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// number of the book
	Book int32 `protobuf:"varint,2,opt,name=book,proto3" json:"book,omitempty"`
	// The page in the pagination
	Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
	// Limit the number of chapters returned
	Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

Get all the chapters of a given book within a collection.

func (*ChaptersRequest) Descriptor deprecated

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

Deprecated: Use ChaptersRequest.ProtoReflect.Descriptor instead.

func (*ChaptersRequest) GetBook

func (x *ChaptersRequest) GetBook() int32

func (*ChaptersRequest) GetCollection

func (x *ChaptersRequest) GetCollection() string

func (*ChaptersRequest) GetLimit

func (x *ChaptersRequest) GetLimit() int32

func (*ChaptersRequest) GetPage

func (x *ChaptersRequest) GetPage() int32

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 {

	// name of the collection
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// number of the book
	Book int32 `protobuf:"varint,2,opt,name=book,proto3" json:"book,omitempty"`
	// The page in the pagination
	Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
	// Limit the number of chapters returned
	Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
	// Total chapters in the book
	Total int32 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"`
	// The chapters of the book
	Chapters []*Chapter `protobuf:"bytes,6,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) GetBook

func (x *ChaptersResponse) GetBook() int32

func (*ChaptersResponse) GetChapters

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

func (*ChaptersResponse) GetCollection

func (x *ChaptersResponse) GetCollection() string

func (*ChaptersResponse) GetLimit

func (x *ChaptersResponse) GetLimit() int32

func (*ChaptersResponse) GetPage

func (x *ChaptersResponse) GetPage() int32

func (*ChaptersResponse) GetTotal

func (x *ChaptersResponse) GetTotal() int32

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 Collection

type Collection struct {

	// Name of the collection e.g bukhari
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Title of the collection e.g Sahih al-Bukhari
	Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	// Arabic title if available
	ArabicTitle string `protobuf:"bytes,3,opt,name=arabic_title,json=arabicTitle,proto3" json:"arabic_title,omitempty"`
	// An introduction explaining the collection
	Summary string `protobuf:"bytes,4,opt,name=summary,proto3" json:"summary,omitempty"`
	// Total hadiths in the collection
	Hadiths int32 `protobuf:"varint,5,opt,name=hadiths,proto3" json:"hadiths,omitempty"`
	// contains filtered or unexported fields
}

func (*Collection) Descriptor deprecated

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

Deprecated: Use Collection.ProtoReflect.Descriptor instead.

func (*Collection) GetArabicTitle

func (x *Collection) GetArabicTitle() string

func (*Collection) GetHadiths

func (x *Collection) GetHadiths() int32

func (*Collection) GetName

func (x *Collection) GetName() string

func (*Collection) GetSummary

func (x *Collection) GetSummary() string

func (*Collection) GetTitle

func (x *Collection) GetTitle() string

func (*Collection) ProtoMessage

func (*Collection) ProtoMessage()

func (*Collection) ProtoReflect

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

func (*Collection) Reset

func (x *Collection) Reset()

func (*Collection) String

func (x *Collection) String() string

type CollectionsRequest

type CollectionsRequest struct {

	// The page in the pagination
	Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	// Number of collections to limit to
	Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

Get a list of available collections. A collection is a compilation of hadiths collected and written by an author.

func (*CollectionsRequest) Descriptor deprecated

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

Deprecated: Use CollectionsRequest.ProtoReflect.Descriptor instead.

func (*CollectionsRequest) GetLimit

func (x *CollectionsRequest) GetLimit() int32

func (*CollectionsRequest) GetPage

func (x *CollectionsRequest) GetPage() int32

func (*CollectionsRequest) ProtoMessage

func (*CollectionsRequest) ProtoMessage()

func (*CollectionsRequest) ProtoReflect

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

func (*CollectionsRequest) Reset

func (x *CollectionsRequest) Reset()

func (*CollectionsRequest) String

func (x *CollectionsRequest) String() string

type CollectionsResponse

type CollectionsResponse struct {
	Collections []*Collection `protobuf:"bytes,1,rep,name=collections,proto3" json:"collections,omitempty"`
	// contains filtered or unexported fields
}

func (*CollectionsResponse) Descriptor deprecated

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

Deprecated: Use CollectionsResponse.ProtoReflect.Descriptor instead.

func (*CollectionsResponse) GetCollections

func (x *CollectionsResponse) GetCollections() []*Collection

func (*CollectionsResponse) ProtoMessage

func (*CollectionsResponse) ProtoMessage()

func (*CollectionsResponse) ProtoReflect

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

func (*CollectionsResponse) Reset

func (x *CollectionsResponse) Reset()

func (*CollectionsResponse) String

func (x *CollectionsResponse) String() string

type Hadith

type Hadith struct {

	// hadith id
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// the chapter id
	Chapter int32 `protobuf:"varint,2,opt,name=chapter,proto3" json:"chapter,omitempty"`
	// the chapter key
	ChapterKey string `protobuf:"bytes,3,opt,name=chapter_key,json=chapterKey,proto3" json:"chapter_key,omitempty"`
	// the chapter title
	ChapterTitle string `protobuf:"bytes,4,opt,name=chapter_title,json=chapterTitle,proto3" json:"chapter_title,omitempty"`
	// the arabic chapter title
	ArabicChapterTitle string `protobuf:"bytes,5,opt,name=arabic_chapter_title,json=arabicChapterTitle,proto3" json:"arabic_chapter_title,omitempty"`
	// hadith text
	Text string `protobuf:"bytes,6,opt,name=text,proto3" json:"text,omitempty"`
	// the arabic text
	ArabicText string `protobuf:"bytes,7,opt,name=arabic_text,json=arabicText,proto3" json:"arabic_text,omitempty"`
	// contains filtered or unexported fields
}

func (*Hadith) Descriptor deprecated

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

Deprecated: Use Hadith.ProtoReflect.Descriptor instead.

func (*Hadith) GetArabicChapterTitle

func (x *Hadith) GetArabicChapterTitle() string

func (*Hadith) GetArabicText

func (x *Hadith) GetArabicText() string

func (*Hadith) GetChapter

func (x *Hadith) GetChapter() int32

func (*Hadith) GetChapterKey

func (x *Hadith) GetChapterKey() string

func (*Hadith) GetChapterTitle

func (x *Hadith) GetChapterTitle() string

func (*Hadith) GetId

func (x *Hadith) GetId() int32

func (*Hadith) GetText

func (x *Hadith) GetText() string

func (*Hadith) ProtoMessage

func (*Hadith) ProtoMessage()

func (*Hadith) ProtoReflect

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

func (*Hadith) Reset

func (x *Hadith) Reset()

func (*Hadith) String

func (x *Hadith) String() string

type HadithsRequest

type HadithsRequest struct {

	// name of the collection
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// number of the book
	Book int32 `protobuf:"varint,2,opt,name=book,proto3" json:"book,omitempty"`
	// The page in the pagination
	Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
	// Limit the number of hadiths
	Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

Hadiths returns a list of hadiths and their corresponding text for a given book within a collection.

func (*HadithsRequest) Descriptor deprecated

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

Deprecated: Use HadithsRequest.ProtoReflect.Descriptor instead.

func (*HadithsRequest) GetBook

func (x *HadithsRequest) GetBook() int32

func (*HadithsRequest) GetCollection

func (x *HadithsRequest) GetCollection() string

func (*HadithsRequest) GetLimit

func (x *HadithsRequest) GetLimit() int32

func (*HadithsRequest) GetPage

func (x *HadithsRequest) GetPage() int32

func (*HadithsRequest) ProtoMessage

func (*HadithsRequest) ProtoMessage()

func (*HadithsRequest) ProtoReflect

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

func (*HadithsRequest) Reset

func (x *HadithsRequest) Reset()

func (*HadithsRequest) String

func (x *HadithsRequest) String() string

type HadithsResponse

type HadithsResponse struct {

	// name of the collection
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// number of the book
	Book int32 `protobuf:"varint,2,opt,name=book,proto3" json:"book,omitempty"`
	// The page in the pagination
	Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
	// Limit the number of hadiths returned
	Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
	// Total hadiths in the  book
	Total int32 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"`
	// The hadiths of the book
	Hadiths []*Hadith `protobuf:"bytes,7,rep,name=hadiths,proto3" json:"hadiths,omitempty"`
	// contains filtered or unexported fields
}

func (*HadithsResponse) Descriptor deprecated

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

Deprecated: Use HadithsResponse.ProtoReflect.Descriptor instead.

func (*HadithsResponse) GetBook

func (x *HadithsResponse) GetBook() int32

func (*HadithsResponse) GetCollection

func (x *HadithsResponse) GetCollection() string

func (*HadithsResponse) GetHadiths

func (x *HadithsResponse) GetHadiths() []*Hadith

func (*HadithsResponse) GetLimit

func (x *HadithsResponse) GetLimit() int32

func (*HadithsResponse) GetPage

func (x *HadithsResponse) GetPage() int32

func (*HadithsResponse) GetTotal

func (x *HadithsResponse) GetTotal() int32

func (*HadithsResponse) ProtoMessage

func (*HadithsResponse) ProtoMessage()

func (*HadithsResponse) ProtoReflect

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

func (*HadithsResponse) Reset

func (x *HadithsResponse) Reset()

func (*HadithsResponse) String

func (x *HadithsResponse) String() string

type SunnahService

type SunnahService interface {
	Collections(ctx context.Context, in *CollectionsRequest, opts ...client.CallOption) (*CollectionsResponse, error)
	Books(ctx context.Context, in *BooksRequest, opts ...client.CallOption) (*BooksResponse, error)
	Chapters(ctx context.Context, in *ChaptersRequest, opts ...client.CallOption) (*ChaptersResponse, error)
	Hadiths(ctx context.Context, in *HadithsRequest, opts ...client.CallOption) (*HadithsResponse, error)
}

func NewSunnahService

func NewSunnahService(name string, c client.Client) SunnahService

Jump to

Keyboard shortcuts

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