refactor: add api v1 package

This commit is contained in:
Steven
2023-06-19 00:54:09 +08:00
parent a9f33cef6a
commit 96bcbbba68
9 changed files with 272 additions and 42 deletions

23
api/v1/v1.go Normal file
View File

@ -0,0 +1,23 @@
package v1
import (
"github.com/boojack/shortify/server/profile"
"github.com/boojack/shortify/store"
"github.com/labstack/echo/v4"
)
type APIV1Service struct {
Profile *profile.Profile
Store *store.Store
}
func NewAPIV1Service(profile *profile.Profile, store *store.Store) *APIV1Service {
return &APIV1Service{
Profile: profile,
Store: store,
}
}
func (s *APIV1Service) Start(apiV1Group *echo.Group) {
s.RegisterUserRoutes(apiV1Group)
}