Documentation
¶
Overview ¶
package writer defines a common interface for recording geotag.GeotagFeature instances.
Index ¶
- Constants
- func GetIOWriterFromContext(ctx context.Context) (io.Writer, error)
- func RegisterWriter(ctx context.Context, scheme string, f WriterInitializeFunc) error
- func SetIOWriterWithContext(ctx context.Context, wr io.Writer) (context.Context, error)
- type IOWriter
- type MultiWriter
- type StdoutWriter
- type Writer
- type WriterInitializeFunc
Constants ¶
View Source
const IOWRITER_TARGET_KEY string = "github.com/sfomuseum/go-geojson-geotag#io_writer"
Variables ¶
This section is empty.
Functions ¶
func GetIOWriterFromContext ¶ added in v0.0.12
func RegisterWriter ¶
func RegisterWriter(ctx context.Context, scheme string, f WriterInitializeFunc) error
Types ¶
type MultiWriter ¶ added in v0.0.21
type MultiWriter struct {
Writer
// contains filtered or unexported fields
}
Type MultiWriter holds mutltiple Writer instances.
func (*MultiWriter) Close ¶ added in v0.0.21
func (mw *MultiWriter) Close(ctx context.Context) error
func (*MultiWriter) WriteFeature ¶ added in v0.0.21
func (mw *MultiWriter) WriteFeature(ctx context.Context, key string, f *geotag.GeotagFeature) error
type StdoutWriter ¶
type StdoutWriter struct {
Writer
}
func (*StdoutWriter) Close ¶ added in v0.0.16
func (wr *StdoutWriter) Close(ctx context.Context) error
func (*StdoutWriter) WriteFeature ¶
func (wr *StdoutWriter) WriteFeature(ctx context.Context, uri string, f *geotag.GeotagFeature) error
type Writer ¶
type Writer interface {
WriteFeature(context.Context, string, *geotag.GeotagFeature) error
Close(context.Context) error
}
func NewIOWriter ¶ added in v0.0.12
func NewMultiWriter ¶ added in v0.0.21
NewMultiWriter returns a Writer instance that will send all writes to each instance in 'writers'. Writes happen synchronolously in the order in which the underlying Writer instances are specified.
Click to show internal directories.
Click to hide internal directories.