A FAIRE.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

33 lines
1021 B

/*
------------------------------------------------------------------------------------------------------------------------
####### storage ####### Copyright (c) 2021 mls-361 ################################################# MIT License #######
------------------------------------------------------------------------------------------------------------------------
*/
package storage
import (
"forge.chapril.org/armen/memory"
"forge.chapril.org/mls-361/errors"
"forge.chapril.org/armen/armen/internal/components"
)
// Build AFAIRE.
func Build(ccs *components.Components) (components.Storage, error) {
cfg := ccs.Config.Storage()
switch cfg.Type {
case "memory":
return memory.New(), nil
default:
return nil, errors.New( ////////////////////////////////////////////////////////////////////////////////////////
"this storage type is unknown",
"type", cfg.Type,
)
}
}
/*
######################################################################################################## @(°_°)@ #######
*/