domain

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

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

func NewImage

func NewImage(filepath string) (Image, error)

func (Image) Extension

func (i Image) Extension() string

func (Image) IsGif

func (i Image) IsGif() bool

func (Image) IsNotPresentIn

func (i Image) IsNotPresentIn(listOfReferences []string) bool

func (Image) Path

func (i Image) Path() string

type ImageRepository

type ImageRepository interface {
	Load() ([]string, error)
	Delete(Image) error
	ConvertToWebp([]Image) error
}

type Path

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

func NewPath

func NewPath(filepath string) (Path, error)

func (Path) Value

func (n Path) Value() string

type Post

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

func NewPost

func NewPost(filepath string, rawContent []byte) (Post, error)

func (Post) Content

func (p Post) Content() string

func (Post) Path

func (p Post) Path() string

func (Post) ReferencedImagePaths

func (p Post) ReferencedImagePaths() []string

func (*Post) UpdateImageReferences

func (p *Post) UpdateImageReferences()

type PostRepository

type PostRepository interface {
	Load() (map[string][]byte, error)
	Write(Post) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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