Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Jul 24, 2020
1 parent c99e27e commit a560f97
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 40 deletions.
50 changes: 50 additions & 0 deletions core/module/fs.go
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
}
40 changes: 0 additions & 40 deletions core/module/sync.go

This file was deleted.

0 comments on commit a560f97

Please sign in to comment.