base

package
v0.0.0-...-5f6f5d1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WritePerm = 0o600
	DataPath  = "./data"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection map[string]RecipeBank

type Post

type Post struct {
	ID             int64    `json:"id"`
	Author         string   `json:"-"`
	ThumbnailURL   string   `json:"thumbnail"`
	ImageURL       string   `json:"image"`
	Title          string   `json:"title"`
	HasDescription bool     `json:"-"`
	Description    string   `json:"desc"`
	URL            string   `json:"url"`
	Hashtags       []string `json:"hashtags"`
	Added          bool     `json:"-"`
}

func LoadExistingPosts

func LoadExistingPosts(recipesFilePath string) (posts []Post, maxID int64)

func (*Post) DescriptionQuote

func (p *Post) DescriptionQuote() string

func (*Post) IsValid

func (p *Post) IsValid() bool

func (*Post) MediumSummary

func (p *Post) MediumSummary() string

func (*Post) ShortSummary

func (p *Post) ShortSummary() string

func (*Post) Summary

func (p *Post) Summary() string

type RecipeBank

type RecipeBank struct {
	Posts       []Post
	UsedIDsPath string
}

Jump to

Keyboard shortcuts

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