Documentation
¶
Index ¶
Constants ¶
View Source
const FileRequestsCollection = "file_requests"
View Source
const SettingsCollection = "settings"
View Source
const TokensCollection = "tokens"
View Source
const UploadsCollection = "uploads"
View Source
const UsersCollection = "users"
Variables ¶
View Source
var ForbiddenSettingsKeys = []string{"backgrounds", "logo"} // Keys that are managed by their own endpoint.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { Id string `json:"id" bson:"_id"` Name string `json:"name" bson:"name"` Size int64 `json:"size" bson:"size"` PreviewUrl *string `json:"preview_url,omitempty" bson:"preview_url,omitempty"` ThumbnailUrl *string `json:"thumbnail_url,omitempty" bson:"thumbnail_url,omitempty"` ThumbnailHeight *int `json:"thumbnail_height" bson:"thumbnail_height"` ThumbnailWidth *int `json:"thumbnail_width" bson:"thumbnail_width"` }
type FileRequest ¶
type MailConfig ¶
type MailConfig struct { RecipientEmails []string `json:"recipient_emails,omitempty" bson:"recipient_emails,omitempty"` SenderEmail string `json:"sender_email,omitempty" bson:"sender_email,omitempty"` Message string `json:"message,omitempty" bson:"message,omitempty"` Language string `json:"language" bson:"language"` }
type SanitizedUser ¶
type SocialNetwork ¶
type Token ¶
type Token struct { Id string `json:"id" bson:"_id"` Name string `json:"name" bson:"name"` Ip string `json:"ip" bson:"ip"` CreationDate int64 `json:"creation_date" bson:"creation_date"` Token *string `json:"token,omitempty" bson:"-"` }
func (*Token) BeforeCreate ¶
type Upload ¶
type Upload struct { Id string `json:"id" bson:"_id,omitempty"` Name string `json:"name" bson:"name"` Files []*File `json:"files" bson:"files"` Backgrounds []*Image `json:"backgrounds" bson:"backgrounds"` DownloadCount int `json:"download_count" bson:"download_count"` Public bool `json:"public" bson:"public"` Ready bool `json:"-" bson:"ready"` Gallery bool `json:"gallery" bson:"gallery"` RequestId string `json:"request_id" bson:"request_id"` Date int64 `json:"date" bson:"date"` ExpirationDate *int64 `json:"expiration_date,omitempty" bson:"expiration_date,omitempty"` }
func (*Upload) BeforeCreate ¶
func (upload *Upload) BeforeCreate()
type User ¶
type User struct { Id string `json:"id" bson:"_id,omitempty" valid:"-"` FirstName string `json:"first_name" bson:"first_name" valid:"required"` LastName string `json:"last_name" bson:"last_name" valid:"required"` Password string `json:"password" bson:"password" valid:"required"` Email string `json:"email" bson:"email" valid:"email,required"` }
func (*User) BeforeCreate ¶
func (*User) Sanitize ¶
func (user *User) Sanitize() SanitizedUser
Click to show internal directories.
Click to hide internal directories.