// Code generated by protoc-gen-micro. DO NOT EDIT. // source: w_library.proto package w_librarypb import ( fmt "fmt" proto "google.golang.org/protobuf/proto" math "math" ) import ( context "context" api "go-micro.dev/v4/api" client "go-micro.dev/v4/client" server "go-micro.dev/v4/server" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // Reference imports to suppress errors if they are not otherwise used. var _ api.Endpoint var _ context.Context var _ client.Option var _ server.Option // Api Endpoints for WLibrary service func NewWLibraryEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for WLibrary service type WLibraryService interface { // QaGroup 题库列表 QaGroup(ctx context.Context, in *QaGroupReq, opts ...client.CallOption) (*QaGroupRes, error) // StoreQaGroup 创建题库 StoreQaGroup(ctx context.Context, in *StoreQaGroupReq, opts ...client.CallOption) (*StoreQaGroupRes, error) // UpdateQaGroup 更新题库 UpdateQaGroup(ctx context.Context, in *UpdateQaGroupReq, opts ...client.CallOption) (*UpdateQaGroupRes, error) // DestroyQaGroup 删除题库 DestroyQaGroup(ctx context.Context, in *DestroyQaGroupReq, opts ...client.CallOption) (*DestroyQaGroupRes, error) // QaList 问题列表 QaList(ctx context.Context, in *QaListReq, opts ...client.CallOption) (*QaListRes, error) // StoreQa 问题列表 StoreQa(ctx context.Context, in *StoreQaReq, opts ...client.CallOption) (*StoreQaRes, error) // UpdateQa 问题列表 UpdateQa(ctx context.Context, in *UpdateQaReq, opts ...client.CallOption) (*UpdateQaRes, error) // DestroyQa 问题列表 DestroyQa(ctx context.Context, in *DestroyQaReq, opts ...client.CallOption) (*DestroyQaRes, error) // QaGroupSelect 题库选项 QaGroupSelect(ctx context.Context, in *QaGroupSelectReq, opts ...client.CallOption) (*QaGroupSelectRes, error) // QaRand 随机问题 QaRand(ctx context.Context, in *QaRandReq, opts ...client.CallOption) (*QaRandRes, error) // QaShow 问题详情 QaShow(ctx context.Context, in *QaShowReq, opts ...client.CallOption) (*QaShowRes, error) } type wLibraryService struct { c client.Client name string } func NewWLibraryService(name string, c client.Client) WLibraryService { return &wLibraryService{ c: c, name: name, } } func (c *wLibraryService) QaGroup(ctx context.Context, in *QaGroupReq, opts ...client.CallOption) (*QaGroupRes, error) { req := c.c.NewRequest(c.name, "WLibrary.QaGroup", in) out := new(QaGroupRes) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *wLibraryService) StoreQaGroup(ctx context.Context, in *StoreQaGroupReq, opts ...client.CallOption) (*StoreQaGroupRes, error) { req := c.c.NewRequest(c.name, "WLibrary.StoreQaGroup", in) out := new(StoreQaGroupRes) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *wLibraryService) UpdateQaGroup(ctx context.Context, in *UpdateQaGroupReq, opts ...client.CallOption) (*UpdateQaGroupRes, error) { req := c.c.NewRequest(c.name, "WLibrary.UpdateQaGroup", in) out := new(UpdateQaGroupRes) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *wLibraryService) DestroyQaGroup(ctx context.Context, in *DestroyQaGroupReq, opts ...client.CallOption) (*DestroyQaGroupRes, error) { req := c.c.NewRequest(c.name, "WLibrary.DestroyQaGroup", in) out := new(DestroyQaGroupRes) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *wLibraryService) QaList(ctx context.Context, in *QaListReq, opts ...client.CallOption) (*QaListRes, error) { req := c.c.NewRequest(c.name, "WLibrary.QaList", in) out := new(QaListRes) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *wLibraryService) StoreQa(ctx context.Context, in *StoreQaReq, opts ...client.CallOption) (*StoreQaRes, error) { req := c.c.NewRequest(c.name, "WLibrary.StoreQa", in) out := new(StoreQaRes) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *wLibraryService) UpdateQa(ctx context.Context, in *UpdateQaReq, opts ...client.CallOption) (*UpdateQaRes, error) { req := c.c.NewRequest(c.name, "WLibrary.UpdateQa", in) out := new(UpdateQaRes) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *wLibraryService) DestroyQa(ctx context.Context, in *DestroyQaReq, opts ...client.CallOption) (*DestroyQaRes, error) { req := c.c.NewRequest(c.name, "WLibrary.DestroyQa", in) out := new(DestroyQaRes) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *wLibraryService) QaGroupSelect(ctx context.Context, in *QaGroupSelectReq, opts ...client.CallOption) (*QaGroupSelectRes, error) { req := c.c.NewRequest(c.name, "WLibrary.QaGroupSelect", in) out := new(QaGroupSelectRes) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *wLibraryService) QaRand(ctx context.Context, in *QaRandReq, opts ...client.CallOption) (*QaRandRes, error) { req := c.c.NewRequest(c.name, "WLibrary.QaRand", in) out := new(QaRandRes) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *wLibraryService) QaShow(ctx context.Context, in *QaShowReq, opts ...client.CallOption) (*QaShowRes, error) { req := c.c.NewRequest(c.name, "WLibrary.QaShow", in) out := new(QaShowRes) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for WLibrary service type WLibraryHandler interface { // QaGroup 题库列表 QaGroup(context.Context, *QaGroupReq, *QaGroupRes) error // StoreQaGroup 创建题库 StoreQaGroup(context.Context, *StoreQaGroupReq, *StoreQaGroupRes) error // UpdateQaGroup 更新题库 UpdateQaGroup(context.Context, *UpdateQaGroupReq, *UpdateQaGroupRes) error // DestroyQaGroup 删除题库 DestroyQaGroup(context.Context, *DestroyQaGroupReq, *DestroyQaGroupRes) error // QaList 问题列表 QaList(context.Context, *QaListReq, *QaListRes) error // StoreQa 问题列表 StoreQa(context.Context, *StoreQaReq, *StoreQaRes) error // UpdateQa 问题列表 UpdateQa(context.Context, *UpdateQaReq, *UpdateQaRes) error // DestroyQa 问题列表 DestroyQa(context.Context, *DestroyQaReq, *DestroyQaRes) error // QaGroupSelect 题库选项 QaGroupSelect(context.Context, *QaGroupSelectReq, *QaGroupSelectRes) error // QaRand 随机问题 QaRand(context.Context, *QaRandReq, *QaRandRes) error // QaShow 问题详情 QaShow(context.Context, *QaShowReq, *QaShowRes) error } func RegisterWLibraryHandler(s server.Server, hdlr WLibraryHandler, opts ...server.HandlerOption) error { type wLibrary interface { QaGroup(ctx context.Context, in *QaGroupReq, out *QaGroupRes) error StoreQaGroup(ctx context.Context, in *StoreQaGroupReq, out *StoreQaGroupRes) error UpdateQaGroup(ctx context.Context, in *UpdateQaGroupReq, out *UpdateQaGroupRes) error DestroyQaGroup(ctx context.Context, in *DestroyQaGroupReq, out *DestroyQaGroupRes) error QaList(ctx context.Context, in *QaListReq, out *QaListRes) error StoreQa(ctx context.Context, in *StoreQaReq, out *StoreQaRes) error UpdateQa(ctx context.Context, in *UpdateQaReq, out *UpdateQaRes) error DestroyQa(ctx context.Context, in *DestroyQaReq, out *DestroyQaRes) error QaGroupSelect(ctx context.Context, in *QaGroupSelectReq, out *QaGroupSelectRes) error QaRand(ctx context.Context, in *QaRandReq, out *QaRandRes) error QaShow(ctx context.Context, in *QaShowReq, out *QaShowRes) error } type WLibrary struct { wLibrary } h := &wLibraryHandler{hdlr} return s.Handle(s.NewHandler(&WLibrary{h}, opts...)) } type wLibraryHandler struct { WLibraryHandler } func (h *wLibraryHandler) QaGroup(ctx context.Context, in *QaGroupReq, out *QaGroupRes) error { return h.WLibraryHandler.QaGroup(ctx, in, out) } func (h *wLibraryHandler) StoreQaGroup(ctx context.Context, in *StoreQaGroupReq, out *StoreQaGroupRes) error { return h.WLibraryHandler.StoreQaGroup(ctx, in, out) } func (h *wLibraryHandler) UpdateQaGroup(ctx context.Context, in *UpdateQaGroupReq, out *UpdateQaGroupRes) error { return h.WLibraryHandler.UpdateQaGroup(ctx, in, out) } func (h *wLibraryHandler) DestroyQaGroup(ctx context.Context, in *DestroyQaGroupReq, out *DestroyQaGroupRes) error { return h.WLibraryHandler.DestroyQaGroup(ctx, in, out) } func (h *wLibraryHandler) QaList(ctx context.Context, in *QaListReq, out *QaListRes) error { return h.WLibraryHandler.QaList(ctx, in, out) } func (h *wLibraryHandler) StoreQa(ctx context.Context, in *StoreQaReq, out *StoreQaRes) error { return h.WLibraryHandler.StoreQa(ctx, in, out) } func (h *wLibraryHandler) UpdateQa(ctx context.Context, in *UpdateQaReq, out *UpdateQaRes) error { return h.WLibraryHandler.UpdateQa(ctx, in, out) } func (h *wLibraryHandler) DestroyQa(ctx context.Context, in *DestroyQaReq, out *DestroyQaRes) error { return h.WLibraryHandler.DestroyQa(ctx, in, out) } func (h *wLibraryHandler) QaGroupSelect(ctx context.Context, in *QaGroupSelectReq, out *QaGroupSelectRes) error { return h.WLibraryHandler.QaGroupSelect(ctx, in, out) } func (h *wLibraryHandler) QaRand(ctx context.Context, in *QaRandReq, out *QaRandRes) error { return h.WLibraryHandler.QaRand(ctx, in, out) } func (h *wLibraryHandler) QaShow(ctx context.Context, in *QaShowReq, out *QaShowRes) error { return h.WLibraryHandler.QaShow(ctx, in, out) }