marvel

package
v0.0.0-...-c693a81 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache[T any] struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache[T any]() *Cache[T]

func (*Cache[T]) Delete

func (c *Cache[T]) Delete(key string)

func (*Cache[T]) Get

func (c *Cache[T]) Get(key string) (T, bool)

func (*Cache[T]) Has

func (c *Cache[T]) Has(key string) bool

func (*Cache[T]) Put

func (c *Cache[T]) Put(key string, val T)

type Client

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

func New

func New(cfg *Config) *Client

func (*Client) GetComic

func (c *Client) GetComic(ctx context.Context, id int) (comicshelf.Comic, error)

func (*Client) GetComicsWithinSeries

func (c *Client) GetComicsWithinSeries(ctx context.Context, id int) ([]comicshelf.Comic, error)

func (*Client) GetSeries

func (c *Client) GetSeries(ctx context.Context, id int) (comicshelf.Series, error)

func (*Client) GetWeeklyComics

func (c *Client) GetWeeklyComics(ctx context.Context, t time.Time) (comicshelf.Page[comicshelf.Comic], error)

type Config

type Config struct {
	Client        comicclient.Config `mapstructure:"client"`
	DateLayout    string             `mapstructure:"date_layout"`
	ReleaseOffset int                `mapstructure:"release_offset"`
}

Jump to

Keyboard shortcuts

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