models

package
v0.0.0-...-faaa73c Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Username    string `json:"username"`
	Name        string `json:"name"`
	Tagline     string `json:"tagLine"`
	Photo       string `json:"photo"`
	SocialMedia struct {
		Twitter       string `json:"twitter"`
		Github        string `json:"github"`
		Stackoverflow string `json:"stackoverflow"`
		Linkedin      string `json:"linkedin"`
		Google        string `json:"google"`
		Website       string `json:"website"`
		Facebook      string `json:"facebook"`
	} `json:"socialMedia"`
}

func (Author) GetDateUpdated

func (a Author) GetDateUpdated() string

func (Author) GetImages

func (a Author) GetImages(cfg *config.Configuration) []Image

func (Author) GetSlug

func (a Author) GetSlug() string

func (Author) GetUrl

func (a Author) GetUrl(cfg *config.Configuration) string

func (*Author) ReplaceImagePaths

func (a *Author) ReplaceImagePaths(cfg *config.Configuration)

type Bloggable

type Bloggable interface {
	GetSlug() string
	GetImages(*config.Configuration) []Image
	GetDateUpdated() string
	GetUrl(*config.Configuration) string
}

type Fileable

type Fileable interface {
	GetOrigin() string
	GetDestination() string
}

type Image

type Image struct {
	Origin, Destination string
}

func (Image) GetDestination

func (i Image) GetDestination() string

func (Image) GetOrigin

func (i Image) GetOrigin() string

type Post

type Post struct {
	Title       string `json:"title"`
	Slug        string `json:"slug"`
	DateAdded   string `json:"dateAdded"`
	DateUpdated string `json:"dateUpdated"`
	CUID        string `json:"cuid"`
	Type        string `json:"type"`
	Content     string `json:"content"`
	Brief       string `json:"brief"`
	CoverImage  string `json:"coverImage"`
	Tags        []Tag  `json:"tags,omitempty"`
	Author      *Author
}

func (Post) GetDateUpdated

func (p Post) GetDateUpdated() string

func (Post) GetImages

func (p Post) GetImages(cfg *config.Configuration) []Image

func (Post) GetSlug

func (p Post) GetSlug() string

func (Post) GetUrl

func (p Post) GetUrl(cfg *config.Configuration) string

func (*Post) ReplaceImagePaths

func (p *Post) ReplaceImagePaths(cfg *config.Configuration)

type Tag

type Tag struct {
	Name  string  `json:"name"`
	Slug  string  `json:"slug"`
	Count int     `json:"count,omitempty"`
	Posts []*Post `json:"posts,omitempty"`
}

func (Tag) GetDateUpdated

func (t Tag) GetDateUpdated() string

func (Tag) GetImages

func (t Tag) GetImages(cfg *config.Configuration) []Image

func (Tag) GetSlug

func (t Tag) GetSlug() string

func (Tag) GetUrl

func (t Tag) GetUrl(cfg *config.Configuration) string

Jump to

Keyboard shortcuts

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