marketplace

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBrowserNotAvailable   = errors.New("browser not available")
	ErrExtractionFailed      = errors.New("data extraction failed")
	ErrNavigationFailed      = errors.New("navigation failed")
	ErrScriptExecutionFailed = errors.New("script execution failed")
	ErrInvalidConfiguration  = errors.New("invalid configuration")
	ErrCacheOperationFailed  = errors.New("cache operation failed")
	ErrNoDataFound           = errors.New("no data found")
	ErrInvalidURL            = errors.New("invalid URL")
	ErrTimeout               = errors.New("operation timeout")
	ErrRateLimited           = errors.New("rate limited")
)

Common marketplace errors

Functions

func IsPermanent

func IsPermanent(err error) bool

IsPermanent checks if an error is permanent and should not be retried

func IsTemporary

func IsTemporary(err error) bool

IsTemporary checks if an error is temporary and can be retried

Types

type Agent

type Agent = types.Agent

type CacheConfig

type CacheConfig = types.CacheConfig

type Category

type Category = types.Category

Type aliases for backward compatibility and to avoid import cycles

type Container

type Container struct {
	Browser browser.Controller
	Cache   cache.Manager
	Service service.MarketplaceService
	Config  ContainerConfig
}

Container holds all marketplace dependencies

func NewContainer

func NewContainer(config ContainerConfig) (*Container, error)

NewContainer creates a new dependency injection container

func WithConfig

func WithConfig(config ContainerConfig) (*Container, error)

WithConfig creates a new container with custom configuration

func WithDefaults

func WithDefaults() (*Container, error)

WithDefaults creates a new container with default configuration

func (*Container) Close

func (c *Container) Close() error

Close cleans up container resources

type ContainerConfig

type ContainerConfig struct {
	BaseURL         string
	CacheEnabled    bool
	CacheTTLHours   int
	CacheMaxSizeMB  int64
	BrowserHeadless bool
	BrowserTimeout  int
	UserAgent       string
}

ContainerConfig holds configuration for the container

func DefaultContainerConfig

func DefaultContainerConfig() ContainerConfig

DefaultContainerConfig returns sensible defaults

type MarketplaceData

type MarketplaceData = types.MarketplaceData

type MarketplaceError

type MarketplaceError struct {
	Operation string
	URL       string
	Cause     error
}

MarketplaceError wraps errors with additional context

func NewError

func NewError(operation string, cause error) *MarketplaceError

NewError creates a new marketplace error

func NewErrorWithURL

func NewErrorWithURL(operation, url string, cause error) *MarketplaceError

NewErrorWithURL creates a new marketplace error with URL context

func (*MarketplaceError) Error

func (e *MarketplaceError) Error() string

func (*MarketplaceError) Unwrap

func (e *MarketplaceError) Unwrap() error

type Metrics

type Metrics = types.Metrics

type SearchOptions

type SearchOptions = types.SearchOptions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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