memory

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Project OpenMonster
Copyright (C) 2020  Kori

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/\>.

Project OpenMonster
Copyright (C) 2020  Kori

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/\>.

Package memory contains in-memory implementations of the database interfaces. These implementations are currently not persisted.

Project OpenMonster
Copyright (C) 2020  Kori

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/\>.

Project OpenMonster
Copyright (C) 2020  Kori

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/\>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BattleDB

type BattleDB struct {
	// contains filtered or unexported fields
}

func NewBattleDB

func NewBattleDB() *BattleDB

func (*BattleDB) CreateRequest

func (bdb *BattleDB) CreateRequest(req model.Request) (model.ID, error)

func (*BattleDB) LoadRequest

func (bdb *BattleDB) LoadRequest(id model.ID) (model.Request, error)

func (*BattleDB) LoadRequestByBreeder

func (bdb *BattleDB) LoadRequestByBreeder(id model.ID) ([]model.Request, error)

func (*BattleDB) SaveRequest

func (bdb *BattleDB) SaveRequest(request model.Request) error

type BreederDB

type BreederDB struct {
	// contains filtered or unexported fields
}

func NewBreederDB

func NewBreederDB() *BreederDB

func (*BreederDB) Create

func (tdb *BreederDB) Create(breeder model.Breeder) (model.ID, error)

func (*BreederDB) Delete

func (tdb *BreederDB) Delete(id model.ID) error

func (*BreederDB) Load

func (tdb *BreederDB) Load(id model.ID) (model.Breeder, error)

func (*BreederDB) LoadAll

func (tdb *BreederDB) LoadAll() ([]model.Breeder, error)

func (*BreederDB) Save

func (tdb *BreederDB) Save(breeder model.Breeder) error

func (*BreederDB) SavePosition added in v0.4.0

func (b *BreederDB) SavePosition(breederID model.ID, position model.Vector2D) (err error)

type MonsterDB

type MonsterDB struct {
	// contains filtered or unexported fields
}

func NewMonsterDB

func NewMonsterDB() *MonsterDB

func (*MonsterDB) Create

func (mdb *MonsterDB) Create(monster model.Monster) (model.ID, error)

func (*MonsterDB) Delete

func (mdb *MonsterDB) Delete(id model.ID) error

func (*MonsterDB) Load

func (mdb *MonsterDB) Load(id model.ID) (model.Monster, error)

func (*MonsterDB) LoadTeamByBreederId

func (mdb *MonsterDB) LoadTeamByBreederId(id model.ID) (team []model.Monster, err error)

func (*MonsterDB) Save

func (mdb *MonsterDB) Save(monster model.Monster) error

func (*MonsterDB) SaveTeamByBreederId

func (mdb *MonsterDB) SaveTeamByBreederId(id model.ID, team []model.Monster) error

Jump to

Keyboard shortcuts

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