Documentation ¶
Index ¶
- type Marshaller
- type Store
- func (s *Store) Close() error
- func (s *Store) Open(createIfNotExist bool) (err error)
- func (s *Store) ReadAll() ([][]string, error)
- func (s *Store) ReadAllStructs(v interface{}) error
- func (s *Store) Reader() *csv.Reader
- func (s *Store) WriteAll(records [][]string) error
- func (s *Store) WriteAllStructs(values []interface{}) error
- func (s *Store) Writer() *csv.Writer
- type Unmarshaller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Marshaller ¶
Marshaller is the interface implemented by types that can marshal themselves into valid CSV record.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store allows to store data in csv format
func (*Store) ReadAllStructs ¶
ReadAllStructs reads all CSV records from disk and set it into v It assumes v to be a pointer to a slice of object implementing the Unmarshaller interface
func (*Store) WriteAllStructs ¶
WriteAllStructs writes all values to disk It expects all values to implement Marshaller interface
type Unmarshaller ¶
Unmarshaler is the interface implemented by types that can unmarshal a CSV record description of themselves.
Click to show internal directories.
Click to hide internal directories.