repositories

package
v0.0.0-...-7b45942 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountCategories

func CountCategories(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.CountOptions,
) (count int64, err error)

Count categories

func CountComments

func CountComments(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.CountOptions,
) (count int64, err error)

Count total posts

func CountPages

func CountPages(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.CountOptions,
) (count int64, err error)

Count total pages

func CountPosts

func CountPosts(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.CountOptions,
) (count int64, err error)

Count total posts

func CountUsers

func CountUsers(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.CountOptions,
) (count int64, err error)

Count total users

func DeleteOneCategory

func DeleteOneCategory(
	dbConn *mongo.Database,
	ctx context.Context,
	category *models.CategoryModel,
	opts ...*options.DeleteOptions,
) (err error)

Delete category

func DeleteOneComment

func DeleteOneComment(
	dbConn *mongo.Database,
	ctx context.Context,
	comment *models.CommentModel,
	opts ...*options.DeleteOptions,
) (err error)

Delete comment

func DeleteOneNotification

func DeleteOneNotification(
	dbConn *mongo.Database,
	ctx context.Context,
	notification *models.NotificationModel,
	opts ...*options.DeleteOptions,
) (err error)

Delete notification

func DeleteOnePage

func DeleteOnePage(
	dbConn *mongo.Database,
	ctx context.Context,
	page *models.PageModel,
	opts ...*options.DeleteOptions,
) (err error)

Delete page

func DeleteOnePageContent

func DeleteOnePageContent(
	dbConn *mongo.Database,
	ctx context.Context,
	pageContent *models.PageContentModel,
	opts ...*options.DeleteOptions,
) (err error)

Delete page content

func DeleteOnePost

func DeleteOnePost(
	dbConn *mongo.Database,
	ctx context.Context,
	post *models.PostModel,
	opts ...*options.DeleteOptions,
) (err error)

Delete post

func DeleteOnePostContent

func DeleteOnePostContent(
	dbConn *mongo.Database,
	ctx context.Context,
	postContent *models.PostContentModel,
	opts ...*options.DeleteOptions,
) (err error)

Delete post content

func DeleteOneRevokedToken

func DeleteOneRevokedToken(
	dbConn *mongo.Database,
	ctx context.Context,
	revokedToken *models.RevokedTokenModel,
	opts ...*options.DeleteOptions,
) (err error)

Delete revoked token

func DeleteOneUser

func DeleteOneUser(
	dbConn *mongo.Database,
	ctx context.Context,
	user *models.UserModel,
	opts ...*options.DeleteOptions,
) (err error)

Delete user

func ReadManyCategories

func ReadManyCategories(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOptions,
) (categories []*models.CategoryModel, err error)

Get multiple categories

func ReadManyComments

func ReadManyComments(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOptions,
) (comments []*models.CommentModel, err error)

Get multiple comments

func ReadManyNotifications

func ReadManyNotifications(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOptions,
) (notifications []*models.NotificationModel, err error)

Get multiple notifications

func ReadManyPages

func ReadManyPages(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOptions,
) (pages []*models.PageModel, err error)

Get multiple pages

func ReadManyPosts

func ReadManyPosts(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOptions,
) (posts []*models.PostModel, err error)

Get multiple posts

func ReadManyRevokedTokens

func ReadManyRevokedTokens(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOptions,
) (revokedTokens []*models.RevokedTokenModel, err error)

Get multiple revoked tokens

func ReadManyUsers

func ReadManyUsers(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOptions,
) (users []*models.UserModel, err error)

Get multiple users

func ReadOneCategory

func ReadOneCategory(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOneOptions,
) (category *models.CategoryModel, err error)

Get single category

func ReadOneComment

func ReadOneComment(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOneOptions,
) (comment *models.CommentModel, err error)

Get single comment

func ReadOneNotification

func ReadOneNotification(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOneOptions,
) (notification *models.NotificationModel, err error)

Get single notification

func ReadOnePage

func ReadOnePage(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOneOptions,
) (page *models.PageModel, err error)

Get single page

func ReadOnePageContent

func ReadOnePageContent(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOneOptions,
) (pageContent *models.PageContentModel, err error)

Get single page content

func ReadOnePost

func ReadOnePost(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOneOptions,
) (post *models.PostModel, err error)

Get single post

func ReadOnePostContent

func ReadOnePostContent(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOneOptions,
) (
	postContent *models.PostContentModel,
	err error,
)

Get single post content

func ReadOneRevokedToken

func ReadOneRevokedToken(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOneOptions,
) (revokedToken *models.RevokedTokenModel, err error)

Get single revoked token

func ReadOneUser

func ReadOneUser(
	dbConn *mongo.Database,
	ctx context.Context,
	filter interface{},
	opts ...*options.FindOneOptions,
) (user *models.UserModel, err error)

Get single user

func SaveOneCategory

func SaveOneCategory(
	dbConn *mongo.Database,
	ctx context.Context,
	category *models.CategoryModel,
	opts ...*options.InsertOneOptions,
) (err error)

Save new category

func SaveOneComment

func SaveOneComment(
	dbConn *mongo.Database,
	ctx context.Context,
	comment *models.CommentModel,
	opts ...*options.InsertOneOptions,
) (err error)

Save new comment

func SaveOneNotification

func SaveOneNotification(
	dbConn *mongo.Database,
	ctx context.Context,
	notification *models.NotificationModel,
	opts ...*options.InsertOneOptions,
) (err error)

Save new notification

func SaveOnePage

func SaveOnePage(
	dbConn *mongo.Database,
	ctx context.Context,
	page *models.PageModel,
	opts ...*options.InsertOneOptions,
) (err error)

Save new page

func SaveOnePageContent

func SaveOnePageContent(
	dbConn *mongo.Database,
	ctx context.Context,
	pageContent *models.PageContentModel,
	opts ...*options.InsertOneOptions,
) (err error)

Save new page content

func SaveOnePost

func SaveOnePost(
	dbConn *mongo.Database,
	ctx context.Context,
	post *models.PostModel,
	opts ...*options.InsertOneOptions,
) (err error)

Save new post

func SaveOnePostContent

func SaveOnePostContent(
	dbConn *mongo.Database,
	ctx context.Context,
	postContent *models.PostContentModel,
	opts ...*options.InsertOneOptions,
) (err error)

Save new post content

func SaveOneRevokedToken

func SaveOneRevokedToken(
	dbConn *mongo.Database,
	ctx context.Context,
	revokedToken *models.RevokedTokenModel,
	opts ...*options.InsertOneOptions,
) (err error)

Save new revoked token

func SaveOneUser

func SaveOneUser(
	dbConn *mongo.Database,
	ctx context.Context,
	user *models.UserModel,
	opts ...*options.InsertOneOptions,
) (err error)

Save new user

func UpdateManyPostAuthor

func UpdateManyPostAuthor(
	dbConn *mongo.Database,
	ctx context.Context,
	user *models.UserModel,
	opts ...*options.UpdateOptions,
) (err error)

Bulk update post's author

func UpdateOneCategory

func UpdateOneCategory(
	dbConn *mongo.Database,
	ctx context.Context,
	category *models.CategoryModel,
	opts ...*options.UpdateOptions,
) (err error)

Update category

func UpdateOneComment

func UpdateOneComment(
	dbConn *mongo.Database,
	ctx context.Context,
	comment *models.CommentModel,
	opts ...*options.UpdateOptions,
) (err error)

Update comment

func UpdateOneNotification

func UpdateOneNotification(
	dbConn *mongo.Database,
	ctx context.Context,
	notification *models.NotificationModel,
	opts ...*options.UpdateOptions,
) (err error)

Update notification

func UpdateOnePage

func UpdateOnePage(
	dbConn *mongo.Database,
	ctx context.Context,
	page *models.PageModel,
	opts ...*options.UpdateOptions,
) (err error)

Update page

func UpdateOnePageContent

func UpdateOnePageContent(
	dbConn *mongo.Database,
	ctx context.Context,
	pageContent *models.PageContentModel,
	opts ...*options.UpdateOptions,
) (err error)

Update page content

func UpdateOnePost

func UpdateOnePost(
	dbConn *mongo.Database,
	ctx context.Context,
	post *models.PostModel,
	opts ...*options.UpdateOptions,
) (err error)

Update post

func UpdateOnePostContent

func UpdateOnePostContent(
	dbConn *mongo.Database,
	ctx context.Context,
	postContent *models.PostContentModel,
	opts ...*options.UpdateOptions,
) (err error)

Update post content

func UpdateOneRevokedToken

func UpdateOneRevokedToken(
	dbConn *mongo.Database,
	ctx context.Context,
	revokedToken *models.RevokedTokenModel,
	opts ...*options.UpdateOptions,
) (err error)

Update revoked token

func UpdateOneUser

func UpdateOneUser(
	dbConn *mongo.Database,
	ctx context.Context,
	user *models.UserModel,
	opts ...*options.UpdateOptions,
) (err error)

Update user

Types

This section is empty.

Jump to

Keyboard shortcuts

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