homebox/backend/app/api/v1/controller.go
2022-08-29 18:40:54 -08:00

29 lines
525 B
Go

package v1
import (
"github.com/hay-kot/content/backend/internal/services"
"github.com/hay-kot/content/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
}