interfaces.go 475 B

12345678910111213141516171819202122232425
  1. package pub
  2. import (
  3. "servitor/mime"
  4. "time"
  5. )
  6. type Any any
  7. type Tangible interface {
  8. Kind() string
  9. String(width int) string
  10. Preview(width int) string
  11. Parents(quantity uint) ([]Tangible, Tangible)
  12. Children() Container
  13. Timestamp() time.Time
  14. Name() string
  15. SelectLink(input int) (string, *mime.MediaType, bool)
  16. }
  17. type Container interface {
  18. /* result, index of next item, next collection */
  19. Harvest(quantity uint, startingAt uint) ([]Tangible, Container, uint)
  20. }