repository

package
v0.0.0-...-881765e Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CharacterSheetsRepository

type CharacterSheetsRepository interface {
	FindAll() ([]*e.CharacterSheet, error)
	FindByID(id string) (*e.CharacterSheet, error)
	FindByName(name string) ([]*e.CharacterSheet, error)
	Store(characterSheet *e.CharacterSheet) (*e.CharacterSheet, error)
	Update(id string, characterSheet *e.CharacterSheet) error
	Delete(id string) error
}

CharacterSheetsRepository repository interface

func NewMongoDBCharacterSheetRepository

func NewMongoDBCharacterSheetRepository(db *db.Client) CharacterSheetsRepository

NewMongoDBCharacterSheetRepository creates a new mongodb characterSheetRepository

type GenericRepo

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

GenericRepo ...

func (*GenericRepo) Delete

func (repo *GenericRepo) Delete(id string) error

Delete an existing entity

func (*GenericRepo) FindAll

func (repo *GenericRepo) FindAll(collector elementCollector) error

FindAll returns all entities

func (*GenericRepo) FindAllWithParam

func (repo *GenericRepo) FindAllWithParam(params *db.QueryParams, collector elementCollector) error

FindAllWithParam returns all entities

func (*GenericRepo) FindByField

func (repo *GenericRepo) FindByField(key string, value string) (interface{}, error)

FindByField ...

func (*GenericRepo) FindByID

func (repo *GenericRepo) FindByID(id string) (interface{}, error)

FindByID ...

func (*GenericRepo) Store

func (repo *GenericRepo) Store(entity interface{}) (interface{}, error)

Store stores a new entity

func (*GenericRepo) Update

func (repo *GenericRepo) Update(item interface{}, id string) error

Update an existing entity

func (*GenericRepo) UpdateByField

func (repo *GenericRepo) UpdateByField(item interface{}, key string, value string) error

UpdateByField an existing entity

type PartiesRepository

type PartiesRepository interface {
	FindAll() ([]*e.Party, error)
	FindByID(id string) (*e.Party, error)
	//FindByName(name string) (*e.Party, error)
	Store(party *e.Party) (*e.Party, error)
	Update(id string, party *e.Party) error
	Delete(id string) error
}

PartiesRepository repository interface

func NewMongoDBPartiesRepository

func NewMongoDBPartiesRepository(db *db.Client) PartiesRepository

NewMongoDBPartiesRepository creates a new mongodb partiesrep

type RoomsRepository

type RoomsRepository interface {
	FindAll() ([]*r.Room, error)
	FindByID(id string) (*r.Room, error)
	FindByName(name string) ([]*r.Room, error)
	Store(room *r.Room) (*r.Room, error)
	Update(id string, room *r.Room) error
	Delete(id string) error
}

RoomsRepository repository interface

func NewMongoDBRoomsRepository

func NewMongoDBRoomsRepository(db *db.Client) RoomsRepository

NewMongoDBRoomsRepository creates a new mongodb repoRepository

type UsersRepository

type UsersRepository interface {
	FindByRefID(id string) (*e.User, error)
	Create(user *e.User) (*e.User, error)
	Update(id string, user *e.User) error
	Delete(id string) error
}

UsersRepository ...

func NewMongoDBUsersRepository

func NewMongoDBUsersRepository(db *db.Client) UsersRepository

NewMongoDBUsersRepository creates a new mongodb partiesrep

Jump to

Keyboard shortcuts

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