-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
50 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Copyright 2020 Clivern. All rights reserved. | ||
// Use of this source code is governed by the MIT | ||
// license that can be found in the LICENSE file. | ||
|
||
package module | ||
|
||
// File struct | ||
type File struct { | ||
Timestamp int | ||
Content string | ||
} | ||
|
||
// FileSystem struct | ||
type FileSystem struct { | ||
} | ||
|
||
// LoadFromLocal gets files from a local path | ||
func (f *FileSystem) LoadFromLocal(basePath string) error { | ||
|
||
} | ||
|
||
// DumpLocally updates a local path | ||
func (f *FileSystem) DumpLocally(basePath string) error { | ||
|
||
} | ||
|
||
// UpdateFromRemote update fs object from remote fs | ||
func (f *FileSystem) UpdateFromRemote(remoteFs FileSystem) error { | ||
|
||
} | ||
|
||
// LoadFromJSON update object from json | ||
func (f *FileSystem) LoadFromJSON(data []byte) (bool, error) { | ||
err := json.Unmarshal(data, &f) | ||
if err != nil { | ||
return false, err | ||
} | ||
|
||
return true, nil | ||
} | ||
|
||
// ConvertToJSON convert object to json | ||
func (f *FileSystem) ConvertToJSON() (string, error) { | ||
data, err := json.Marshal(&f) | ||
if err != nil { | ||
return "", err | ||
} | ||
|
||
return string(data), nil | ||
} |
This file was deleted.
Oops, something went wrong.