proto

package
v0.0.0-...-5b0cbe9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Image.ProtoReflect.Descriptor instead.

func (*Image) GetAngle

func (x *Image) GetAngle() float64

func (*Image) GetColor

func (x *Image) GetColor() string

func (*Image) GetHeight

func (x *Image) GetHeight() int32

func (*Image) GetImage

func (x *Image) GetImage() []byte

func (*Image) GetImageType

func (x *Image) GetImageType() string

func (*Image) GetImageUrl

func (x *Image) GetImageUrl() string

func (*Image) GetLeft

func (x *Image) GetLeft() int32

func (*Image) GetPadding

func (x *Image) GetPadding() int32

func (*Image) GetTop

func (x *Image) GetTop() int32

func (*Image) GetWidth

func (x *Image) GetWidth() int32

func (*Image) ProtoMessage

func (*Image) ProtoMessage()

func (*Image) ProtoReflect

func (x *Image) ProtoReflect() protoreflect.Message

func (*Image) Reset

func (x *Image) Reset()

func (*Image) String

func (x *Image) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use QrCode.ProtoReflect.Descriptor instead.

func (*QrCode) GetAngle

func (x *QrCode) GetAngle() float64

func (*QrCode) GetBackgroundColor

func (x *QrCode) GetBackgroundColor() string

func (*QrCode) GetContent

func (x *QrCode) GetContent() string

func (*QrCode) GetForegroundColor

func (x *QrCode) GetForegroundColor() string

func (*QrCode) GetLeft

func (x *QrCode) GetLeft() int32

func (*QrCode) GetTop

func (x *QrCode) GetTop() int32

func (*QrCode) GetWidth

func (x *QrCode) GetWidth() int32

func (*QrCode) ProtoMessage

func (*QrCode) ProtoMessage()

func (*QrCode) ProtoReflect

func (x *QrCode) ProtoReflect() protoreflect.Message

func (*QrCode) Reset

func (x *QrCode) Reset()

func (*QrCode) String

func (x *QrCode) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Text.ProtoReflect.Descriptor instead.

func (*Text) GetContent

func (x *Text) GetContent() string

func (*Text) GetFontColor

func (x *Text) GetFontColor() string

func (*Text) GetFontName

func (x *Text) GetFontName() string

func (*Text) GetFontSize

func (x *Text) GetFontSize() float64

func (*Text) GetHeight

func (x *Text) GetHeight() int32

func (*Text) GetLeft

func (x *Text) GetLeft() int32

func (*Text) GetLineCount

func (x *Text) GetLineCount() int32

func (*Text) GetLineHeight

func (x *Text) GetLineHeight() float64

func (*Text) GetTop

func (x *Text) GetTop() int32

func (*Text) GetWidth

func (x *Text) GetWidth() int32

func (*Text) ProtoMessage

func (*Text) ProtoMessage()

func (*Text) ProtoReflect

func (x *Text) ProtoReflect() protoreflect.Message

func (*Text) Reset

func (x *Text) Reset()

func (*Text) String

func (x *Text) String() string

type UnimplementedPosterServer

type UnimplementedPosterServer struct {
}

UnimplementedPosterServer can be embedded to have forward compatible implementations.

func (*UnimplementedPosterServer) CreatePoster

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) Descriptor() ([]byte, []int)

Deprecated: Use WxQrCode.ProtoReflect.Descriptor instead.

func (*WxQrCode) GetAccessToken

func (x *WxQrCode) GetAccessToken() string

func (*WxQrCode) GetAngle

func (x *WxQrCode) GetAngle() float64

func (*WxQrCode) GetAutoColor

func (x *WxQrCode) GetAutoColor() bool

func (*WxQrCode) GetIsHyaline

func (x *WxQrCode) GetIsHyaline() bool

func (*WxQrCode) GetLeft

func (x *WxQrCode) GetLeft() int32

func (*WxQrCode) GetLineColor

func (x *WxQrCode) GetLineColor() string

func (*WxQrCode) GetPage

func (x *WxQrCode) GetPage() string

func (*WxQrCode) GetScene

func (x *WxQrCode) GetScene() string

func (*WxQrCode) GetTop

func (x *WxQrCode) GetTop() int32

func (*WxQrCode) GetWidth

func (x *WxQrCode) GetWidth() int32

func (*WxQrCode) ProtoMessage

func (*WxQrCode) ProtoMessage()

func (*WxQrCode) ProtoReflect

func (x *WxQrCode) ProtoReflect() protoreflect.Message

func (*WxQrCode) Reset

func (x *WxQrCode) Reset()

func (*WxQrCode) String

func (x *WxQrCode) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL