interfaces.go 459 B

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