The framework currently only provides HTTP communication, allowing the frontend and Electron process to communicate with it. Other communication methods are under development...
router
Define HTTP routes and bind them to methods.
Usage
go
package router
import (
"electron-egg/api"
eRouter "github.com/wallace5303/ee-go/ehttp/router"
)
func Api() {
// Register routes
eRouter.Handle("GET", "/api/hello", api.Hello)
eRouter.Handle("GET", "/api/exit", api.Exit)
// Register routes using gin
// GinRouter is an instance created by gin.New(), so you can use all gin features
eRouter.GinRouter.GET("/api/info", api.Info)
}