Start commit 22/02/2022
This commit is contained in:
@@ -3,12 +3,12 @@ package protocol
|
||||
import "_StorBackEnd/pkg/protocol/repository"
|
||||
|
||||
type RequestManager struct {
|
||||
repository repository.ProtocolRepository
|
||||
Repository *repository.ProtocolRepository
|
||||
}
|
||||
|
||||
func (receiver RequestManager) Execute(request string) string {
|
||||
// On lis ce que l'on reçoit
|
||||
result, executed := receiver.repository.ExecuteReader(request)
|
||||
result, executed := receiver.Repository.ExecuteReader(request)
|
||||
|
||||
// On renvoie la réponse (Comment pour fichier ?)
|
||||
if executed {
|
||||
|
||||
@@ -4,6 +4,13 @@ import (
|
||||
"_StorBackEnd/pkg/protocol"
|
||||
)
|
||||
|
||||
func CreateProtocolRepository() *ProtocolRepository {
|
||||
return &ProtocolRepository{
|
||||
protocolReaders: make(map[string]*protocol.IProtocolReader),
|
||||
protocolWriters: make(map[string]*protocol.IProtocolWriter),
|
||||
}
|
||||
}
|
||||
|
||||
type ProtocolRepository struct {
|
||||
protocolReaders map[string]*protocol.IProtocolReader
|
||||
protocolWriters map[string]*protocol.IProtocolWriter
|
||||
|
||||
Reference in New Issue
Block a user