Documentation ¶
Index ¶
- type FakeDatabase
- func (d *FakeDatabase) CreateColumn(recordType, columnName, columnDef string) error
- func (d *FakeDatabase) DeleteColumn(recordType, columnName string) error
- func (d *FakeDatabase) DeleteRecord(recordIDList []string) error
- func (d *FakeDatabase) FetchAsset(assetID string) ([]byte, error)
- func (d *FakeDatabase) FetchRecord(recordID string) (*skyrecord.Record, error)
- func (d *FakeDatabase) FetchSchema() (map[string]interface{}, error)
- func (d *FakeDatabase) QueryRecord(recordType string) ([]*skyrecord.Record, error)
- func (d *FakeDatabase) RenameColumn(recordType, oldName, newName string) error
- func (d *FakeDatabase) SaveAsset(path string) (string, error)
- func (d *FakeDatabase) SaveRecord(r *skyrecord.Record) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeDatabase ¶
type FakeDatabase struct { RecordList map[string]map[string]*skyrecord.Record AssetList map[string][]byte }
FakeDatabase is a map implementation of Database
func NewFakeDatabase ¶
func NewFakeDatabase() *FakeDatabase
func (*FakeDatabase) CreateColumn ¶
func (d *FakeDatabase) CreateColumn(recordType, columnName, columnDef string) error
func (*FakeDatabase) DeleteColumn ¶
func (d *FakeDatabase) DeleteColumn(recordType, columnName string) error
func (*FakeDatabase) DeleteRecord ¶
func (d *FakeDatabase) DeleteRecord(recordIDList []string) error
func (*FakeDatabase) FetchAsset ¶
func (d *FakeDatabase) FetchAsset(assetID string) ([]byte, error)
func (*FakeDatabase) FetchRecord ¶
func (d *FakeDatabase) FetchRecord(recordID string) (*skyrecord.Record, error)
func (*FakeDatabase) FetchSchema ¶
func (d *FakeDatabase) FetchSchema() (map[string]interface{}, error)
func (*FakeDatabase) QueryRecord ¶
func (d *FakeDatabase) QueryRecord(recordType string) ([]*skyrecord.Record, error)
func (*FakeDatabase) RenameColumn ¶
func (d *FakeDatabase) RenameColumn(recordType, oldName, newName string) error
func (*FakeDatabase) SaveRecord ¶
func (d *FakeDatabase) SaveRecord(r *skyrecord.Record) error
Click to show internal directories.
Click to hide internal directories.