(e Engine, uuids []string)
| 112 | } |
| 113 | |
| 114 | func getAttachmentsByUUIDs(e Engine, uuids []string) ([]*Attachment, error) { |
| 115 | if len(uuids) == 0 { |
| 116 | return []*Attachment{}, nil |
| 117 | } |
| 118 | |
| 119 | // Silently drop invalid uuids. |
| 120 | attachments := make([]*Attachment, 0, len(uuids)) |
| 121 | return attachments, e.In("uuid", uuids).Find(&attachments) |
| 122 | } |
| 123 | |
| 124 | // GetAttachmentByUUID returns attachment by given UUID. |
| 125 | func GetAttachmentByUUID(uuid string) (*Attachment, error) { |