model

package
v0.0.0-...-9c4a2db Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

A Admin represents the singular of admin.

type Admins

type Admins []Admin

A Admins represents the plural of admin.

type Categories

type Categories []Category

A Categories represents the plural of category.

type Category

type Category struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

A Category represents the singular of category.

type Comment

type Comment struct {
	ID     int    `json:"id"`
	PostID int    `json:"post"`
	Body   string `json:"body"`
}

A Comment represents the singular of comment.

type Comments

type Comments []Comment

A Comments represents the plural of comment.

type Feed

type Feed struct {
	XMLName  xml.Name    `xml:"http://www.w3.org/2005/Atom feed"`
	Title    string      `xml:"title"`
	Subtitle string      `xml:"subtitle"`
	Link     FeedLink    `xml:"link"`
	Updated  time.Time   `xml:"updated"`
	Author   FeedAuthor  `xml:"author"`
	ID       string      `xml:"id"`
	Entries  []FeedEntry `xml:"entry"`
}

A Feed represents the singular of feed.

type FeedAuthor

type FeedAuthor struct {
	Name string `xml:"name"`
}

An FeedAuthor represents the singluar of author.

type FeedContent

type FeedContent struct {
	Type  string `xml:"type,attr"`
	CDATA string `xml:",cdata"`
}

A FeedContent represents the singular of content.

type FeedEntry

type FeedEntry struct {
	Title     string      `xml:"title"`
	Link      FeedLink    `xml:"link"`
	ID        string      `xml:"id"`
	Updated   time.Time   `xml:"updated"`
	Published time.Time   `xml:"published"`
	Author    FeedAuthor  `xml:"author"`
	Content   FeedContent `xml:"content"`
}

An FeedEntry represents the singular of entry.

type FeedLink struct {
	Href string `xml:"href,attr"`
}

A FeedLink represents the singular of link.

type Meta

type Meta struct {
	Title         string
	Canonical     string
	Description   string
	OGTitle       string
	OGDescription string
	OGURL         string
	OGType        string
	OGImage       string
	OGSiteName    string
	OGLocale      string
	TwitterCard   string
	TwitterSite   string
	NoIndex       bool
}

A Meta represents the singular of meta.

type Pagination

type Pagination struct {
	PaginationCount     int        `json:"pagination_count"`
	PaginationPageCount []struct{} `json:"pagination_pagecount"`
	PaginationPage      int        `json:"pagination_page"`
	PaginationLimit     int        `json:"pagination_limit"`
}

A Pagination represents the singular of pagination.

func (*Pagination) Convert

func (p *Pagination) Convert(header http.Header) error

Convert converts response header to pagination struct.

type Post

type Post struct {
	ID        int       `json:"id"`
	Admin     Admin     `json:"admin"`
	Category  Category  `json:"category"`
	Tags      Tags      `json:"tags"`
	Title     string    `json:"title"`
	MDBody    string    `json:"md_body"`
	HTMLBody  string    `json:"html_body"`
	Status    string    `json:"status"`
	Comments  Comments  `json:"comments"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

A Post represents the singular of post.

type Posts

type Posts []Post

A Posts represents the plural of post.

type Tag

type Tag struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

A Tag represetns the singular of tag.

type Tags

type Tags []Tag

A Tags represents the plural of tag.

type URL

type URL struct {
	Loc string `xml:"loc"`
}

URL represents the singular of url.

type URLSet

type URLSet struct {
	XMLName string `xml:"urlset"`
	Version string `xml:"xmlns,attr"`
	URLs    []URL  `xml:"url"`
}

A URLSet represents the singular of urlset.

Jump to

Keyboard shortcuts

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