akizuki

package
v0.0.0-...-c63cd5d Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultToot

func DefaultToot(config DefaultTootConfig) (func(text string, images []io.Reader) error, error)

func NewDefaultDetector

func NewDefaultDetector(databasePath string) (*defaultDetector, error)

func ScreenShotOneTakeScreenShot

func ScreenShotOneTakeScreenShot(config ScreenShotOneConfig) func(url string) (io.Reader, error)

Types

type AkizukiBot

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

func NewBot

func NewBot() (*AkizukiBot, error)

func (*AkizukiBot) RunOnce

func (b *AkizukiBot) RunOnce() error

func (*AkizukiBot) SetFormat

func (b *AkizukiBot) SetFormat(f func(item *Item) string) *AkizukiBot

func (*AkizukiBot) SetNewPageDetector

func (b *AkizukiBot) SetNewPageDetector(d NewPageDetector) *AkizukiBot

func (*AkizukiBot) SetParseCatalog

func (b *AkizukiBot) SetParseCatalog(f func() ([]string, error)) *AkizukiBot

func (*AkizukiBot) SetParseItem

func (b *AkizukiBot) SetParseItem(f func(url string) (*Item, error)) *AkizukiBot

func (*AkizukiBot) SetTakeScreenshot

func (b *AkizukiBot) SetTakeScreenshot(f func(url string) (io.Reader, error)) *AkizukiBot

func (*AkizukiBot) SetToot

func (b *AkizukiBot) SetToot(f func(text string, images []io.Reader) error) *AkizukiBot

func (*AkizukiBot) UpdateDB

func (b *AkizukiBot) UpdateDB() error

type DefaultTootConfig

type DefaultTootConfig struct {
	Server       string `yaml:"server"`
	ClientID     string `yaml:"id"`
	ClientSecret string `yaml:"secret"`
	Username     string `yaml:"mail"`
	Password     string `yaml:"pass"`
}

type Item

type Item struct {
	Url      string
	Name     string
	Price    string
	ItemCode string
	Images   []io.ReadCloser
}

type NewPageDetector

type NewPageDetector interface {
	NewPages(urls []string) ([]string, error)
	AddPages(urls []string) error
}

type ScreenShotOneConfig

type ScreenShotOneConfig struct {
	AccessKey string `yaml:"access"`
	SecretKey string `yaml:"secret"`
}

Jump to

Keyboard shortcuts

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