usecase

package
v0.0.0-...-cb7f25d Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication interface {
	CreateAccount(ctx context.Context, email, password string) error
	Login(ctx context.Context, email, password string) (model.UserID, error)
}

func NewAuthentication

func NewAuthentication(
	accountRepository repository.Account,
	eventPublisher event.Publisher,
	transaction infra.TransactionManager,
) Authentication

type Authorization

type Authorization interface {
	GenerateAccessToken(ctx context.Context, email, password string) (dto.AccessToken, error)
	ValidateAccessToken(ctx context.Context, accessToken string) (model.UserID, error)
}

func NewAuthorization

func NewAuthorization(
	authentication Authentication,
	clock infra.Clock,
) Authorization

type EventHandler

type EventHandler interface {
	Handle(c context.Context, event event.Event) error
}

func NewEventHandler

func NewEventHandler(logger infra.Logger) EventHandler

type Posting

type Posting interface {
	PostChat(ctx context.Context, message string) error
}

func NewPosting

func NewPosting(
	chatRepository repository.Chat,
	clock infra.Clock,
) Posting

Jump to

Keyboard shortcuts

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