GraphQL API and utilities for the rpdata project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
738 B

  1. package models
  2. import "time"
  3. // A File is a record of a file stored in the Space.
  4. type File struct {
  5. ID string `bson:"_id" json:"id"`
  6. Time time.Time `bson:"time" json:"time"`
  7. Kind string `bson:"kind" json:"kind"`
  8. Public bool `bson:"public" json:"public"`
  9. Name string `bson:"name" json:"name"`
  10. MimeType string `bson:"mimeType" json:"mimeType"`
  11. Size int64 `bson:"size" json:"size"`
  12. Author string `bson:"author" json:"author"`
  13. URL string `bson:"url,omitempty" json:"url,omitempty"`
  14. }
  15. // IsChangeObject is an interface implementation to identify it as a valid
  16. // ChangeObject in GQL.
  17. func (*File) IsChangeObject() {
  18. panic("this method is a dummy, and so is its caller")
  19. }