Documentation
¶
Index ¶
- type Postgres
- func (_m *Postgres) CreateTweet(ctx context.Context, username string, content string) (*models.Tweet, error)
- func (_m *Postgres) DeleteTweet(ctx context.Context, id string) error
- func (_m *Postgres) FindTweetById(ctx context.Context, id string) (*models.Tweet, error)
- func (_m *Postgres) UpdateTweet(ctx context.Context, id string, content string) (*models.Tweet, error)
- type Redis
- type Service
- func (_m *Service) CreateTweet(ctx context.Context, username string, content string) (*models.Tweet, error)
- func (_m *Service) DeleteTweet(ctx context.Context, id string) (string, error)
- func (_m *Service) FindTweetById(ctx context.Context, id string) (*models.Tweet, error)
- func (_m *Service) UpdateTweet(ctx context.Context, id string, content string) (*models.Tweet, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Postgres ¶
Postgres is an autogenerated mock type for the Postgres type
func NewPostgres ¶
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 ¶
DeleteTweet provides a mock function with given fields: ctx, id
func (*Postgres) FindTweetById ¶
FindTweetById provides a mock function with given fields: ctx, id
type Service ¶
Service is an autogenerated mock type for the Service type
func NewService ¶
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 ¶
DeleteTweet provides a mock function with given fields: ctx, id
func (*Service) FindTweetById ¶
FindTweetById provides a mock function with given fields: ctx, id