working commit

This commit is contained in:
2026-01-23 19:26:56 +02:00
parent 772657d9be
commit d704a76bee
10 changed files with 161 additions and 76 deletions
+52 -9
View File
@@ -1,19 +1,62 @@
package operator
import (
"io"
"net/http"
)
type FileExistsParams struct{}
type FileExistsResult struct {
Code int
// File exists
type FileExistsParams struct {
Filepath string
Source string
Dest string
}
type FileExistsResult struct{}
func (oper *Operator) FileExists(param *FileExistsParams) (*FileExistsResult, error) {
func (oper *Operator) FileExists(param *FileExistsParams) (int, *FileExistsResult, error) {
var err error
res := &FileExistsResult{
Code: http.StatusOK,
}
return res, err
res := &FileExistsResult{}
code := http.StatusOK
return code, res, err
}
// Put file
type PutFileParams struct {
Filepath string
Source string
}
type PutFileResult struct{}
func (oper *Operator) PutFile(param *PutFileParams) (int, *PutFileResult, error) {
var err error
res := &PutFileResult{}
code := http.StatusOK
return code, res, err
}
// Get file
type GetFileParams struct {
Filepath string
Dest io.Writer
}
type GetFileResult struct{}
func (oper *Operator) GetFile(param *GetFileParams) (int, *GetFileResult, error) {
var err error
res := &GetFileResult{}
code := http.StatusOK
return code, res, err
}
// Delete file
type DeleteFileParams struct {
Filepath string
}
type DeleteFileResult struct{}
func (oper *Operator) DeleteFile(param *DeleteFileParams) (int, *DeleteFileResult, error) {
var err error
res := &DeleteFileResult{}
code := http.StatusOK
return code, res, err
}