mocks

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPostsRepository

type MockPostsRepository struct {
	CreatePostFn func(ctx context.Context, post *domain.PostCreate) (*domain.Post, error)
	GetPostFn    func(ctx context.Context, id string) (*domain.Post, error)
	GetPostsFn   func(ctx context.Context) ([]*domain.Post, error)
	UpdatePostFn func(ctx context.Context, post *domain.Post) (*domain.Post, error)
}

func (*MockPostsRepository) CreatePost

func (m *MockPostsRepository) CreatePost(ctx context.Context, post *domain.PostCreate) (*domain.Post, error)

func (*MockPostsRepository) GetPost

func (m *MockPostsRepository) GetPost(ctx context.Context, postID string) (*domain.Post, error)

func (*MockPostsRepository) GetPosts

func (m *MockPostsRepository) GetPosts(ctx context.Context) ([]*domain.Post, error)

func (*MockPostsRepository) UpdatePost

func (m *MockPostsRepository) UpdatePost(ctx context.Context, post *domain.Post) (*domain.Post, error)

Jump to

Keyboard shortcuts

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