Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature (framework): create the basis for the development custom back…
…ends
- Loading branch information
1 parent
696b852
commit bfacd4b
Showing
12 changed files
with
117 additions
and
16 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
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
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
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
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
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
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
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
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
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,42 @@ | ||
package backend | ||
|
||
import ( | ||
. "github.com/mickael-kerjean/nuage/server/common" | ||
"io" | ||
"os" | ||
"strings" | ||
) | ||
|
||
type CustomBackend struct { | ||
} | ||
|
||
func NewCustomBackend(params map[string]string, app *App) (*CustomBackend, error) { | ||
return &CustomBackend{}, nil | ||
} | ||
|
||
func (b CustomBackend) Info() string { | ||
return "N/A" | ||
} | ||
|
||
func (b CustomBackend) Ls(path string) ([]os.FileInfo, error) { | ||
return nil, NewError("", 401) | ||
} | ||
|
||
func (b CustomBackend) Cat(path string) (io.Reader, error) { | ||
return strings.NewReader(""), NewError("", 401) | ||
} | ||
func (b CustomBackend) Mkdir(path string) error { | ||
return NewError("", 401) | ||
} | ||
func (b CustomBackend) Rm(path string) error { | ||
return NewError("", 401) | ||
} | ||
func (b CustomBackend) Mv(from string, to string) error { | ||
return NewError("", 401) | ||
} | ||
func (b CustomBackend) Touch(path string) error { | ||
return NewError("", 401) | ||
} | ||
func (b CustomBackend) Save(path string, file io.Reader) error { | ||
return NewError("", 401) | ||
} |
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
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