func NewUploadSlot()

in models/uploadslot.go [36:48]


func NewUploadSlot(projectId int, uploadPathRelative string, ttl time.Duration) (UploadSlot, error) {
	uid, uidErr := uuid.NewRandom()
	if uidErr != nil {
		log.Print("ERROR models.NewUploadSlot could not generate uuid: ", uidErr)
		return UploadSlot{}, errors.New("could not generate uuid")
	}
	return UploadSlot{
		uid,
		uploadPathRelative,
		projectId,
		time.Now().Add(ttl),
	}, nil
}