forked from PinataCloud/pinata-go-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Refactored uploads, added list and delete as subcommand to files
- Loading branch information
1 parent
40376e3
commit 8a3d09e
Showing
5 changed files
with
123 additions
and
110 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package main | ||
|
||
type UploadResponse struct { | ||
Data struct { | ||
Id string `json:"id"` | ||
Name string `json:"name"` | ||
Cid string `json:"cid"` | ||
Size int `json:"size"` | ||
NumberOfFiles int `json:"number_of_files"` | ||
MimeType string `json:"mime_type"` | ||
UserId string `json:"user_id"` | ||
CreatedAt string `json:"created_at"` | ||
GroupId string `json:"group_id,omitempty"` | ||
IsDuplicate bool `json:"is_duplicate,omitempty"` | ||
} `json:"data"` | ||
} | ||
|
||
type Options struct { | ||
GroupId string `json:"group_id"` | ||
} | ||
|
||
type Metadata struct { | ||
Name string `json:"name"` | ||
} | ||
|
||
type File struct { | ||
Id string `json:"id"` | ||
Name string `json:"name"` | ||
Cid string `json:"cid"` | ||
Size int `json:"size"` | ||
NumberOfFiles int `json:"number_of_files"` | ||
MimeType string `json:"mime_type"` | ||
GroupId *string `json:"group_id,omitempty"` | ||
CreatedAt string `json:"created_at"` | ||
} | ||
|
||
type ListFilesData struct { | ||
Files []File `json:"files"` | ||
NextPageToken string `json:"next_page_token"` | ||
} | ||
|
||
type ListResponse struct { | ||
Data ListFilesData `json:"data"` | ||
} |