Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
package sidebar
import (
"context"
"go-common/app/interface/main/app-interface/conf"
resmodel "go-common/app/service/main/resource/model"
resrpc "go-common/app/service/main/resource/rpc/client"
"github.com/pkg/errors"
)
// Dao is sidebar dao
type Dao struct {
resRPC *resrpc.Service
}
// New initial sidebar dao
func New(c *conf.Config) (d *Dao) {
d = &Dao{
resRPC: resrpc.New(c.ResourceRPC),
}
return
}
// Sidebars from resource service
func (d *Dao) Sidebars(c context.Context) (res *resmodel.SideBars, err error) {
if res, err = d.resRPC.SideBars(c); err != nil {
err = errors.Wrapf(err, "d.resRPC.SideBars(%+v)")
}
return
}