Documentation ¶
Index ¶
- Variables
- func ByteCountSI(b int64) string
- func CanWrite(path string) bool
- func Exists(path string) bool
- func FetchConcurrent(reqs chan DownloadRequest, fetcherFactory FetcherFactory, concurrency int) (chan DownloadResult, error)
- func FetchConcurrentWithContext(ctx context.Context, reqs chan DownloadRequest, fetcherFactory FetcherFactory, ...) (chan DownloadResult, error)
- func IsDir(path string) bool
- func ResolveEDLToken(token string) string
- func SplitChecksum(s string) (string, string, error)
- type CMRError
- type CMRSearchAPI
- func (api *CMRSearchAPI) Get(ctx context.Context, url string) (ScrollResult[gjson.Result], error)
- func (api *CMRSearchAPI) SearchCollections(ctx context.Context, params *SearchCollectionParams) (ScrollResult[Collection], error)
- func (api *CMRSearchAPI) SearchFacets(ctx context.Context, val string, types []string) (ScrollResult[Facet], error)
- func (api *CMRSearchAPI) SearchGranules(ctx context.Context, params *SearchGranuleParams) (ScrollResult[Granule], error)
- type Collection
- type CollectionItem
- type CollectionResult
- type DownloadRequest
- type DownloadResult
- type Facet
- type FailedDownload
- type FetchError
- type FetchPoolFunc
- type Fetcher
- type FetcherFactory
- type Granule
- type GranuleResult
- type HTTPFetcher
- type Provider
- type ProviderCollection
- type ScrollResult
- type SearchCollectionParams
- func (p *SearchCollectionParams) CloudHosted(b bool) *SearchCollectionParams
- func (p *SearchCollectionParams) DataType(val string) *SearchCollectionParams
- func (p *SearchCollectionParams) GranulesAdded(tr TimeRange) *SearchCollectionParams
- func (p *SearchCollectionParams) HasGranules(b bool) *SearchCollectionParams
- func (p *SearchCollectionParams) Instruments(names ...string) *SearchCollectionParams
- func (p *SearchCollectionParams) Keyword(kw string) *SearchCollectionParams
- func (p *SearchCollectionParams) Platforms(names ...string) *SearchCollectionParams
- func (p *SearchCollectionParams) Providers(names ...string) *SearchCollectionParams
- func (p *SearchCollectionParams) ShortNames(names ...string) *SearchCollectionParams
- func (p *SearchCollectionParams) SortBy(field string) *SearchCollectionParams
- func (p *SearchCollectionParams) Standard(b bool) *SearchCollectionParams
- func (p *SearchCollectionParams) Title(pattern string) *SearchCollectionParams
- func (p *SearchCollectionParams) UpdatedSince(t time.Time) *SearchCollectionParams
- type SearchGranuleParams
- func (p *SearchGranuleParams) BoundingBox(vals []float64) *SearchGranuleParams
- func (p *SearchGranuleParams) Circle(vals []float64) *SearchGranuleParams
- func (p *SearchGranuleParams) Collections(id ...string) *SearchGranuleParams
- func (p *SearchGranuleParams) DayNightFlag(name string) *SearchGranuleParams
- func (p *SearchGranuleParams) Filenames(name ...string) *SearchGranuleParams
- func (p *SearchGranuleParams) NativeIDs(id ...string) *SearchGranuleParams
- func (p *SearchGranuleParams) Point(vals []float64) *SearchGranuleParams
- func (p *SearchGranuleParams) Polygon(vals []float64) *SearchGranuleParams
- func (p *SearchGranuleParams) ShortNames(name ...string) *SearchGranuleParams
- func (p *SearchGranuleParams) Timerange(start time.Time, end *time.Time) *SearchGranuleParams
- type TimeRange
- type TimeRangeValue
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "??" Commit = "??" CommitDate = "??" TreeState = "??" )
Set via ldflags
Functions ¶
func FetchConcurrent ¶
func FetchConcurrent(reqs chan DownloadRequest, fetcherFactory FetcherFactory, concurrency int) (chan DownloadResult, error)
func FetchConcurrentWithContext ¶
func FetchConcurrentWithContext(ctx context.Context, reqs chan DownloadRequest, fetcherFactory FetcherFactory, concurrency int) (chan DownloadResult, error)
func ResolveEDLToken ¶ added in v0.4.0
Types ¶
type CMRSearchAPI ¶
type CMRSearchAPI struct {
// contains filtered or unexported fields
}
func NewCMRSearchAPI ¶
func NewCMRSearchAPI(logger *log.Logger) *CMRSearchAPI
func (*CMRSearchAPI) Get ¶
func (api *CMRSearchAPI) Get(ctx context.Context, url string) (ScrollResult[gjson.Result], error)
func (*CMRSearchAPI) SearchCollections ¶
func (api *CMRSearchAPI) SearchCollections(ctx context.Context, params *SearchCollectionParams) (ScrollResult[Collection], error)
func (*CMRSearchAPI) SearchFacets ¶ added in v0.2.1
func (api *CMRSearchAPI) SearchFacets(ctx context.Context, val string, types []string) (ScrollResult[Facet], error)
func (*CMRSearchAPI) SearchGranules ¶
func (api *CMRSearchAPI) SearchGranules(ctx context.Context, params *SearchGranuleParams) (ScrollResult[Granule], error)
type Collection ¶
type CollectionItem ¶ added in v0.3.0
type CollectionResult ¶
type CollectionResult = ScrollResult[Collection]
type DownloadRequest ¶
type DownloadResult ¶
type FailedDownload ¶ added in v0.2.2
func (*FailedDownload) Error ¶ added in v0.2.2
func (e *FailedDownload) Error() string
type FetchError ¶
type FetchError struct { Request DownloadRequest Err error }
func (*FetchError) Error ¶
func (e *FetchError) Error() string
type FetchPoolFunc ¶
type FetchPoolFunc = func(reqs chan DownloadRequest, concurrency int) (chan DownloadResult, error)
type FetcherFactory ¶ added in v0.2.2
type Granule ¶
type Granule struct { Name string `json:"name"` Size string `json:"size"` Checksum string `json:"checksum"` ChecksumAlg string `json:"checksum_alg"` GetDataURL string `json:"download_url"` GetDataDAURL string `json:"download_direct_url"` NativeID string `json:"native_id"` RevisionID string `json:"revision_id"` ConceptID string `json:"concept_id"` Collection string `json:"collection"` DayNightFlag string `json:"daynight"` TimeRange []string `json:"timerange"` BoundingBox []string `json:"boundingbox"` ProviderDates map[string]string `json:"provider_dates"` }
type GranuleResult ¶
type GranuleResult = ScrollResult[Granule]
type HTTPFetcher ¶
type HTTPFetcher struct {
// contains filtered or unexported fields
}
HTTPFetch is a Fetcher that supports basic file fetching. It supports netrc for authentication redirects and uses an in-memory cookie jar to save authentication cookies provided by authentication services such as NASA Einternal.
func NewHTTPFetcher ¶
func NewHTTPFetcher(netrc bool, edlToken string) (*HTTPFetcher, error)
type Provider ¶ added in v0.3.0
type Provider struct { ID string Collections []CollectionItem GranuleCount int64 }
func GetProviderHoldings ¶ added in v0.3.0
type ProviderCollection ¶ added in v0.3.0
type ProviderCollection struct { }
type ScrollResult ¶
type ScrollResult[T Granule | Collection | gjson.Result | Facet] struct { Ch chan T // contains filtered or unexported fields }
func (*ScrollResult[T]) Err ¶
func (r *ScrollResult[T]) Err() error
func (ScrollResult[T]) Hits ¶
func (r ScrollResult[T]) Hits() int
type SearchCollectionParams ¶
type SearchCollectionParams struct {
// contains filtered or unexported fields
}
SearchCollectionParams is a builder for collection search query params
func NewSearchCollectionParams ¶
func NewSearchCollectionParams() *SearchCollectionParams
func (*SearchCollectionParams) CloudHosted ¶
func (p *SearchCollectionParams) CloudHosted(b bool) *SearchCollectionParams
func (*SearchCollectionParams) DataType ¶ added in v0.2.2
func (p *SearchCollectionParams) DataType(val string) *SearchCollectionParams
func (*SearchCollectionParams) GranulesAdded ¶
func (p *SearchCollectionParams) GranulesAdded(tr TimeRange) *SearchCollectionParams
func (*SearchCollectionParams) HasGranules ¶
func (p *SearchCollectionParams) HasGranules(b bool) *SearchCollectionParams
func (*SearchCollectionParams) Instruments ¶
func (p *SearchCollectionParams) Instruments(names ...string) *SearchCollectionParams
func (*SearchCollectionParams) Keyword ¶
func (p *SearchCollectionParams) Keyword(kw string) *SearchCollectionParams
func (*SearchCollectionParams) Platforms ¶
func (p *SearchCollectionParams) Platforms(names ...string) *SearchCollectionParams
func (*SearchCollectionParams) Providers ¶
func (p *SearchCollectionParams) Providers(names ...string) *SearchCollectionParams
func (*SearchCollectionParams) ShortNames ¶ added in v0.2.1
func (p *SearchCollectionParams) ShortNames(names ...string) *SearchCollectionParams
func (*SearchCollectionParams) SortBy ¶
func (p *SearchCollectionParams) SortBy(field string) *SearchCollectionParams
func (*SearchCollectionParams) Standard ¶
func (p *SearchCollectionParams) Standard(b bool) *SearchCollectionParams
func (*SearchCollectionParams) Title ¶
func (p *SearchCollectionParams) Title(pattern string) *SearchCollectionParams
func (*SearchCollectionParams) UpdatedSince ¶
func (p *SearchCollectionParams) UpdatedSince(t time.Time) *SearchCollectionParams
type SearchGranuleParams ¶
type SearchGranuleParams struct {
// contains filtered or unexported fields
}
SearchGranuleParams is a builder for collection search query params
func NewSearchGranuleParams ¶
func NewSearchGranuleParams() *SearchGranuleParams
func (*SearchGranuleParams) BoundingBox ¶
func (p *SearchGranuleParams) BoundingBox(vals []float64) *SearchGranuleParams
func (*SearchGranuleParams) Circle ¶
func (p *SearchGranuleParams) Circle(vals []float64) *SearchGranuleParams
func (*SearchGranuleParams) Collections ¶ added in v0.2.2
func (p *SearchGranuleParams) Collections(id ...string) *SearchGranuleParams
func (*SearchGranuleParams) DayNightFlag ¶
func (p *SearchGranuleParams) DayNightFlag(name string) *SearchGranuleParams
func (*SearchGranuleParams) Filenames ¶ added in v0.2.2
func (p *SearchGranuleParams) Filenames(name ...string) *SearchGranuleParams
func (*SearchGranuleParams) NativeIDs ¶ added in v0.2.2
func (p *SearchGranuleParams) NativeIDs(id ...string) *SearchGranuleParams
func (*SearchGranuleParams) Point ¶
func (p *SearchGranuleParams) Point(vals []float64) *SearchGranuleParams
func (*SearchGranuleParams) Polygon ¶
func (p *SearchGranuleParams) Polygon(vals []float64) *SearchGranuleParams
func (*SearchGranuleParams) ShortNames ¶ added in v0.2.2
func (p *SearchGranuleParams) ShortNames(name ...string) *SearchGranuleParams
func (*SearchGranuleParams) Timerange ¶
func (p *SearchGranuleParams) Timerange(start time.Time, end *time.Time) *SearchGranuleParams
type TimeRangeValue ¶
func (*TimeRangeValue) Set ¶
func (tr *TimeRangeValue) Set(val string) error
func (*TimeRangeValue) String ¶
func (v *TimeRangeValue) String() string
func (*TimeRangeValue) Type ¶
func (v *TimeRangeValue) Type() string
Click to show internal directories.
Click to hide internal directories.