Documentation
¶
Index ¶
- type Collection
- func (c *Collection) DelCollection() error
- func (c *Collection) DelDB() error
- func (c *Collection) DelRecord(key string) error
- func (c *Collection) GetAllRecords() map[string]string
- func (c *Collection) GetAllRecordsKeys() []string
- func (c *Collection) GetRecord(key string) (string, error)
- func (c *Collection) ModifyRecord(key string, value string) error
- func (c *Collection) NewRecord(key string, value string) error
- func (c *Collection) ReadAndSetRecords() error
- func (c *Collection) SaveRecordsToFile() error
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct { User *User `json:"-"` DBName string `json:"-"` CollectionName string `json:"-"` Records map[string]string `json:"-"` DirPath string `json:"-"` FilePath string `json:"-"` }
func NewCollection ¶
func NewCollection(user *User, dbName string, collectionName string) (*Collection, error)
func (*Collection) DelCollection ¶
func (c *Collection) DelCollection() error
func (*Collection) DelDB ¶
func (c *Collection) DelDB() error
func (*Collection) DelRecord ¶
func (c *Collection) DelRecord(key string) error
func (*Collection) GetAllRecords ¶
func (c *Collection) GetAllRecords() map[string]string
func (*Collection) GetAllRecordsKeys ¶
func (c *Collection) GetAllRecordsKeys() []string
func (*Collection) ModifyRecord ¶
func (c *Collection) ModifyRecord(key string, value string) error
func (*Collection) ReadAndSetRecords ¶
func (c *Collection) ReadAndSetRecords() error
func (*Collection) SaveRecordsToFile ¶
func (c *Collection) SaveRecordsToFile() error
Click to show internal directories.
Click to hide internal directories.