characters

package
v0.0.0-...-10f3eee Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CharacterRepo character.Repository
	StateRepo     character_creation.Repository
	ChoiceRepo    choice.Repository
	Client        dnd5e.Client
	EncounterRepo encounter.Repository
}

type Manager

type Manager interface {
	AddProficiency(ctx context.Context, char *entities.Character, reference *entities.ReferenceItem) (*entities.Character, error)
	Put(ctx context.Context, character *entities.Character) (*entities.Character, error)
	Get(ctx context.Context, id string) (*entities.Character, error)
	GetChoices(ctx context.Context, characterID string, choiceType entities.ChoiceType) ([]*entities.Choice, error)
	SaveChoices(ctx context.Context, characterID string, choiceType entities.ChoiceType, choices []*entities.Choice) error
	SaveState(ctx context.Context, state *entities.CharacterCreation) (*entities.CharacterCreation, error)
	GetState(ctx context.Context, id string) (*entities.CharacterCreation, error)
	AddInventory(ctx context.Context, char *entities.Character, key string) (*entities.Character, error)
	CreateEncounter(ctx context.Context, encounter *entities.Encounter) (*entities.Encounter, error)
	UpdateEncounter(ctx context.Context, encounter *entities.Encounter) (*entities.Encounter, error)
	GetEncounter(ctx context.Context, id string) (*entities.Encounter, error)
}

func New

func New(cfg *Config) (Manager, error)

Jump to

Keyboard shortcuts

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