- 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)
21 lines
458 B
Go
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
|
|
)
|