di

package
v0.0.0-...-ad8c3e4 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(factory ServiceFactory) *client

equivalent of class constructor

Types

type ConcreteService

type ConcreteService struct{}

func (*ConcreteService) ProcessMessage

func (service *ConcreteService) ProcessMessage(message string) error

type ConcreteServiceFactory

type ConcreteServiceFactory struct{}

func (ConcreteServiceFactory) CreateService

func (factory ConcreteServiceFactory) CreateService() Service

type Service

type Service interface {
	ProcessMessage(message string) error
}

type ServiceFactory

type ServiceFactory interface {
	CreateService() Service
}

Jump to

Keyboard shortcuts

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