Documentation ¶
Index ¶
- type Article
- type ArticleSummary
- type Catechism
- func (c *Catechism) GetArticle(partNumber, articleNumber int) (*Article, error)
- func (c *Catechism) GetParagraph(partNumber, articleNumber, sectionNumber, paragraphNumber int) (*Paragraph, error)
- func (c *Catechism) GetPart(partNumber int) (*Part, error)
- func (c *Catechism) GetSection(partNumber, articleNumber, sectionNumber int) (*Section, error)
- func (c *Catechism) Search(query string, maxResults int) []SearchNode
- type Paragraph
- type Part
- type PartSummary
- type SearchNode
- type Section
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { Title string `json:"title"` ArticleNumber uint8 `json:"articleNumber"` Sections []Section `json:"sections"` }
Article contains a list of sections
type ArticleSummary ¶
type ArticleSummary struct { Title string `json:"title"` ArticleNumber uint8 `json:"articleNumber"` }
ArticleSummary contains metadata for an article
type Catechism ¶
type Catechism struct { Parts []Part `json:"-"` PartSummary []PartSummary `json:"parts"` // contains filtered or unexported fields }
Catechism contains a list of parts
func NewCatechism ¶
func NewCatechism() *Catechism
NewCatechism parses and creates a new catechism instance
func (*Catechism) GetArticle ¶
GetArticle obtains an article within the catechism by its number
func (*Catechism) GetParagraph ¶
func (c *Catechism) GetParagraph(partNumber, articleNumber, sectionNumber, paragraphNumber int) (*Paragraph, error)
GetParagraph obtains a paragraph within the catechism by its number
func (*Catechism) GetSection ¶
GetSection obtains a section within the catechism by its number
type Part ¶
type Part struct { Title string `json:"title"` PartNumber uint8 `json:"partNumber"` Articles []Article `json:"articles"` }
Part contains a list of articles
type PartSummary ¶
type PartSummary struct { Title string `json:"title"` PartNumber uint8 `json:"partNumber"` Articles []ArticleSummary `json:"articles"` }
PartSummary contains metadata for a part
type SearchNode ¶
SearchNode represents a search result for a given paragraph inquiry
func (*SearchNode) String ¶
func (s *SearchNode) String() string
String creates a string representation for the SearchNode, ex. Part 1, Article 1, Section 1, Paragraph 1
Click to show internal directories.
Click to hide internal directories.