26 lines
389 B
Go
Raw Normal View History

2023-10-08 15:59:42 +07:00
package app
import (
"fmt"
"github.com/gin-gonic/gin"
2025-07-18 20:10:29 +07:00
"github.com/google/uuid"
2023-10-08 15:59:42 +07:00
)
type Server struct {
*gin.Engine
}
2025-07-18 20:10:29 +07:00
func generateServerID() string {
return uuid.New().String()
2023-10-08 15:59:42 +07:00
}
func (s Server) Listen(address string) error {
fmt.Printf("API server listening at: %s\n\n", address)
return s.Run(address)
}
func (s Server) StartScheduler() {
fmt.Printf("Scheduler started\n")
}