repository

package
v0.0.0-...-590dba6 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProfileRepository

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

ProfileRepository object

func (*ProfileRepository) Create

func (pr *ProfileRepository) Create(u *model.User) (model.User, error)

Create method to create new entry

func (*ProfileRepository) Delete

func (pr *ProfileRepository) Delete(id string) (bool, error)

Delete methd to update entry

func (*ProfileRepository) Get

func (pr *ProfileRepository) Get() []model.User

Get method for return all object

func (*ProfileRepository) Update

func (pr *ProfileRepository) Update(id string, u *model.User) (model.User, error)

Update method to update entry

type Repository

type Repository interface {
}

Repository inteface

type UserRepository

type UserRepository struct {
	Collection *mongo.Collection
	// contains filtered or unexported fields
}

UserRepository object

func NewUserRepository

func NewUserRepository(db *mongo.Database) *UserRepository

NewUserRepository new object

func (*UserRepository) Create

func (ur *UserRepository) Create(u *model.User) error

Create method to create new entry

func (*UserRepository) Delete

func (ur *UserRepository) Delete(id string) (bool, error)

Delete methd to update entry

func (*UserRepository) FindByUserName

func (ur *UserRepository) FindByUserName(username string) (*model.User, error)

FindByUserName find user object ny username

func (*UserRepository) Get

func (ur *UserRepository) Get() []model.User

Get method for return all object

func (*UserRepository) Update

func (ur *UserRepository) Update(id string, u *model.User) (model.User, error)

Update method to update entry

Jump to

Keyboard shortcuts

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