You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
551 B
Go
26 lines
551 B
Go
package api
|
|
|
|
import "time"
|
|
|
|
type File struct {
|
|
Name string `form:"name"`
|
|
SHA256 string `form:"sha256"`
|
|
Size int64 `form:"size"`
|
|
Type string `form:"type"` // MIME type
|
|
}
|
|
|
|
//TODO: field validation
|
|
type UploadForm struct {
|
|
Files []File `form:"files" binding:"required"`
|
|
|
|
// Ask payment
|
|
RequestPayment bool `json:"request_payment"`
|
|
|
|
RequestPaymentAmount float64 `json:"request_payment_amount" binding:"min=1"`
|
|
|
|
PaymentCurrency string `json:"payment_currency"`
|
|
|
|
// Default Date().toJSON() from js
|
|
TimeStamp time.Time `json:"timestamp"`
|
|
}
|