usgs

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Descriptor = &core.ScriptDescriptor{
	Name:        "usgs",
	Description: "U.S. Geological Survey National Water Information System",
	Mode:        core.Batched,
	DefaultOptions: func() interface{} {
		return &optionsUSGS{
			BatchSize: 200,
		}
	},
	Factory: func(name string, options interface{}) (core.Script, error) {
		if opts, ok := options.(*optionsUSGS); ok {
			if opts.StateCD == "" {
				return nil, errors.New("state code must be provided")
			}
			return &scriptUSGS{
				name:    name,
				url:     "https://waterservices.usgs.gov/nwis",
				stateCd: opts.StateCD,
			}, nil
		}
		return nil, fmt.Errorf("failed to cast %T", optionsUSGS{})
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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