downloader

package
v0.0.0-...-71b52ef Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(url, outFilePath string) error

func DownloadFileBytes

func DownloadFileBytes(url string) ([]byte, error)

func DownloadZipsIfNotPresent

func DownloadZipsIfNotPresent(downloads []*DisclosureDownload) error

func GenerateAllZipUrls

func GenerateAllZipUrls() []string

func GenerateZipUrlForYear

func GenerateZipUrlForYear(year int) string

func GetTransactionReportMembers

func GetTransactionReportMembers(downloads []*DisclosureDownload, dataFolder string) ([]*model.Member, error)

GetTransactionReportMembers returns a slice of members that have transaction reports This is the list of Members for which to download PDF files

Types

type DisclosureDownload

type DisclosureDownload struct {
	Url          string
	FileName     string
	BaseFilePath string
	ZipPath      string
	XmlPath      string
	CsvPath      string
}

func NewDisclosureDownload

func NewDisclosureDownload(url, baseFolder string) *DisclosureDownload

func (*DisclosureDownload) Download

func (d *DisclosureDownload) Download() error

func (*DisclosureDownload) Extract

func (d *DisclosureDownload) Extract() error

func (*DisclosureDownload) ToString

func (d *DisclosureDownload) ToString() string

func (*DisclosureDownload) XmlIsPresent

func (d *DisclosureDownload) XmlIsPresent() bool

func (*DisclosureDownload) ZipIsPresent

func (d *DisclosureDownload) ZipIsPresent() bool

type Downloadable

type Downloadable struct {
	Url   string
	Bytes []byte
	Fp    string
}

func DownloadMultiple

func DownloadMultiple(values []*Downloadable) ([]*Downloadable, error)

func (*Downloadable) UpdateBytes

func (d *Downloadable) UpdateBytes(bytes []byte)

Jump to

Keyboard shortcuts

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