context

package
v0.0.0-...-433df20 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2020 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationContext

type ApplicationContext interface {
	//controllers
	ForwardEmailController(arguments map[string]interface{}) error

	//gateways
	ReadEmailGateway(url string) ([]byte, error)

	SendEmailGateway(email []byte, recipients []string) error

	EnvironmentGateway(key string) string

	GetRealEmailForConcealPrefix(concealPrefix string) (string, error)

	//usecases
	ForwardEmailUsecase(url string) error

	//libraries
	Exit(returnCode int)
}

type TestApplicationContext

type TestApplicationContext struct {
	ReceivedForwardEmailControllerArguments map[string]interface{}
	ReturnErrorFromForwardEmailController   error

	ReceivedReadEmailGatewayArguments string
	ReturnFromReadEmailGateway        []byte
	ReturnErrorFromReadEmailGateway   error

	ReceivedSendEmailGatewayEmailArgument     []byte
	ReceivedSendEmailGatewayRecipientArgument []string
	ReturnErrorFromSendEmailGateway           error

	ReceivedEnvironmentGatewayArguments string
	ReturnFromEnvironmentGateway        map[string]string

	ReceivedGetRealEmailForConcealPrefixArguments string
	ReturnFromGetRealEmailForConcealPrefix        string
	ReturnErrorFromGetRealEmailForConcealPrefix   error

	ReceivedForwardEmailUsecaseArguments string
	ReturnErrorForwardEmailUsecase       error

	ReceivedExitReturnCode int
}

func (*TestApplicationContext) EnvironmentGateway

func (appContext *TestApplicationContext) EnvironmentGateway(key string) string

func (*TestApplicationContext) Exit

func (appContext *TestApplicationContext) Exit(returnCode int)

func (*TestApplicationContext) ForwardEmailController

func (appContext *TestApplicationContext) ForwardEmailController(arguments map[string]interface{}) error

func (*TestApplicationContext) ForwardEmailUsecase

func (appContext *TestApplicationContext) ForwardEmailUsecase(url string) error

func (*TestApplicationContext) GetRealEmailForConcealPrefix

func (appContext *TestApplicationContext) GetRealEmailForConcealPrefix(concealPrefix string) (string, error)

func (*TestApplicationContext) ReadEmailGateway

func (appContext *TestApplicationContext) ReadEmailGateway(url string) ([]byte, error)

func (*TestApplicationContext) SendEmailGateway

func (appContext *TestApplicationContext) SendEmailGateway(email []byte, recipients []string) error

Jump to

Keyboard shortcuts

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