You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
223 lines
7.5 KiB
Go
223 lines
7.5 KiB
Go
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
|
// source: w_common.proto
|
|
|
|
package w_commonpb
|
|
|
|
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 WCommon service
|
|
|
|
func NewWCommonEndpoints() []*api.Endpoint {
|
|
return []*api.Endpoint{}
|
|
}
|
|
|
|
// Client API for WCommon service
|
|
|
|
type WCommonService interface {
|
|
// PolicyToken 获取阿里云token
|
|
PolicyToken(ctx context.Context, in *PolicyTokenReq, opts ...client.CallOption) (*PolicyTokenRes, error)
|
|
// Whitelist 服务器白名单
|
|
Whitelist(ctx context.Context, in *WhitelistReq, opts ...client.CallOption) (*WhitelistRes, error)
|
|
// Download 下载
|
|
Download(ctx context.Context, in *DownloadReq, opts ...client.CallOption) (*DownloadRes, error)
|
|
// DownloadStatus 下载状态
|
|
DownloadStatus(ctx context.Context, in *DownloadStatusReq, opts ...client.CallOption) (*DownloadStatusRes, error)
|
|
// OperateLog dashboard操作日志
|
|
OperateLog(ctx context.Context, in *OperateLogReq, opts ...client.CallOption) (*OperateLogRes, error)
|
|
// SaveMaterial 保存素材
|
|
SaveMaterial(ctx context.Context, in *SaveMaterialReq, opts ...client.CallOption) (*SaveMaterialRes, error)
|
|
// MaterialList 素材列表
|
|
MaterialList(ctx context.Context, in *MaterialListReq, opts ...client.CallOption) (*MaterialListRes, error)
|
|
// CompanyMade 企业定制组件列表
|
|
CompanyMade(ctx context.Context, in *CompanyMadeReq, opts ...client.CallOption) (*CompanyMadeRes, error)
|
|
}
|
|
|
|
type wCommonService struct {
|
|
c client.Client
|
|
name string
|
|
}
|
|
|
|
func NewWCommonService(name string, c client.Client) WCommonService {
|
|
return &wCommonService{
|
|
c: c,
|
|
name: name,
|
|
}
|
|
}
|
|
|
|
func (c *wCommonService) PolicyToken(ctx context.Context, in *PolicyTokenReq, opts ...client.CallOption) (*PolicyTokenRes, error) {
|
|
req := c.c.NewRequest(c.name, "WCommon.PolicyToken", in)
|
|
out := new(PolicyTokenRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wCommonService) Whitelist(ctx context.Context, in *WhitelistReq, opts ...client.CallOption) (*WhitelistRes, error) {
|
|
req := c.c.NewRequest(c.name, "WCommon.Whitelist", in)
|
|
out := new(WhitelistRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wCommonService) Download(ctx context.Context, in *DownloadReq, opts ...client.CallOption) (*DownloadRes, error) {
|
|
req := c.c.NewRequest(c.name, "WCommon.Download", in)
|
|
out := new(DownloadRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wCommonService) DownloadStatus(ctx context.Context, in *DownloadStatusReq, opts ...client.CallOption) (*DownloadStatusRes, error) {
|
|
req := c.c.NewRequest(c.name, "WCommon.DownloadStatus", in)
|
|
out := new(DownloadStatusRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wCommonService) OperateLog(ctx context.Context, in *OperateLogReq, opts ...client.CallOption) (*OperateLogRes, error) {
|
|
req := c.c.NewRequest(c.name, "WCommon.OperateLog", in)
|
|
out := new(OperateLogRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wCommonService) SaveMaterial(ctx context.Context, in *SaveMaterialReq, opts ...client.CallOption) (*SaveMaterialRes, error) {
|
|
req := c.c.NewRequest(c.name, "WCommon.SaveMaterial", in)
|
|
out := new(SaveMaterialRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wCommonService) MaterialList(ctx context.Context, in *MaterialListReq, opts ...client.CallOption) (*MaterialListRes, error) {
|
|
req := c.c.NewRequest(c.name, "WCommon.MaterialList", in)
|
|
out := new(MaterialListRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wCommonService) CompanyMade(ctx context.Context, in *CompanyMadeReq, opts ...client.CallOption) (*CompanyMadeRes, error) {
|
|
req := c.c.NewRequest(c.name, "WCommon.CompanyMade", in)
|
|
out := new(CompanyMadeRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for WCommon service
|
|
|
|
type WCommonHandler interface {
|
|
// PolicyToken 获取阿里云token
|
|
PolicyToken(context.Context, *PolicyTokenReq, *PolicyTokenRes) error
|
|
// Whitelist 服务器白名单
|
|
Whitelist(context.Context, *WhitelistReq, *WhitelistRes) error
|
|
// Download 下载
|
|
Download(context.Context, *DownloadReq, *DownloadRes) error
|
|
// DownloadStatus 下载状态
|
|
DownloadStatus(context.Context, *DownloadStatusReq, *DownloadStatusRes) error
|
|
// OperateLog dashboard操作日志
|
|
OperateLog(context.Context, *OperateLogReq, *OperateLogRes) error
|
|
// SaveMaterial 保存素材
|
|
SaveMaterial(context.Context, *SaveMaterialReq, *SaveMaterialRes) error
|
|
// MaterialList 素材列表
|
|
MaterialList(context.Context, *MaterialListReq, *MaterialListRes) error
|
|
// CompanyMade 企业定制组件列表
|
|
CompanyMade(context.Context, *CompanyMadeReq, *CompanyMadeRes) error
|
|
}
|
|
|
|
func RegisterWCommonHandler(s server.Server, hdlr WCommonHandler, opts ...server.HandlerOption) error {
|
|
type wCommon interface {
|
|
PolicyToken(ctx context.Context, in *PolicyTokenReq, out *PolicyTokenRes) error
|
|
Whitelist(ctx context.Context, in *WhitelistReq, out *WhitelistRes) error
|
|
Download(ctx context.Context, in *DownloadReq, out *DownloadRes) error
|
|
DownloadStatus(ctx context.Context, in *DownloadStatusReq, out *DownloadStatusRes) error
|
|
OperateLog(ctx context.Context, in *OperateLogReq, out *OperateLogRes) error
|
|
SaveMaterial(ctx context.Context, in *SaveMaterialReq, out *SaveMaterialRes) error
|
|
MaterialList(ctx context.Context, in *MaterialListReq, out *MaterialListRes) error
|
|
CompanyMade(ctx context.Context, in *CompanyMadeReq, out *CompanyMadeRes) error
|
|
}
|
|
type WCommon struct {
|
|
wCommon
|
|
}
|
|
h := &wCommonHandler{hdlr}
|
|
return s.Handle(s.NewHandler(&WCommon{h}, opts...))
|
|
}
|
|
|
|
type wCommonHandler struct {
|
|
WCommonHandler
|
|
}
|
|
|
|
func (h *wCommonHandler) PolicyToken(ctx context.Context, in *PolicyTokenReq, out *PolicyTokenRes) error {
|
|
return h.WCommonHandler.PolicyToken(ctx, in, out)
|
|
}
|
|
|
|
func (h *wCommonHandler) Whitelist(ctx context.Context, in *WhitelistReq, out *WhitelistRes) error {
|
|
return h.WCommonHandler.Whitelist(ctx, in, out)
|
|
}
|
|
|
|
func (h *wCommonHandler) Download(ctx context.Context, in *DownloadReq, out *DownloadRes) error {
|
|
return h.WCommonHandler.Download(ctx, in, out)
|
|
}
|
|
|
|
func (h *wCommonHandler) DownloadStatus(ctx context.Context, in *DownloadStatusReq, out *DownloadStatusRes) error {
|
|
return h.WCommonHandler.DownloadStatus(ctx, in, out)
|
|
}
|
|
|
|
func (h *wCommonHandler) OperateLog(ctx context.Context, in *OperateLogReq, out *OperateLogRes) error {
|
|
return h.WCommonHandler.OperateLog(ctx, in, out)
|
|
}
|
|
|
|
func (h *wCommonHandler) SaveMaterial(ctx context.Context, in *SaveMaterialReq, out *SaveMaterialRes) error {
|
|
return h.WCommonHandler.SaveMaterial(ctx, in, out)
|
|
}
|
|
|
|
func (h *wCommonHandler) MaterialList(ctx context.Context, in *MaterialListReq, out *MaterialListRes) error {
|
|
return h.WCommonHandler.MaterialList(ctx, in, out)
|
|
}
|
|
|
|
func (h *wCommonHandler) CompanyMade(ctx context.Context, in *CompanyMadeReq, out *CompanyMadeRes) error {
|
|
return h.WCommonHandler.CompanyMade(ctx, in, out)
|
|
}
|