db

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func New

func New(path string) (*Conn, error)

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) GetSurahById

func (c *Conn) GetSurahById(id int) (*Surah, error)

func (*Conn) GetSurahByName

func (c *Conn) GetSurahByName(name string) (*Surah, error)

func (*Conn) GetSurahByNameLike

func (c *Conn) GetSurahByNameLike(name string) (*Surah, error)

func (*Conn) InitFromFile

func (c *Conn) InitFromFile(file string) error

func (*Conn) InitFromReader

func (c *Conn) InitFromReader(r io.Reader) error

type Surah

type Surah struct {
	Id              int     `json:"id"`
	Name            string  `json:"name"`
	Transliteration string  `json:"transliteration"`
	Translation     string  `json:"translation"`
	Type            string  `json:"type"`
	TotalVerses     int     `json:"total_verses"`
	Verses          []Verse `json:"verses"`
}

type Verse

type Verse struct {
	Id          int    `json:"id"`
	Text        string `json:"text"`
	Translation string `json:"translation"`
}

Jump to

Keyboard shortcuts

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