di

package
v0.0.0-...-6a2f0c4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTestAdapters

func BuildTestAdapters(contextContext context.Context, tb testing.TB) (sqlite.TestedItems, func(), error)

Types

type Service

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

func BuildService

func BuildService(contextContext context.Context, configConfig config.Config) (Service, func(), error)

func NewService

func NewService(
	app app.Application,
	server http.Server,
	metricsServer http.MetricsServer,
	downloader *app.Downloader,
	receivedEventSubscriber *memorypubsub.ReceivedEventSubscriber,
	tweetCreatedEventSubscriber *sqlitepubsub.TweetCreatedEventSubscriber,
	metricsTimer *timer.Metrics,
	migrationsRunner *migrations.Runner,
	migrations migrations.Migrations,
	migrationsProgressCallback migrations.ProgressCallback,
) Service

func (Service) App

func (s Service) App() app.Application

func (Service) ExecuteMigrations

func (s Service) ExecuteMigrations(ctx context.Context) error

func (Service) Run

func (s Service) Run(ctx context.Context) error

type TestApplication

type TestApplication struct {
	SendTweetHandler *app.SendTweetHandler

	CurrentTimeProvider  *mocks.CurrentTimeProvider
	UserTokensRepository *mocks.UserTokensRepository
	Twitter              *mocks.Twitter
}

func BuildTestApplication

func BuildTestApplication(tb testing.TB) (TestApplication, error)

Jump to

Keyboard shortcuts

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