Documentation ¶
Index ¶
Constants ¶
View Source
const ( ProtoStdout = "-" ProtoTruncate = "file://" ProtoPrepend = "prepend://" )
Variables ¶
View Source
var Newline = []byte{'\n'}
Functions ¶
Types ¶
type EntityDeserializer ¶
type EntityIOReader ¶
type EntityIOReader struct {
// contains filtered or unexported fields
}
func NewEntityIOReader ¶
func NewEntityIOReader(readers IOFactory, deserializer EntityDeserializer) *EntityIOReader
func (*EntityIOReader) Read ¶
func (w *EntityIOReader) Read(path string) (entity interface{}, err error)
type EntityIOWriter ¶
type EntityIOWriter struct {
// contains filtered or unexported fields
}
func NewEntityIOWriter ¶
func NewEntityIOWriter(writers IOFactory, serializer EntitySerializer) *EntityIOWriter
func (*EntityIOWriter) Write ¶
func (w *EntityIOWriter) Write(entity interface{}, path string) (err error)
type EntityReader ¶
type EntitySerializer ¶
type EntityWriter ¶
type FilePrepender ¶
type FilePrepender struct { File string Perm os.FileMode // contains filtered or unexported fields }
func OpenFilePrepender ¶
func OpenFilePrepender(file string, perm os.FileMode) (prepender *FilePrepender, err error)
func (*FilePrepender) Close ¶
func (p *FilePrepender) Close() (err error)
type IOFactory ¶
type IOFactory interface { Reader(string) (sysio.ReadCloser, error) Writer(string) (sysio.WriteCloser, error) }
type OsIOFactory ¶
func NewOsIOFactory ¶
func NewOsIOFactory(fileMode os.FileMode) *OsIOFactory
func (*OsIOFactory) Reader ¶
func (f *OsIOFactory) Reader(source string) (sysio.ReadCloser, error)
func (*OsIOFactory) Writer ¶
func (f *OsIOFactory) Writer(target string) (sysio.WriteCloser, error)
Click to show internal directories.
Click to hide internal directories.