s9y

package
v0.0.0-...-912e3f2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	ID                  int64          `db:"id"`
	Title               string         `db:"title"`
	Timestamp           int64          `db:"timestamp"`
	Body                string         `db:"body"`
	Extended            string         `db:"extended"`
	Author              string         `db:"author"`
	IsDraft             bool           `db:"isdraft"`
	ExFlag              bool           `db:"exflag"`
	LastModified        int64          `db:"last_modified"`
	Permalink           string         `db:"permalink"`
	CategoryName        sql.NullString `db:"category_name"`
	CategoryDescription sql.NullString `db:"category_description"`
	CategoryLink        sql.NullString `db:"category_link"`
	Tags                []EntryTag
}

func (Entry) DateModified

func (e Entry) DateModified() string

returns the last_modified field (formatted) for the entry

func (Entry) DatePublished

func (e Entry) DatePublished() string

returns the timestamp field (publish date) for the entry

func (Entry) URL

func (e Entry) URL() string

re-create the old URL, used for files and alias

type EntryTag

type EntryTag struct {
	EntryID int64  `db:"entryid"`
	Tag     string `db:"tag"`
}

type S9Y

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

func New

func New(db *sqlx.DB, prefix string) *S9Y

create a s9y 'object'

func (*S9Y) Entries

func (s *S9Y) Entries(blogUrl string) ([]Entry, error)

Jump to

Keyboard shortcuts

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