repository

package
v0.0.0-...-4ef61cc Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostRepository

type PostRepository struct {
	// contains filtered or unexported fields
}

func NewPostRepository

func NewPostRepository(db *gorm.DB) (*PostRepository, error)

func (*PostRepository) Create

func (r *PostRepository) Create(ctx context.Context, post *model.Post) error

func (*PostRepository) Delete

func (r *PostRepository) Delete(ctx context.Context, post *model.Post) error

func (*PostRepository) Find

func (r *PostRepository) Find(ctx context.Context, id int) (*model.Post, error)

func (*PostRepository) FindAll

func (r *PostRepository) FindAll(ctx context.Context) ([]model.Post, error)

func (*PostRepository) Update

func (r *PostRepository) Update(ctx context.Context, post *model.Post, update *model.Post) error

Jump to

Keyboard shortcuts

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