1
0
forked from MTSR/mapserver
mapserver/server/db/accessor.go

27 lines
507 B
Go
Raw Normal View History

2019-01-08 00:27:24 +03:00
package db
2019-01-09 13:11:45 +03:00
import (
"mapserver/coords"
)
2019-01-08 00:27:24 +03:00
type Block struct {
2019-02-06 10:38:08 +03:00
Pos *coords.MapBlockCoords
2019-01-13 18:37:03 +03:00
Data []byte
Mtime int64
2019-01-08 00:27:24 +03:00
}
2019-02-11 18:32:39 +03:00
type InitialBlocksResult struct {
List []*Block
HasMore bool
}
2019-01-08 00:27:24 +03:00
type DBAccessor interface {
Migrate() error
2019-01-24 17:56:37 +03:00
2019-02-06 10:38:08 +03:00
FindBlocksByMtime(gtmtime int64, limit int) ([]*Block, error)
2019-02-11 18:32:39 +03:00
FindNextInitialBlocks(lastpos *coords.MapBlockCoords, limit int) (*InitialBlocksResult, error)
2019-01-24 17:56:37 +03:00
2019-01-24 09:22:28 +03:00
CountBlocks(frommtime, tomtime int64) (int, error)
2019-02-06 10:38:08 +03:00
GetBlock(pos *coords.MapBlockCoords) (*Block, error)
2019-01-08 00:27:24 +03:00
}