postgresChunkStorage

package
v0.0.0-...-8203687 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnGetChunkByDID

func ConnGetChunkByDID(conn *pgxpool.Conn, did int, cx, cz int) (*save.Chunk, error)

func ConnGetChunkRawByDID

func ConnGetChunkRawByDID(conn *pgxpool.Conn, did int, cx, cz int) ([]byte, error)

Types

type PostgresChunkStorage

type PostgresChunkStorage struct {
	DBPool *pgxpool.Pool
}

func NewPostgresChunkStorage

func NewPostgresChunkStorage(ctx context.Context, connection string) (*PostgresChunkStorage, error)

func (*PostgresChunkStorage) AddChunk

func (s *PostgresChunkStorage) AddChunk(wname, dname string, cx, cz int, col save.Chunk) error

func (*PostgresChunkStorage) AddChunkRaw

func (s *PostgresChunkStorage) AddChunkRaw(wname, dname string, cx, cz int, dat []byte) error

func (*PostgresChunkStorage) AddDimension

func (s *PostgresChunkStorage) AddDimension(wname string, dim chunkStorage.SDim) error

func (*PostgresChunkStorage) AddWorld

func (s *PostgresChunkStorage) AddWorld(world chunkStorage.SWorld) error

func (*PostgresChunkStorage) Close

func (s *PostgresChunkStorage) Close() error

func (*PostgresChunkStorage) GetAbilities

func (*PostgresChunkStorage) GetChunk

func (s *PostgresChunkStorage) GetChunk(wname, dname string, cx, cz int) (*save.Chunk, error)

func (*PostgresChunkStorage) GetChunkByDID

func (s *PostgresChunkStorage) GetChunkByDID(did int, cx, cz int) (*save.Chunk, error)

func (*PostgresChunkStorage) GetChunkModDate

func (s *PostgresChunkStorage) GetChunkModDate(wname, dname string, cx, cz int) (*time.Time, error)

func (*PostgresChunkStorage) GetChunkRaw

func (s *PostgresChunkStorage) GetChunkRaw(wname, dname string, cx, cz int) ([]byte, error)

func (*PostgresChunkStorage) GetChunkRawByDID

func (s *PostgresChunkStorage) GetChunkRawByDID(did int, cx, cz int) ([]byte, error)

func (*PostgresChunkStorage) GetChunksCount

func (s *PostgresChunkStorage) GetChunksCount() (chunksCount uint64, derr error)

func (*PostgresChunkStorage) GetChunksCountRegion

func (s *PostgresChunkStorage) GetChunksCountRegion(wname, dname string, cx0, cz0, cx1, cz1 int) ([]chunkStorage.ChunkData, error)

func (*PostgresChunkStorage) GetChunksRegion

func (s *PostgresChunkStorage) GetChunksRegion(wname, dname string, cx0, cz0, cx1, cz1 int) ([]chunkStorage.ChunkData, error)

func (*PostgresChunkStorage) GetChunksRegionRaw

func (s *PostgresChunkStorage) GetChunksRegionRaw(wname, dname string, cx0, cz0, cx1, cz1 int) ([]chunkStorage.ChunkData, error)

func (*PostgresChunkStorage) GetChunksSize

func (s *PostgresChunkStorage) GetChunksSize() (chunksSize uint64, derr error)

func (*PostgresChunkStorage) GetDimension

func (s *PostgresChunkStorage) GetDimension(wname, dname string) (*chunkStorage.SDim, error)

func (*PostgresChunkStorage) GetDimensionChunksCount

func (s *PostgresChunkStorage) GetDimensionChunksCount(wname, dname string) (count uint64, derr error)

func (*PostgresChunkStorage) GetDimensionChunksSize

func (s *PostgresChunkStorage) GetDimensionChunksSize(wname, dname string) (size uint64, derr error)

func (*PostgresChunkStorage) GetStatus

func (s *PostgresChunkStorage) GetStatus() (ver string, err error)

func (*PostgresChunkStorage) GetWorld

func (s *PostgresChunkStorage) GetWorld(wname string) (*chunkStorage.SWorld, error)

func (*PostgresChunkStorage) ListDimensions

func (s *PostgresChunkStorage) ListDimensions() ([]chunkStorage.SDim, error)

func (*PostgresChunkStorage) ListWorldDimensions

func (s *PostgresChunkStorage) ListWorldDimensions(wname string) ([]chunkStorage.SDim, error)

func (*PostgresChunkStorage) ListWorldNames

func (s *PostgresChunkStorage) ListWorldNames() ([]string, error)

func (*PostgresChunkStorage) ListWorlds

func (s *PostgresChunkStorage) ListWorlds() ([]chunkStorage.SWorld, error)

func (*PostgresChunkStorage) SetDimensionData

func (s *PostgresChunkStorage) SetDimensionData(wname, dname string, data save.DimensionType) error

func (*PostgresChunkStorage) SetWorldAlias

func (s *PostgresChunkStorage) SetWorldAlias(wname, alias string) error

func (*PostgresChunkStorage) SetWorldData

func (s *PostgresChunkStorage) SetWorldData(wname string, data save.LevelData) error

func (*PostgresChunkStorage) SetWorldIP

func (s *PostgresChunkStorage) SetWorldIP(wname, ip string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL