friends

package
v1.0.1-0...-5011f7a Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheKey

type CacheKey struct {
	PostID     int
	FaviconURL string
}

func CacheKeyFromString

func CacheKeyFromString(s string) CacheKey

func (CacheKey) String

func (k CacheKey) String() string

type CacheValue

type CacheValue struct {
	ContentType string
	Content     []byte
}

type Friend

type Friend struct {
	Name        string `yaml:"name"`
	URL         string `yaml:"url"`
	Description string `yaml:"description"`

	// 日夜共用 & 日夜分开
	Icon  string    `yaml:"icon"`
	Icons [2]string `yaml:"icons"`
	// contains filtered or unexported fields
}

func (Friend) DarkDataURL

func (f Friend) DarkDataURL() template.URL

func (Friend) LightDataURL

func (f Friend) LightDataURL() template.URL

type Friends

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

func New

func New(task *Task, postID int, options ...Option) *Friends

func (*Friends) TransformHtml

func (f *Friends) TransformHtml(doc *goquery.Document) error

type Option

type Option func(f *Friends)

type Task

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

func NewTask

func NewTask(storage utils.PluginStorage, invalidate func(postID int)) *Task

func (*Task) Get

func (t *Task) Get(postID int, faviconURL string) (string, []byte, bool)

Jump to

Keyboard shortcuts

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