repotypes

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article interface {
	CreateArticle(article models.Article) (models.Article, error)
	GetAllArticles() ([]models.Article, error) //todo add pagination
	GetArticleById(id string) (models.Article, error)
	DeleteArticleById(id string) error
	UpdateArticleById(id string) error
	LockArticleById(id string) error
}

type Repository

type Repository struct {
	User    User
	Article Article
}

type User

type User interface {
	CreateUser(user models.User) (models.User, error)
	GetAllUsers() ([]models.User, error)
	GetUserByUsername(username string) (models.User, error)
	GetUserById(id string) (models.User, error)
	ChangeUserPassword(string, string) error
	ChangeUserSettings(id string, settings map[string]string) error
	UpdateUserData(id string, fullname string, email string, isadmin bool, iswriter bool) error
}

Jump to

Keyboard shortcuts

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