mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-08 16:00:26 +08:00
19 lines
326 B
Go
19 lines
326 B
Go
package models
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/rpc"
|
|
"github.com/iwind/TeaGo/logs"
|
|
)
|
|
|
|
type BaseDAO struct {
|
|
}
|
|
|
|
func (this *BaseDAO) RPC() *rpc.RPCClient {
|
|
client, err := rpc.SharedRPC()
|
|
if err != nil {
|
|
logs.Println("[MODEL]get shared rpc client failed: " + err.Error())
|
|
return nil
|
|
}
|
|
return client
|
|
}
|