123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361 |
- // Copyright 2019 getensh.com. All rights reserved.
- // Use of this source code is governed by getensh.com.
- package impl
- import (
- impl_v7 "adm-management/impl/v1/announcement_management"
- impl_v5 "adm-management/impl/v1/api_management"
- impl_v8 "adm-management/impl/v1/data_import"
- impl_v1 "adm-management/impl/v1/data_management"
- impl_v4 "adm-management/impl/v1/field_management"
- impl_v3 "adm-management/impl/v1/manual_task"
- impl_v6 "adm-management/impl/v1/style_map_management"
- impl_v2 "adm-management/impl/v1/task_management"
- "adm-management/pb"
- pb_v1 "adm-management/pb/v1"
- "context"
- "git.getensh.com/common/gopkgsv2/tasker/rpctasker"
- "google.golang.org/grpc"
- )
- // 具体实现
- type Rcvr struct{}
- func Register(s *grpc.Server) {
- pb.RegisterManagementServer(s, &Rcvr{})
- }
- func (c *Rcvr) DataList(ctx context.Context, req *pb_v1.DataListRequest) (reply *pb_v1.DataListReply, err error) {
- t1 := func() error {
- reply, err = impl_v1.DataList(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) TableStruct(ctx context.Context, req *pb_v1.TableStructRequest) (reply *pb_v1.TableStructReply, err error) {
- t1 := func() error {
- reply, err = impl_v1.TableStruct(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) SearchData(ctx context.Context, req *pb_v1.SearchDataRequest) (reply *pb_v1.SearchDataReply, err error) {
- t1 := func() error {
- reply, err = impl_v1.SearchData(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) SearchLevel(ctx context.Context, req *pb_v1.SearchLevelRequest) (reply *pb_v1.SearchLevelReply, err error) {
- t1 := func() error {
- reply, err = impl_v1.SearchLevel(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) Relation(ctx context.Context, req *pb_v1.RelationRequest) (reply *pb_v1.RelationReply, err error) {
- t1 := func() error {
- reply, err = impl_v1.Relation(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) Switch(ctx context.Context, req *pb_v1.SwitchRequest) (reply *pb_v1.SwitchReply, err error) {
- t1 := func() error {
- reply, err = impl_v1.Switch(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) TaskList(ctx context.Context, req *pb_v1.TaskListRequest) (reply *pb_v1.TaskListReply, err error) {
- t1 := func() error {
- reply, err = impl_v2.TaskList(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) SearchTask(ctx context.Context, req *pb_v1.SearchTaskRequest) (reply *pb_v1.SearchTaskReply, err error) {
- t1 := func() error {
- reply, err = impl_v2.SearchTask(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) Dependency(ctx context.Context, req *pb_v1.DependencyRequest) (reply *pb_v1.DependencyReply, err error) {
- t1 := func() error {
- reply, err = impl_v2.Dependency(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) DataSourceRelation(ctx context.Context, req *pb_v1.DataSourceRelationRequest) (reply *pb_v1.DataSourceRelationReply, err error) {
- t1 := func() error {
- reply, err = impl_v2.DataSourceRelation(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) ManualTask(ctx context.Context, req *pb_v1.ManualTaskRequest) (reply *pb_v1.ManualTaskReply, err error) {
- t1 := func() error {
- reply, err = impl_v3.ManualTask(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) Source(ctx context.Context, req *pb_v1.SourceRequest) (reply *pb_v1.SourceReply, err error) {
- t1 := func() error {
- reply, err = impl_v3.Source(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) Task(ctx context.Context, req *pb_v1.TaskRequest) (reply *pb_v1.TaskReply, err error) {
- t1 := func() error {
- reply, err = impl_v3.Task(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) Create(ctx context.Context, req *pb_v1.CreateRequest) (reply *pb_v1.CreateReply, err error) {
- t1 := func() error {
- reply, err = impl_v3.Create(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) UploadFile(ctx context.Context, req *pb_v1.UploadFileRequest) (reply *pb_v1.UploadFileReply, err error) {
- t1 := func() error {
- reply, err = impl_v3.UploadFile(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) Field(ctx context.Context, req *pb_v1.FieldRequest) (reply *pb_v1.FieldReply, err error) {
- t1 := func() error {
- reply, err = impl_v4.Field(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) Excel(ctx context.Context, req *pb_v1.ExcelRequest) (reply *pb_v1.ExcelReply, err error) {
- t1 := func() error {
- reply, err = impl_v4.Excel(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) APIList(ctx context.Context, req *pb_v1.APIListRequest) (reply *pb_v1.APIListReply, err error) {
- t1 := func() error {
- reply, err = impl_v5.APIList(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) CheckAPI(ctx context.Context, req *pb_v1.CheckAPIRequest) (reply *pb_v1.CheckAPIReply, err error) {
- t1 := func() error {
- reply, err = impl_v5.CheckAPI(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) DeleteAPI(ctx context.Context, req *pb_v1.DeleteAPIRequest) (reply *pb_v1.DeleteAPIReply, err error) {
- t1 := func() error {
- reply, err = impl_v5.DeleteAPI(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) KeyList(ctx context.Context, req *pb_v1.KeyListRequest) (reply *pb_v1.KeyListReply, err error) {
- t1 := func() error {
- reply, err = impl_v5.KeyList(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) CreateKey(ctx context.Context, req *pb_v1.CreateKeyRequest) (reply *pb_v1.CreateKeyReply, err error) {
- t1 := func() error {
- reply, err = impl_v5.CreateKey(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) DeleteKey(ctx context.Context, req *pb_v1.DeleteKeyRequest) (reply *pb_v1.DeleteKeyReply, err error) {
- t1 := func() error {
- reply, err = impl_v5.DeleteKey(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) AllAPI(ctx context.Context, req *pb_v1.AllAPIRequest) (reply *pb_v1.AllAPIReply, err error) {
- t1 := func() error {
- reply, err = impl_v5.AllAPI(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) AllKey(ctx context.Context, req *pb_v1.AllKeyRequest) (reply *pb_v1.AllKeyReply, err error) {
- t1 := func() error {
- reply, err = impl_v5.AllKey(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) UseAPI(ctx context.Context, req *pb_v1.UseAPIRequest) (reply *pb_v1.UseAPIReply, err error) {
- t1 := func() error {
- reply, err = impl_v5.UseAPI(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) UpdateAPI(ctx context.Context, req *pb_v1.UpdateAPIRequest) (reply *pb_v1.UpdateAPIReply, err error) {
- t1 := func() error {
- reply, err = impl_v5.UpdateAPI(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) StyleMap(ctx context.Context, req *pb_v1.StyleMapRequest) (reply *pb_v1.StyleMapReply, err error) {
- t1 := func() error {
- reply, err = impl_v6.StyleMap(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) EditMap(ctx context.Context, req *pb_v1.EditMapRequest) (reply *pb_v1.EditMapReply, err error) {
- t1 := func() error {
- reply, err = impl_v6.EditMap(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) AllSource(ctx context.Context, req *pb_v1.AllSourceRequest) (reply *pb_v1.AllSourceReply, err error) {
- t1 := func() error {
- reply, err = impl_v6.AllSource(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) AnnouncementList(ctx context.Context, req *pb_v1.AnnouncementRequest) (reply *pb_v1.AnnouncementReply, err error) {
- t1 := func() error {
- reply, err = impl_v7.AnnouncementList(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) Edit(ctx context.Context, req *pb_v1.EditRequest) (reply *pb_v1.EditReply, err error) {
- t1 := func() error {
- reply, err = impl_v7.EditList(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) DataImportTemplate(ctx context.Context, req *pb_v1.DataImportTemplateRequest) (reply *pb_v1.DataImportTemplateReply, err error) {
- t1 := func() error {
- reply, err = impl_v8.DataImportTemplate(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) CreateTemplate(ctx context.Context, req *pb_v1.CreateTemplateRequest) (reply *pb_v1.CreateTemplateReply, err error) {
- t1 := func() error {
- reply, err = impl_v8.CreateTemplate(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) EditTemplate(ctx context.Context, req *pb_v1.EditTemplateRequest) (reply *pb_v1.EditTemplateReply, err error) {
- t1 := func() error {
- reply, err = impl_v8.EditTemplate(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) DeleteTemplate(ctx context.Context, req *pb_v1.DeleteTemplateRequest) (reply *pb_v1.DeleteTemplateReply, err error) {
- t1 := func() error {
- reply, err = impl_v8.DeleteTemplate(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
- func (c *Rcvr) DataImport(ctx context.Context, req *pb_v1.DataImportRequest) (reply *pb_v1.DataImportReply, err error) {
- t1 := func() error {
- reply, err = impl_v8.DataImport(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
|