2020-02-04 05:18:22 +01:00
|
|
|
package form
|
|
|
|
|
|
|
|
type Selection struct {
|
2020-05-25 19:10:44 +02:00
|
|
|
Files []string `json:"files"`
|
2020-02-04 05:18:22 +01:00
|
|
|
Photos []string `json:"photos"`
|
|
|
|
Albums []string `json:"albums"`
|
|
|
|
Labels []string `json:"labels"`
|
2020-05-25 19:10:44 +02:00
|
|
|
Places []string `json:"places"`
|
2020-02-04 05:18:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func (f Selection) Empty() bool {
|
2020-05-25 19:10:44 +02:00
|
|
|
switch {
|
|
|
|
case len(f.Files) > 0:
|
|
|
|
return false
|
|
|
|
case len(f.Photos) > 0:
|
|
|
|
return false
|
|
|
|
case len(f.Albums) > 0:
|
|
|
|
return false
|
|
|
|
case len(f.Labels) > 0:
|
|
|
|
return false
|
|
|
|
case len(f.Places) > 0:
|
2020-02-04 05:18:22 +01:00
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
return true
|
|
|
|
}
|