Documentation ¶
Index ¶
- Variables
- func RegisterPosterServer(s *grpc.Server, srv PosterServer)
- type Background
- type CreatePosterReply
- type CreatePosterRequest
- func (*CreatePosterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreatePosterRequest) GetBackground() *Background
- func (x *CreatePosterRequest) GetHeight() int32
- func (x *CreatePosterRequest) GetSubImages() []*Image
- func (x *CreatePosterRequest) GetSubQrCode() []*QrCode
- func (x *CreatePosterRequest) GetSubWxQrCode() []*WxQrCode
- func (x *CreatePosterRequest) GetTexts() []*Text
- func (x *CreatePosterRequest) GetWidth() int32
- func (*CreatePosterRequest) ProtoMessage()
- func (x *CreatePosterRequest) ProtoReflect() protoreflect.Message
- func (x *CreatePosterRequest) Reset()
- func (x *CreatePosterRequest) String() string
- type Image
- func (*Image) Descriptor() ([]byte, []int)deprecated
- func (x *Image) GetAngle() float64
- func (x *Image) GetColor() string
- func (x *Image) GetHeight() int32
- func (x *Image) GetImage() []byte
- func (x *Image) GetImageType() string
- func (x *Image) GetImageUrl() string
- func (x *Image) GetLeft() int32
- func (x *Image) GetPadding() int32
- func (x *Image) GetTop() int32
- func (x *Image) GetWidth() int32
- func (*Image) ProtoMessage()
- func (x *Image) ProtoReflect() protoreflect.Message
- func (x *Image) Reset()
- func (x *Image) String() string
- type PosterClient
- type PosterServer
- type QrCode
- func (*QrCode) Descriptor() ([]byte, []int)deprecated
- func (x *QrCode) GetAngle() float64
- func (x *QrCode) GetBackgroundColor() string
- func (x *QrCode) GetContent() string
- func (x *QrCode) GetForegroundColor() string
- func (x *QrCode) GetLeft() int32
- func (x *QrCode) GetTop() int32
- func (x *QrCode) GetWidth() int32
- func (*QrCode) ProtoMessage()
- func (x *QrCode) ProtoReflect() protoreflect.Message
- func (x *QrCode) Reset()
- func (x *QrCode) String() string
- type Text
- func (*Text) Descriptor() ([]byte, []int)deprecated
- func (x *Text) GetContent() string
- func (x *Text) GetFontColor() string
- func (x *Text) GetFontName() string
- func (x *Text) GetFontSize() float64
- func (x *Text) GetHeight() int32
- func (x *Text) GetLeft() int32
- func (x *Text) GetLineCount() int32
- func (x *Text) GetLineHeight() float64
- func (x *Text) GetTop() int32
- func (x *Text) GetWidth() int32
- func (*Text) ProtoMessage()
- func (x *Text) ProtoReflect() protoreflect.Message
- func (x *Text) Reset()
- func (x *Text) String() string
- type UnimplementedPosterServer
- type WxQrCode
- func (*WxQrCode) Descriptor() ([]byte, []int)deprecated
- func (x *WxQrCode) GetAccessToken() string
- func (x *WxQrCode) GetAngle() float64
- func (x *WxQrCode) GetAutoColor() bool
- func (x *WxQrCode) GetIsHyaline() bool
- func (x *WxQrCode) GetLeft() int32
- func (x *WxQrCode) GetLineColor() string
- func (x *WxQrCode) GetPage() string
- func (x *WxQrCode) GetScene() string
- func (x *WxQrCode) GetTop() int32
- func (x *WxQrCode) GetWidth() int32
- func (*WxQrCode) ProtoMessage()
- func (x *WxQrCode) ProtoReflect() protoreflect.Message
- func (x *WxQrCode) Reset()
- func (x *WxQrCode) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterPosterServer ¶
func RegisterPosterServer(s *grpc.Server, srv PosterServer)
Types ¶
type Background ¶
type Background struct { Image []byte `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` ImageUrl string `protobuf:"bytes,2,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` // contains filtered or unexported fields }
背景 image和image_url至少传一个
func (*Background) Descriptor
deprecated
func (*Background) Descriptor() ([]byte, []int)
Deprecated: Use Background.ProtoReflect.Descriptor instead.
func (*Background) GetImage ¶
func (x *Background) GetImage() []byte
func (*Background) GetImageUrl ¶
func (x *Background) GetImageUrl() string
func (*Background) ProtoMessage ¶
func (*Background) ProtoMessage()
func (*Background) ProtoReflect ¶
func (x *Background) ProtoReflect() protoreflect.Message
func (*Background) Reset ¶
func (x *Background) Reset()
func (*Background) String ¶
func (x *Background) String() string
type CreatePosterReply ¶
type CreatePosterReply struct { Image []byte `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` // contains filtered or unexported fields }
海报生成结果
func (*CreatePosterReply) Descriptor
deprecated
func (*CreatePosterReply) Descriptor() ([]byte, []int)
Deprecated: Use CreatePosterReply.ProtoReflect.Descriptor instead.
func (*CreatePosterReply) GetImage ¶
func (x *CreatePosterReply) GetImage() []byte
func (*CreatePosterReply) ProtoMessage ¶
func (*CreatePosterReply) ProtoMessage()
func (*CreatePosterReply) ProtoReflect ¶
func (x *CreatePosterReply) ProtoReflect() protoreflect.Message
func (*CreatePosterReply) Reset ¶
func (x *CreatePosterReply) Reset()
func (*CreatePosterReply) String ¶
func (x *CreatePosterReply) String() string
type CreatePosterRequest ¶
type CreatePosterRequest struct { Width int32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"` Height int32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` Background *Background `protobuf:"bytes,3,opt,name=background,proto3" json:"background,omitempty"` Texts []*Text `protobuf:"bytes,4,rep,name=texts,proto3" json:"texts,omitempty"` SubImages []*Image `protobuf:"bytes,5,rep,name=sub_images,json=subImages,proto3" json:"sub_images,omitempty"` SubQrCode []*QrCode `protobuf:"bytes,6,rep,name=sub_qr_code,json=subQrCode,proto3" json:"sub_qr_code,omitempty"` SubWxQrCode []*WxQrCode `protobuf:"bytes,7,rep,name=sub_wx_qr_code,json=subWxQrCode,proto3" json:"sub_wx_qr_code,omitempty"` // contains filtered or unexported fields }
创建海报请求参数
func (*CreatePosterRequest) Descriptor
deprecated
func (*CreatePosterRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreatePosterRequest.ProtoReflect.Descriptor instead.
func (*CreatePosterRequest) GetBackground ¶
func (x *CreatePosterRequest) GetBackground() *Background
func (*CreatePosterRequest) GetHeight ¶
func (x *CreatePosterRequest) GetHeight() int32
func (*CreatePosterRequest) GetSubImages ¶
func (x *CreatePosterRequest) GetSubImages() []*Image
func (*CreatePosterRequest) GetSubQrCode ¶
func (x *CreatePosterRequest) GetSubQrCode() []*QrCode
func (*CreatePosterRequest) GetSubWxQrCode ¶
func (x *CreatePosterRequest) GetSubWxQrCode() []*WxQrCode
func (*CreatePosterRequest) GetTexts ¶
func (x *CreatePosterRequest) GetTexts() []*Text
func (*CreatePosterRequest) GetWidth ¶
func (x *CreatePosterRequest) GetWidth() int32
func (*CreatePosterRequest) ProtoMessage ¶
func (*CreatePosterRequest) ProtoMessage()
func (*CreatePosterRequest) ProtoReflect ¶
func (x *CreatePosterRequest) ProtoReflect() protoreflect.Message
func (*CreatePosterRequest) Reset ¶
func (x *CreatePosterRequest) Reset()
func (*CreatePosterRequest) String ¶
func (x *CreatePosterRequest) String() string
type Image ¶
type Image struct { Top int32 `protobuf:"varint,1,opt,name=top,proto3" json:"top,omitempty"` Left int32 `protobuf:"varint,2,opt,name=left,proto3" json:"left,omitempty"` Width int32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` Padding int32 `protobuf:"varint,5,opt,name=padding,proto3" json:"padding,omitempty"` Angle float64 `protobuf:"fixed64,6,opt,name=angle,proto3" json:"angle,omitempty"` Color string `protobuf:"bytes,7,opt,name=color,proto3" json:"color,omitempty"` ImageType string `protobuf:"bytes,8,opt,name=image_type,json=imageType,proto3" json:"image_type,omitempty"` Image []byte `protobuf:"bytes,9,opt,name=image,proto3" json:"image,omitempty"` ImageUrl string `protobuf:"bytes,10,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` // contains filtered or unexported fields }
海报贴图
func (*Image) Descriptor
deprecated
func (*Image) GetImageType ¶
func (*Image) GetImageUrl ¶
func (*Image) GetPadding ¶
func (*Image) ProtoMessage ¶
func (*Image) ProtoMessage()
func (*Image) ProtoReflect ¶
func (x *Image) ProtoReflect() protoreflect.Message
type PosterClient ¶
type PosterClient interface {
CreatePoster(ctx context.Context, in *CreatePosterRequest, opts ...grpc.CallOption) (*CreatePosterReply, error)
}
PosterClient is the client API for Poster service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPosterClient ¶
func NewPosterClient(cc grpc.ClientConnInterface) PosterClient
type PosterServer ¶
type PosterServer interface {
CreatePoster(context.Context, *CreatePosterRequest) (*CreatePosterReply, error)
}
PosterServer is the server API for Poster service.
type QrCode ¶
type QrCode struct { Top int32 `protobuf:"varint,1,opt,name=top,proto3" json:"top,omitempty"` Left int32 `protobuf:"varint,2,opt,name=left,proto3" json:"left,omitempty"` Width int32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` Angle float64 `protobuf:"fixed64,4,opt,name=angle,proto3" json:"angle,omitempty"` // 旋转角度 BackgroundColor string `protobuf:"bytes,5,opt,name=background_color,json=backgroundColor,proto3" json:"background_color,omitempty"` // 背景色 - 可为空 - 默认白色 ForegroundColor string `protobuf:"bytes,6,opt,name=foreground_color,json=foregroundColor,proto3" json:"foreground_color,omitempty"` // 前景色 - 可为空 - 默认黑色 Content string `protobuf:"bytes,7,opt,name=content,proto3" json:"content,omitempty"` // 二维码内容 // contains filtered or unexported fields }
二维码
func (*QrCode) Descriptor
deprecated
func (*QrCode) GetBackgroundColor ¶
func (*QrCode) GetContent ¶
func (*QrCode) GetForegroundColor ¶
func (*QrCode) ProtoMessage ¶
func (*QrCode) ProtoMessage()
func (*QrCode) ProtoReflect ¶
func (x *QrCode) ProtoReflect() protoreflect.Message
type Text ¶
type Text struct { Top int32 `protobuf:"varint,1,opt,name=top,proto3" json:"top,omitempty"` Left int32 `protobuf:"varint,2,opt,name=left,proto3" json:"left,omitempty"` Width int32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` LineCount int32 `protobuf:"varint,5,opt,name=line_count,json=lineCount,proto3" json:"line_count,omitempty"` Content string `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"` FontName string `protobuf:"bytes,7,opt,name=font_name,json=fontName,proto3" json:"font_name,omitempty"` FontSize float64 `protobuf:"fixed64,8,opt,name=font_size,json=fontSize,proto3" json:"font_size,omitempty"` LineHeight float64 `protobuf:"fixed64,9,opt,name=line_height,json=lineHeight,proto3" json:"line_height,omitempty"` FontColor string `protobuf:"bytes,10,opt,name=font_color,json=fontColor,proto3" json:"font_color,omitempty"` // contains filtered or unexported fields }
Text 海报文字
func (*Text) Descriptor
deprecated
func (*Text) GetContent ¶
func (*Text) GetFontColor ¶
func (*Text) GetFontName ¶
func (*Text) GetFontSize ¶
func (*Text) GetLineCount ¶
func (*Text) GetLineHeight ¶
func (*Text) ProtoMessage ¶
func (*Text) ProtoMessage()
func (*Text) ProtoReflect ¶
func (x *Text) ProtoReflect() protoreflect.Message
type UnimplementedPosterServer ¶
type UnimplementedPosterServer struct { }
UnimplementedPosterServer can be embedded to have forward compatible implementations.
func (*UnimplementedPosterServer) CreatePoster ¶
func (*UnimplementedPosterServer) CreatePoster(context.Context, *CreatePosterRequest) (*CreatePosterReply, error)
type WxQrCode ¶
type WxQrCode struct { Top int32 `protobuf:"varint,1,opt,name=top,proto3" json:"top,omitempty"` Left int32 `protobuf:"varint,2,opt,name=left,proto3" json:"left,omitempty"` Width int32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` Angle float64 `protobuf:"fixed64,4,opt,name=angle,proto3" json:"angle,omitempty"` // 旋转角度 // 以下参数用于调用微信接口 AccessToken string `protobuf:"bytes,5,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` Scene string `protobuf:"bytes,6,opt,name=scene,proto3" json:"scene,omitempty"` Page string `protobuf:"bytes,7,opt,name=page,proto3" json:"page,omitempty"` AutoColor bool `protobuf:"varint,8,opt,name=auto_color,json=autoColor,proto3" json:"auto_color,omitempty"` LineColor string `protobuf:"bytes,9,opt,name=line_color,json=lineColor,proto3" json:"line_color,omitempty"` IsHyaline bool `protobuf:"varint,10,opt,name=is_hyaline,json=isHyaline,proto3" json:"is_hyaline,omitempty"` // contains filtered or unexported fields }
小程序码
func (*WxQrCode) Descriptor
deprecated
func (*WxQrCode) GetAccessToken ¶
func (*WxQrCode) GetAutoColor ¶
func (*WxQrCode) GetIsHyaline ¶
func (*WxQrCode) GetLineColor ¶
func (*WxQrCode) ProtoMessage ¶
func (*WxQrCode) ProtoMessage()
func (*WxQrCode) ProtoReflect ¶
func (x *WxQrCode) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.