repo: Implement memrepo.SetStorage
This commit is contained in:
parent
33fcf8eb44
commit
1cf26fc652
@ -40,16 +40,22 @@ type lockedMemRepo struct {
|
|||||||
|
|
||||||
tempDir string
|
tempDir string
|
||||||
token *byte
|
token *byte
|
||||||
|
sc *config.StorageConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
func (lmem *lockedMemRepo) GetStorage() (config.StorageConfig, error) {
|
func (lmem *lockedMemRepo) GetStorage() (config.StorageConfig, error) {
|
||||||
return config.StorageConfig{StoragePaths: []config.LocalPath{
|
if lmem.sc == nil {
|
||||||
{Path: lmem.Path()},
|
lmem.sc = &config.StorageConfig{StoragePaths: []config.LocalPath{
|
||||||
}}, nil
|
{Path: lmem.Path()},
|
||||||
|
}}
|
||||||
|
}
|
||||||
|
|
||||||
|
return *lmem.sc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (lmem *lockedMemRepo) SetStorage(config.StorageConfig) error {
|
func (lmem *lockedMemRepo) SetStorage(sc config.StorageConfig) error {
|
||||||
panic("implement me")
|
lmem.sc = &sc
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (lmem *lockedMemRepo) Path() string {
|
func (lmem *lockedMemRepo) Path() string {
|
||||||
|
Loading…
Reference in New Issue
Block a user