3
0
Files
corteza/internal/payload/outgoing/attachment.go
Denis Arh 9d9c10044b Improve attachment handling
- flexible meta data struct for uploaded files
 - prevew generator (images only for now)
 - using outgoing types for return data (to cover attachment url generation in one place)
2018-09-29 12:02:19 +02:00

21 lines
458 B
Go

package outgoing
import (
"time"
)
type (
Attachment struct {
ID string `json:"ID"`
UserID string `json:"userID"`
Url string `json:"url"`
PreviewUrl string `json:"previewUrl,omitempty"`
Meta interface{} `json:"meta"`
Name string `json:"name"`
CreatedAt time.Time `json:"createdAt,omitempty"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
}
AttachmentSet []*Attachment
)