Versions in this module Expand all Collapse all v0 v0.8.0 Nov 20, 2022 Changes in this version + var ErrInvalidID = fmt.Errorf("c4 id does not match data") + var ErrNotImplemented = fmt.Errorf("not implemented") + type Folder string + func (f Folder) Create(id c4.ID) (io.WriteCloser, error) + func (f Folder) Open(id c4.ID) (io.ReadCloser, error) + func (f Folder) Remove(id c4.ID) error + type Logger struct + func NewLogger(s Store, log io.Writer, flags LoggerFlags) *Logger + func (l *Logger) Create(id c4.ID) (io.WriteCloser, error) + func (l *Logger) Open(id c4.ID) (io.ReadCloser, error) + func (l *Logger) Remove(id c4.ID) error + type LoggerFlags uint32 + const LogClose + const LogCreate + const LogEof + const LogError + const LogInvalidID + const LogOpen + const LogRead + const LogRemove + const LogWrite + type MAP map[c4.ID]string + func NewMap(m map[c4.ID]string) MAP + func (m MAP) Delete(id c4.ID) + func (m MAP) Load(id c4.ID) (path string) + func (m MAP) LoadOrStore(id c4.ID, path string) (actual string, loaded bool) + func (m MAP) Range(f func(id c4.ID, path string) bool) + func (s MAP) Create(id c4.ID) (io.WriteCloser, error) + func (s MAP) Open(id c4.ID) (io.ReadCloser, error) + func (s MAP) Remove(id c4.ID) error + type RAM map[c4.ID][]byte + func NewRAM() *RAM + func (s *RAM) Create(id c4.ID) (io.WriteCloser, error) + func (s *RAM) Open(id c4.ID) (io.ReadCloser, error) + func (s *RAM) Remove(id c4.ID) error + type Sink interface + Create func(id c4.ID) (io.WriteCloser, error) + type Source interface + Open func(id c4.ID) (io.ReadCloser, error) + type Store interface + Remove func(id c4.ID) error + type Validating struct + func NewValidating(s Store) *Validating + func (v *Validating) Create(id c4.ID) (io.WriteCloser, error) + func (v *Validating) Open(id c4.ID) (io.ReadCloser, error) + func (v *Validating) Remove(id c4.ID) error