mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 07:33:21 +00:00
refactoring
This commit is contained in:
parent
1ab2939041
commit
465ef4b493
18 changed files with 361 additions and 369 deletions
40
handlers.go
Normal file
40
handlers.go
Normal file
|
@ -0,0 +1,40 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type Handler func(w http.ResponseWriter, r *http.Request, c *Context)
|
||||
|
||||
func HeadConfig(w http.ResponseWriter, r *http.Request, c *Context) {
|
||||
fmt.Fprintln(w, "head config")
|
||||
}
|
||||
|
||||
func GetConfig(w http.ResponseWriter, r *http.Request, c *Context) {
|
||||
fmt.Fprintln(w, "get config")
|
||||
}
|
||||
|
||||
func PostConfig(w http.ResponseWriter, r *http.Request, c *Context) {
|
||||
fmt.Fprintln(w, "post config")
|
||||
}
|
||||
|
||||
func ListBlob(w http.ResponseWriter, r *http.Request, c *Context) {
|
||||
fmt.Fprintln(w, "list blob")
|
||||
}
|
||||
|
||||
func HeadBlob(w http.ResponseWriter, r *http.Request, c *Context) {
|
||||
fmt.Fprintln(w, "head blob")
|
||||
}
|
||||
|
||||
func GetBlob(w http.ResponseWriter, r *http.Request, c *Context) {
|
||||
fmt.Fprintln(w, "get blob")
|
||||
}
|
||||
|
||||
func PostBlob(w http.ResponseWriter, r *http.Request, c *Context) {
|
||||
fmt.Fprintln(w, "post blob")
|
||||
}
|
||||
|
||||
func DeleteBlob(w http.ResponseWriter, r *http.Request, c *Context) {
|
||||
fmt.Fprintln(w, "delete blob")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue