1
0
forked from MTSR/mapserver
mapserver/server/db/accessor.go
NatureFreshMilk fced5f03d2 pointer rulez
2019-02-06 08:38:08 +01:00

22 lines
426 B
Go

package db
import (
"mapserver/coords"
)
type Block struct {
Pos *coords.MapBlockCoords
Data []byte
Mtime int64
}
type DBAccessor interface {
Migrate() error
FindBlocksByMtime(gtmtime int64, limit int) ([]*Block, error)
FindLegacyBlocksByPos(lastpos *coords.MapBlockCoords, limit int) ([]*Block, error)
CountBlocks(frommtime, tomtime int64) (int, error)
GetBlock(pos *coords.MapBlockCoords) (*Block, error)
}