You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
671 B
Go
30 lines
671 B
Go
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, secret string) {
|
|
s.registerSystemRoutes(apiV1Group)
|
|
s.registerAuthRoutes(apiV1Group, secret)
|
|
s.registerUserRoutes(apiV1Group)
|
|
s.registerWorkspaceRoutes(apiV1Group)
|
|
s.registerWorkspaceUserRoutes(apiV1Group)
|
|
s.registerShortcutRoutes(apiV1Group)
|
|
}
|