Documentation ¶
Index ¶
- Constants
- type Server
- func (s Server) HandlerDownload(w http.ResponseWriter, r *http.Request)
- func (s Server) HandlerForgetFile(w http.ResponseWriter, r *http.Request)
- func (s Server) HandlerUpload(w http.ResponseWriter, r *http.Request)
- func (s Server) RegisterHandlers()
- func (s Server) ScheduleForgetFile(ctx context.Context, fileUUID string, nbChunks int) (*taskspb.Task, error)
Constants ¶
View Source
const (
KB = 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { GCPProjectID string BackendBaseURL string FirestoreClient *firestore.Client TasksClient *cloudtasks.Client StorageFileTTL time.Duration CloudTasksQueuePath string }
Server encapsulates the Hot Maze backend.
func (Server) HandlerDownload ¶
func (s Server) HandlerDownload(w http.ResponseWriter, r *http.Request)
HandlerDownload reads file data from Firestore and writes it to w. In worflow D1 it is possible to access this URL before the resource has actually been uploaded. Thus in case of "not found", we retry every 400ms, up to 50s.
func (Server) HandlerForgetFile ¶
func (s Server) HandlerForgetFile(w http.ResponseWriter, r *http.Request)
func (Server) HandlerUpload ¶
func (s Server) HandlerUpload(w http.ResponseWriter, r *http.Request)
func (Server) RegisterHandlers ¶
func (s Server) RegisterHandlers()
RegisterHandlers registers the handlers
Click to show internal directories.
Click to hide internal directories.