repository

package
v0.0.0-...-3393515 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountRepository

type AccountRepository interface {
	Create(ctx context.Context, account *model.Account) error
	List(ctx context.Context, limit, offset int, name string) ([]*model.Account, error)
	Get(ctx context.Context, id int64) (*model.Account, error)
	GetByEmail(ctx context.Context, email string) (*model.Account, error)
	Update(ctx context.Context, account *model.Account) error
	Delete(ctx context.Context, id int64) error
}

func NewAccountRepository

func NewAccountRepository(postgresClient postgres.Client, redisClient redis.Client) AccountRepository

type PostRepository

type PostRepository interface {
	Create(ctx context.Context, post *model.Post) error
	List(ctx context.Context, limit, offset int, title string) ([]*model.Post, error)
	Get(ctx context.Context, id int64) (*model.Post, error)
	Update(ctx context.Context, post *model.Post) error
	Delete(ctx context.Context, id int64) error
}

func NewPostRepository

func NewPostRepository(postgresClient postgres.Client, redisClient redis.Client) PostRepository

Jump to

Keyboard shortcuts

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