sources

package
v0.0.0-...-831e10e Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("cannot find the desired resource")
)

Functions

This section is empty.

Types

type GameEventHandler

type GameEventHandler func(gameVersion string)

type Impl

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

func New

func New(scheduler gocron.Scheduler, storeService stores.Service,
	gameRepo games.Repository) (*Impl, error)

func (*Impl) GetAlmanaxByDate

func (service *Impl) GetAlmanaxByDate(ctx context.Context, date time.Time, language string,
) (*dodugo.AlmanaxEntry, error)

func (*Impl) GetAlmanaxByRange

func (service *Impl) GetAlmanaxByRange(ctx context.Context, daysDuration int64, language string,
) ([]dodugo.AlmanaxEntry, error)

func (*Impl) GetConsumableByID

func (service *Impl) GetConsumableByID(ctx context.Context, itemID int64, language string,
) (*dodugo.Resource, error)

func (*Impl) GetCosmeticByID

func (service *Impl) GetCosmeticByID(ctx context.Context, itemID int64, language string,
) (*dodugo.Weapon, error)

func (*Impl) GetCosmeticByQuery

func (service *Impl) GetCosmeticByQuery(ctx context.Context, query, language string,
) (*dodugo.Weapon, error)

func (*Impl) GetEquipmentByID

func (service *Impl) GetEquipmentByID(ctx context.Context, itemID int64, language string,
) (*dodugo.Weapon, error)

func (*Impl) GetEquipmentByQuery

func (service *Impl) GetEquipmentByQuery(ctx context.Context, query, language string,
) (*dodugo.Weapon, error)

func (*Impl) GetItemType

func (service *Impl) GetItemType(itemType string) amqp.ItemType

func (*Impl) GetMountByID

func (service *Impl) GetMountByID(ctx context.Context, itemID int64, language string,
) (*dodugo.Mount, error)

func (*Impl) GetMountByQuery

func (service *Impl) GetMountByQuery(ctx context.Context, query, language string,
) (*dodugo.Mount, error)

func (*Impl) GetQuestItemByID

func (service *Impl) GetQuestItemByID(ctx context.Context, itemID int64, language string,
) (*dodugo.Resource, error)

func (*Impl) GetResourceByID

func (service *Impl) GetResourceByID(ctx context.Context, itemID int64, language string,
) (*dodugo.Resource, error)

func (*Impl) GetSetByID

func (service *Impl) GetSetByID(ctx context.Context, setID int64, language string,
) (*dodugo.EquipmentSet, error)

func (*Impl) GetSetByQuery

func (service *Impl) GetSetByQuery(ctx context.Context, query, language string,
) (*dodugo.EquipmentSet, error)

func (*Impl) GetSets

func (service *Impl) GetSets(ctx context.Context) ([]dodugo.SetListEntry, error)

Returns sets with minimal informations. No cache applied here.

func (*Impl) ListenGameEvent

func (service *Impl) ListenGameEvent(handler GameEventHandler)

func (*Impl) SearchAlmanaxEffects

func (service *Impl) SearchAlmanaxEffects(ctx context.Context, query,
	language string) ([]dodugo.GetMetaAlmanaxBonuses200ResponseInner, error)

func (*Impl) SearchAnyItems

func (service *Impl) SearchAnyItems(ctx context.Context, query,
	language string) ([]dodugo.GetGameSearch200ResponseInner, error)

func (*Impl) SearchCosmetics

func (service *Impl) SearchCosmetics(ctx context.Context, query,
	language string) ([]dodugo.ItemListEntry, error)

func (*Impl) SearchEquipments

func (service *Impl) SearchEquipments(ctx context.Context, query,
	language string) ([]dodugo.ItemListEntry, error)

func (*Impl) SearchMounts

func (service *Impl) SearchMounts(ctx context.Context, query,
	language string) ([]dodugo.MountListEntry, error)

func (*Impl) SearchSets

func (service *Impl) SearchSets(ctx context.Context, query,
	language string) ([]dodugo.SetListEntry, error)

type Service

type Service interface {
	GetItemType(itemType string) amqp.ItemType

	SearchAnyItems(ctx context.Context, query, lg string) ([]dodugo.GetGameSearch200ResponseInner, error)
	SearchCosmetics(ctx context.Context, query, lg string) ([]dodugo.ItemListEntry, error)
	SearchEquipments(ctx context.Context, query, lg string) ([]dodugo.ItemListEntry, error)
	SearchMounts(ctx context.Context, query, lg string) ([]dodugo.MountListEntry, error)
	SearchSets(ctx context.Context, query, lg string) ([]dodugo.SetListEntry, error)
	SearchAlmanaxEffects(ctx context.Context, query, lg string) ([]dodugo.GetMetaAlmanaxBonuses200ResponseInner, error)

	GetConsumableByID(ctx context.Context, consumableID int64, lg string) (*dodugo.Resource, error)
	GetCosmeticByID(ctx context.Context, cosmeticID int64, lg string) (*dodugo.Weapon, error)
	GetEquipmentByID(ctx context.Context, equipmentID int64, lg string) (*dodugo.Weapon, error)
	GetMountByID(ctx context.Context, mountID int64, lg string) (*dodugo.Mount, error)
	GetQuestItemByID(ctx context.Context, questItemID int64, lg string) (*dodugo.Resource, error)
	GetResourceByID(ctx context.Context, resourceID int64, lg string) (*dodugo.Resource, error)
	GetSetByID(ctx context.Context, setID int64, lg string) (*dodugo.EquipmentSet, error)
	GetSets(ctx context.Context) ([]dodugo.SetListEntry, error)

	GetCosmeticByQuery(ctx context.Context, query, lg string) (*dodugo.Weapon, error)
	GetEquipmentByQuery(ctx context.Context, query, lg string) (*dodugo.Weapon, error)
	GetMountByQuery(ctx context.Context, query, lg string) (*dodugo.Mount, error)
	GetSetByQuery(ctx context.Context, query, lg string) (*dodugo.EquipmentSet, error)

	GetAlmanaxByDate(ctx context.Context, date time.Time, language string) (*dodugo.AlmanaxEntry, error)
	GetAlmanaxByRange(ctx context.Context, daysDuration int64, language string) ([]dodugo.AlmanaxEntry, error)

	ListenGameEvent(handler GameEventHandler)
}

Jump to

Keyboard shortcuts

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