mocks

package
v0.0.0-...-c8397cc Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 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 Postgres

type Postgres struct {
	mock.Mock
}

Postgres is an autogenerated mock type for the Postgres type

func NewPostgres

func NewPostgres(t interface {
	mock.TestingT
	Cleanup(func())
}) *Postgres

NewPostgres creates a new instance of Postgres. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Postgres) CreateTweet

func (_m *Postgres) CreateTweet(ctx context.Context, username string, content string) (*models.Tweet, error)

CreateTweet provides a mock function with given fields: ctx, username, content

func (*Postgres) DeleteTweet

func (_m *Postgres) DeleteTweet(ctx context.Context, id string) error

DeleteTweet provides a mock function with given fields: ctx, id

func (*Postgres) FindTweetById

func (_m *Postgres) FindTweetById(ctx context.Context, id string) (*models.Tweet, error)

FindTweetById provides a mock function with given fields: ctx, id

func (*Postgres) UpdateTweet

func (_m *Postgres) UpdateTweet(ctx context.Context, id string, content string) (*models.Tweet, error)

UpdateTweet provides a mock function with given fields: ctx, id, content

type Redis

type Redis struct {
	mock.Mock
}

Redis is an autogenerated mock type for the Redis type

func NewRedis

func NewRedis(t interface {
	mock.TestingT
	Cleanup(func())
}) *Redis

NewRedis creates a new instance of Redis. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

type Service

type Service struct {
	mock.Mock
}

Service is an autogenerated mock type for the Service type

func NewService

func NewService(t interface {
	mock.TestingT
	Cleanup(func())
}) *Service

NewService creates a new instance of Service. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Service) CreateTweet

func (_m *Service) CreateTweet(ctx context.Context, username string, content string) (*models.Tweet, error)

CreateTweet provides a mock function with given fields: ctx, username, content

func (*Service) DeleteTweet

func (_m *Service) DeleteTweet(ctx context.Context, id string) (string, error)

DeleteTweet provides a mock function with given fields: ctx, id

func (*Service) FindTweetById

func (_m *Service) FindTweetById(ctx context.Context, id string) (*models.Tweet, error)

FindTweetById provides a mock function with given fields: ctx, id

func (*Service) UpdateTweet

func (_m *Service) UpdateTweet(ctx context.Context, id string, content string) (*models.Tweet, error)

UpdateTweet provides a mock function with given fields: ctx, id, content

Jump to

Keyboard shortcuts

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