file

package
v0.0.0-...-11a205f Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	FilePath   string `json:"file_path"`
	FileFormat string `json:"file_format"`
	Compress   bool   `json:"compress"`
}

Local file configuration

func (*Config) IsValid

func (c *Config) IsValid() bool

Checks is it valid or not

func (*Config) NewClient

func (c *Config) NewClient() (dialects.StorageClient, error)

Create a new StorageClient object based on a configuration file.

type FileStorage

type FileStorage struct {
	FilePath       string
	FileFormat     string
	Compress       bool
	BatchConverter dialects.BatchConverter
}

FileStorage's dialect.

func (*FileStorage) GetBatchConverter

func (c *FileStorage) GetBatchConverter() dialects.BatchConverter

Returns the batch converter function

func (*FileStorage) GetBuffer

func (c *FileStorage) GetBuffer(msg *bytes.Buffer) (*bytes.Buffer, error)

func (*FileStorage) GetConverter

func (c *FileStorage) GetConverter() dialects.Converter

Returns the converter function

func (*FileStorage) IsBufferedStorage

func (c *FileStorage) IsBufferedStorage() bool

It is a buffered storage.

func (*FileStorage) Save

func (c *FileStorage) Save(msg *bytes.Buffer) error

Write a single local file with multiple records

Jump to

Keyboard shortcuts

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