database

package
v0.0.0-...-04c0119 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseRepo

type DatabaseRepo interface {
	InsertPost(p models.Post) (*string, error)
	GetPosts() ([]*models.Post, error)
	GetPostCreator(id string) (string, error)
	GetPostById(id string) (*models.Post, error)
	GetPostsByPage(page, limit int) ([]*models.Post, error)
	UpdatePost(p models.Post) error
	DeleteOnePost(id string) error

	InsertUser(u models.User) (*string, error)
	GetUserRoles(id string) ([]string, error)
	GetUserById(id string) (*models.User, error)
	GetUserByEmail(email string) (*models.User, error)
	UpdateUser(u models.User) error
	DeleteUser(id string) error
}

DatabaseRepo represents the database repository.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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