screenshot

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Screenshot

type Screenshot struct {
	Name      string    `json:"name"`
	Url       url.URL   `json:"url"`
	Type      string    `json:"type"`
	CreatedAt time.Time `json:"created_at"`
	Buf       []byte    `json:"buf"`
}

func GetScreenshot

func GetScreenshot(site sites.Site) (s Screenshot, err error)

func (Screenshot) Id

func (s Screenshot) Id() string

type Service

type Service interface {
	Set(task Task) error
	Tasks() []scheduletasks.TaskMetadata
}

func Init

func Init(s stream.Stream, consBuild consensus.ConsBuilderFunc, st Store, cryptoKey log.RedactedString, ctx context.Context) (out Service, err error)

type Store

type Store interface {
	Set(Screenshot) error
	Get(string) (Screenshot, error)
}

func InitStore

func InitStore(serv webserver.Server, s stream.Stream, cryptoKey log.RedactedString, ctx context.Context) (out Store, err error)

type Task

type Task struct {
	Site     sites.Site    `json:"site"`
	Time     time.Time     `json:"time"`
	Interval time.Duration `json:"interval"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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