mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-19 00:50:29 +00:00
Initial commit
This commit is contained in:
commit
29f583e936
135 changed files with 18463 additions and 0 deletions
29
backend/app/api/v1/controller.go
Normal file
29
backend/app/api/v1/controller.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
package v1
|
||||
|
||||
import (
|
||||
"github.com/hay-kot/git-web-template/backend/internal/services"
|
||||
"github.com/hay-kot/git-web-template/backend/pkgs/logger"
|
||||
)
|
||||
|
||||
type V1Controller struct {
|
||||
log *logger.Logger
|
||||
svc *services.AllServices
|
||||
}
|
||||
|
||||
func BaseUrlFunc(prefix string) func(s string) string {
|
||||
v1Base := prefix + "/v1"
|
||||
prefixFunc := func(s string) string {
|
||||
return v1Base + s
|
||||
}
|
||||
|
||||
return prefixFunc
|
||||
}
|
||||
|
||||
func NewControllerV1(log *logger.Logger, svc *services.AllServices) *V1Controller {
|
||||
ctrl := &V1Controller{
|
||||
log: log,
|
||||
svc: svc,
|
||||
}
|
||||
|
||||
return ctrl
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue