feedstorage

package
v0.0.0-...-bcb87c1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type Interface

type Interface interface {
	// Store stores the feed bytes in storage.
	Store(ctx context.Context, feedId int64, body []byte) error
	// Fetch fetches the feed from storage and returns the bytes.
	// If the feed is not stored, return ErrNotFound as the error.
	Fetch(ctx context.Context, feedId int64) ([]byte, error)
}

type Storage

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

func New

func New(ctx context.Context, cfg config.Config) (*Storage, error)

func (*Storage) Fetch

func (s *Storage) Fetch(ctx context.Context, feedId int64) ([]byte, error)

func (*Storage) S3Client

func (s *Storage) S3Client() *s3.Client

func (*Storage) Store

func (s *Storage) Store(ctx context.Context, feedId int64, body []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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