mapserver/db/accessor.go
2019-01-17 15:14:13 +01:00

19 lines
366 B
Go

package db
import (
"mapserver/coords"
)
type Block struct {
Pos coords.MapBlockCoords
Data []byte
Mtime int64
}
type DBAccessor interface {
Migrate() error
FindLatestBlocks(mintime int64, limit int) ([]Block, error)
CountBlocks(pos1 coords.MapBlockCoords, pos2 coords.MapBlockCoords) (int, error)
GetBlock(pos coords.MapBlockCoords) (*Block, error)
}