writer

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: BSD-3-Clause Imports: 9 Imported by: 2

Documentation

Index

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 GetIOWriterFromContext(ctx context.Context) (io.Writer, error)

func RegisterWriter

func RegisterWriter(ctx context.Context, scheme string, f WriterInitializeFunc) error

func SetIOWriterWithContext added in v0.0.12

func SetIOWriterWithContext(ctx context.Context, wr io.Writer) (context.Context, error)

Types

type IOWriter added in v0.0.12

type IOWriter struct {
	Writer
}

func (*IOWriter) Close added in v0.0.16

func (wr *IOWriter) Close(ctx context.Context) error

func (*IOWriter) WriteFeature added in v0.0.12

func (wr *IOWriter) WriteFeature(ctx context.Context, uri 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 NewIOWriter(ctx context.Context, uri string) (Writer, error)

func NewStdoutWriter

func NewStdoutWriter(ctx context.Context, uri string) (Writer, error)

func NewWriter

func NewWriter(ctx context.Context, uri string) (Writer, error)

type WriterInitializeFunc

type WriterInitializeFunc func(ctx context.Context, uri string) (Writer, error)

Jump to

Keyboard shortcuts

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