Documentation ¶
Index ¶
- Constants
- type OwnerRepository
- type PetRepository
- func (r *PetRepository) Create(profile models.Pet) (*models.Pet, error)
- func (r *PetRepository) Delete(id string) error
- func (r *PetRepository) FindAll() ([]models.Pet, error)
- func (r *PetRepository) FindById(id string) (*models.Pet, error)
- func (r *PetRepository) FindByIdAndOwnerId(id, ownerId string) (*models.Pet, error)
- func (r *PetRepository) FindByOwnerId(ownerId string) ([]models.Pet, error)
- func (r *PetRepository) Update(profile models.Pet) (*models.Pet, error)
Constants ¶
View Source
const ( PET_COLLECTION = "pets" OWNER_COLLECTION = "owners" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OwnerRepository ¶
type OwnerRepository struct {
// contains filtered or unexported fields
}
func NewOwnerRepository ¶
func NewOwnerRepository(db *mongo.Database) *OwnerRepository
func (*OwnerRepository) FindByUserId ¶
func (r *OwnerRepository) FindByUserId(userId string) (*models.Owner, error)
type PetRepository ¶
type PetRepository struct {
// contains filtered or unexported fields
}
func NewPetRepository ¶
func NewPetRepository(db *mongo.Database) *PetRepository
func (*PetRepository) Delete ¶
func (r *PetRepository) Delete(id string) error
func (*PetRepository) FindByIdAndOwnerId ¶
func (r *PetRepository) FindByIdAndOwnerId(id, ownerId string) (*models.Pet, error)
func (*PetRepository) FindByOwnerId ¶
func (r *PetRepository) FindByOwnerId(ownerId string) ([]models.Pet, error)
Click to show internal directories.
Click to hide internal directories.