database

package
v0.0.0-...-b1561c4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDB

func GetDB() *sqlx.DB

Types

type Link struct {
	ID               int
	TitleSlug        string `db:"title_slug""`
	Year, Month, Day int
	Title            string `db:"post_title"`
}
func GetRecentLinks() ([]Link, error)
func (l *Link) GemtextLink() string

type Post

type Post struct {
	ID               int
	Title            string `db:"post_title"`
	Content          string
	Date             string
	MarkdownContent  string         `db:"markdown_content"`
	GemtextContent   sql.NullString `db:"gemtext_content"`
	TitleSlug        string         `db:"title_slug"`
	Year, Month, Day int
}

func GetPost

func GetPost(id int) (*Post, error)

func (*Post) GemtextPage

func (p *Post) GemtextPage() string

Jump to

Keyboard shortcuts

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