mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-07-15 06:20:29 +02:00
Started with db abstraction in seeder.
This commit is contained in:
@ -52,7 +52,7 @@ var BackgroundColor = color.RGBA{R: 0xff, G: 0xff, B: 0xff, A: 0xff}
|
||||
type BaseTileUpdateFunc func(x, y int, hash []byte) bool
|
||||
|
||||
type BaseTileCreator struct {
|
||||
client *RedisClient
|
||||
client DBClient
|
||||
colors *Colors
|
||||
renderer *Renderer
|
||||
yOrder *YOrder
|
||||
@ -64,7 +64,7 @@ type BaseTileCreator struct {
|
||||
}
|
||||
|
||||
func NewBaseTileCreator(
|
||||
client *RedisClient,
|
||||
client DBClient,
|
||||
colors *Colors,
|
||||
bg color.RGBA,
|
||||
yMin, yMax int16,
|
||||
|
10
common/dbclient.go
Normal file
10
common/dbclient.go
Normal file
@ -0,0 +1,10 @@
|
||||
package common
|
||||
|
||||
// Copyright 2022 by Sascha L. Teichmann
|
||||
// Use of this source code is governed by the MIT license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
type DBClient interface {
|
||||
QueryCuboid(cuboid Cuboid, fn func(*Block) *Block) (count int, err error)
|
||||
Close() error
|
||||
}
|
Reference in New Issue
Block a user