Documentation ¶
Index ¶
- Variables
- func CloseStorages(storages map[string]Storage)
- func ConvFlexibleNBTtoSave(d []byte) (ret *save.Chunk, err error)
- func CreateDefaultLevelData(LevelName string) save.LevelData
- func GetWorldStorage(storages map[string]Storage, wname string) (*SWorld, ChunkStorage, error)
- func GuessDimTypeFromName(dname string) save.DimensionType
- type ChunkData
- type ChunkStorage
- type SDim
- type SWorld
- type Storage
- type StorageAbilities
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CloseStorages ¶
func CreateDefaultLevelData ¶
func GetWorldStorage ¶
func GuessDimTypeFromName ¶
func GuessDimTypeFromName(dname string) save.DimensionType
Types ¶
type ChunkStorage ¶
type ChunkStorage interface { GetAbilities() StorageAbilities GetStatus() (string, error) GetChunksCount() (uint64, error) GetChunksSize() (uint64, error) ListWorlds() ([]SWorld, error) ListWorldNames() ([]string, error) GetWorld(wname string) (*SWorld, error) AddWorld(world SWorld) error SetWorldAlias(wname, newalias string) error SetWorldIP(wname, newip string) error SetWorldData(wname string, data save.LevelData) error ListWorldDimensions(wname string) ([]SDim, error) ListDimensions() ([]SDim, error) AddDimension(wname string, dim SDim) error GetDimension(wname, dname string) (*SDim, error) SetDimensionData(wname, dname string, data save.DimensionType) error GetDimensionChunksCount(wname, dname string) (uint64, error) GetDimensionChunksSize(wname, dname string) (uint64, error) AddChunk(wname, dname string, cx, cz int, col save.Chunk) error AddChunkRaw(wname, dname string, cx, cz int, dat []byte) error GetChunk(wname, dname string, cx, cz int) (*save.Chunk, error) GetChunkRaw(wname, dname string, cx, cz int) ([]byte, error) // Warning, chunk data array may be real big! GetChunksRegion(wname, dname string, cx0, cz0, cx1, cz1 int) ([]ChunkData, error) // Warning, chunk data array may be real big! GetChunksRegionRaw(wname, dname string, cx0, cz0, cx1, cz1 int) ([]ChunkData, error) // Warning, chunk data array may be real big! GetChunksCountRegion(wname, dname string, cx0, cz0, cx1, cz1 int) ([]ChunkData, error) GetChunkModDate(wname, dname string, cx, cz int) (*time.Time, error) Close() error }
Everything returns empty slice/nil if specified object is not found, error only in case of abnormal things.
type SDim ¶
type SWorld ¶
type SWorld struct { Name string // unique Alias string IP string CreatedAt time.Time ModifiedAt time.Time Data save.LevelData }
func ListWorlds ¶
type Storage ¶
type Storage struct { Type string `json:"type"` Address string `json:"address"` Driver ChunkStorage `json:"-"` }
Click to show internal directories.
Click to hide internal directories.