1
0
forked from MTSR/mapserver
mapserver/mapobjectdb/accessor.go
NatureFreshMilk 0415b69731 mapobjectdb
2019-01-18 15:51:10 +01:00

31 lines
496 B
Go

package mapobjectdb
import (
"mapserver/coords"
)
type MapObject struct {
//mapblock position
MBPos coords.MapBlockCoords
//block position
X, Y, Z int
Type string
Data string
Mtime int64
}
type SearchQuery struct {
//block position (not mapblock)
Pos1, Pos2 coords.MapBlockCoords
Type string
}
type DBAccessor interface {
Migrate() error
GetMapData(q SearchQuery) ([]MapObject, error)
RemoveMapData(pos coords.MapBlockCoords) error
AddMapData(data MapObject) error
}