mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-21 06:25:08 +00:00
Commit from m3o/m3o action
This commit is contained in:
@@ -18,26 +18,34 @@ type FileService struct {
|
||||
|
||||
// Delete a file by project name/path
|
||||
func (t *FileService) Delete(request *DeleteRequest) (*DeleteResponse, error) {
|
||||
|
||||
rsp := &DeleteResponse{}
|
||||
return rsp, t.client.Call("file", "Delete", request, rsp)
|
||||
|
||||
}
|
||||
|
||||
// List files by their project and optionally a path.
|
||||
func (t *FileService) List(request *ListRequest) (*ListResponse, error) {
|
||||
|
||||
rsp := &ListResponse{}
|
||||
return rsp, t.client.Call("file", "List", request, rsp)
|
||||
|
||||
}
|
||||
|
||||
// Read a file by path
|
||||
func (t *FileService) Read(request *ReadRequest) (*ReadResponse, error) {
|
||||
|
||||
rsp := &ReadResponse{}
|
||||
return rsp, t.client.Call("file", "Read", request, rsp)
|
||||
|
||||
}
|
||||
|
||||
// Save a file
|
||||
func (t *FileService) Save(request *SaveRequest) (*SaveResponse, error) {
|
||||
|
||||
rsp := &SaveResponse{}
|
||||
return rsp, t.client.Call("file", "Save", request, rsp)
|
||||
|
||||
}
|
||||
|
||||
type BatchSaveRequest struct {
|
||||
|
||||
Reference in New Issue
Block a user