uspto

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceID   = "uspto-odp"
	SourceName = "USPTO ODP"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter implements the sources.Adapter interface for USPTO ODP

func New

func New() *Adapter

New creates a new USPTO ODP adapter

func (*Adapter) Configure added in v0.1.5

func (a *Adapter) Configure(cfg sources.AdapterConfig)

Configure applies runtime configuration from the application

func (*Adapter) CredentialFields

func (a *Adapter) CredentialFields() []sources.CredentialField

CredentialFields returns the required credential fields

func (*Adapter) DownloadFile

func (a *Adapter) DownloadFile(ctx context.Context, file sources.FileInfo, dst io.Writer, progress sources.ProgressFunc) error

DownloadFile downloads a file

func (*Adapter) FetchDeliveries

func (a *Adapter) FetchDeliveries(ctx context.Context, productID string) ([]sources.DeliveryInfo, error)

FetchDeliveries fetches deliveries for a product USPTO doesn't have a delivery concept, so we synthesize one from the product

func (*Adapter) FetchFiles

func (a *Adapter) FetchFiles(ctx context.Context, productID, deliveryID string) ([]sources.FileInfo, error)

FetchFiles fetches files for a delivery

func (*Adapter) FetchProducts

func (a *Adapter) FetchProducts(ctx context.Context) ([]sources.ProductInfo, error)

FetchProducts fetches all available bulk products

func (*Adapter) ID

func (a *Adapter) ID() string

ID returns the source identifier

func (*Adapter) Name

func (a *Adapter) Name() string

Name returns the human-readable source name

func (*Adapter) SetCredentials

func (a *Adapter) SetCredentials(creds map[string]string)

SetCredentials sets the credentials for the adapter

func (*Adapter) ValidateCredentials

func (a *Adapter) ValidateCredentials(ctx context.Context) error

ValidateCredentials tests if the credentials are valid

Jump to

Keyboard shortcuts

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