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.
 
 

35 lines
1012 B

package models
import "time"
// A File is a record of a file stored in the Space.
type File struct {
ID string `bson:"_id" json:"id"`
Time time.Time `bson:"time" json:"time"`
Kind string `bson:"kind" json:"kind"`
Public bool `bson:"public" json:"public"`
Name string `bson:"name" json:"name"`
MimeType string `bson:"mimeType" json:"mimeType"`
Size int64 `bson:"size" json:"size"`
Author string `bson:"author" json:"author"`
URL string `bson:"url,omitempty" json:"url,omitempty"`
}
// IsChangeObject is an interface implementation to identify it as a valid
// ChangeObject in GQL.
func (*File) IsChangeObject() {
panic("this method is a dummy, and so is its caller")
}
// A FileFilter is a filter that can be used to filter files.
type FileFilter struct {
Author *string
Public *bool
MimeTypes []string
}
// A FileUpdate is a set of changes possible to do on file metadata.
type FileUpdate struct {
Public *bool
Name *string
}