mongo

package
v0.0.0-...-dbbb3a2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleMongoDataService

type ArticleMongoDataService struct {
	Collection *mongo.Collection
}

func (*ArticleMongoDataService) Create

func (ds *ArticleMongoDataService) Create(title string, author *model.User, content string) *model.Article

func (*ArticleMongoDataService) DeleteArticle

func (ds *ArticleMongoDataService) DeleteArticle(id int)

func (*ArticleMongoDataService) Get

func (*ArticleMongoDataService) List

func (ds *ArticleMongoDataService) List() []*model.Article

func (*ArticleMongoDataService) Update

func (ds *ArticleMongoDataService) Update(id int)

type UserMongoDataService

type UserMongoDataService struct {
	Collection *mongo.Collection
}

func (*UserMongoDataService) Create

func (ds *UserMongoDataService) Create(data map[string]string) *model.User

func (*UserMongoDataService) Delete

func (ds *UserMongoDataService) Delete(id string) *model.User

func (*UserMongoDataService) Get

func (ds *UserMongoDataService) Get(id string) (*model.User, error)

func (*UserMongoDataService) List

func (ds *UserMongoDataService) List() []*model.User

func (*UserMongoDataService) Update

func (ds *UserMongoDataService) Update(id string, data map[string]string) *model.User

Jump to

Keyboard shortcuts

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