repository

package
v0.0.0-...-2f27ceb Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMonsterRepo

func NewMonsterRepo(db *mongo.Database) monster.MonsterRepository

func NewMonsterTypeRepo

func NewMonsterTypeRepo(db *mongo.Database) monster.MonsterTypeRepository

Types

type MonsterRepo

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

func (*MonsterRepo) AddMonsterType

func (r *MonsterRepo) AddMonsterType(ctx context.Context, monsterID, monsterTypeID primitive.ObjectID) error

func (*MonsterRepo) CreateMonster

func (r *MonsterRepo) CreateMonster(ctx context.Context, monster *domain.Monster) (*domain.Monster, error)

func (*MonsterRepo) DeleteMonster

func (r *MonsterRepo) DeleteMonster(ctx context.Context, monsterID primitive.ObjectID) error

func (*MonsterRepo) FetchMonsters

func (r *MonsterRepo) FetchMonsters(ctx context.Context, pq *utils.PaginationQuery) (*domain.MonsterList, error)

func (*MonsterRepo) FindByID

func (r *MonsterRepo) FindByID(ctx context.Context, monsterID primitive.ObjectID) (*domain.Monster, error)

func (*MonsterRepo) FindByName

func (r *MonsterRepo) FindByName(ctx context.Context, monsterName string) (*domain.Monster, error)

func (*MonsterRepo) UpdateMonster

func (r *MonsterRepo) UpdateMonster(ctx context.Context, monster *domain.MonsterUpdate) (*domain.MonsterUpdate, error)

type MonsterTypeRepo

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

func (*MonsterTypeRepo) CreateMonsterType

func (r *MonsterTypeRepo) CreateMonsterType(ctx context.Context, monsterType *domain.MonsterType) (*domain.MonsterType, error)

func (*MonsterTypeRepo) DeleteMonsterType

func (r *MonsterTypeRepo) DeleteMonsterType(ctx context.Context, monsterTypeID primitive.ObjectID) error

func (*MonsterTypeRepo) FetchMonsterTypes

func (r *MonsterTypeRepo) FetchMonsterTypes(ctx context.Context, pq *utils.PaginationQuery) (*domain.MonsterTypeList, error)

func (*MonsterTypeRepo) FindByID

func (r *MonsterTypeRepo) FindByID(ctx context.Context, monsterTypeID primitive.ObjectID) (*domain.MonsterType, error)

func (*MonsterTypeRepo) FindByName

func (r *MonsterTypeRepo) FindByName(ctx context.Context, monsterTypeName string) (*domain.MonsterType, error)

func (*MonsterTypeRepo) UpdateMonsterType

func (r *MonsterTypeRepo) UpdateMonsterType(ctx context.Context, monsterType *domain.MonsterTypeUpdate) (*domain.MonsterTypeUpdate, error)

Jump to

Keyboard shortcuts

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