server

package
v0.0.0-...-7d51d8f Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConvGetImageServer

type ConvGetImageServer struct {
	pb.UnimplementedConvGetImageServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer() (srv *ConvGetImageServer, err error)

func (ConvGetImageServer) Convert

func (srv ConvGetImageServer) Convert(ctx context.Context, req *pb.ConvertRequest) (resp *pb.ConvertResponse, err error)

func (ConvGetImageServer) Image

func (srv ConvGetImageServer) Image(ctx context.Context, req *pb.ImageRequest) (body *httpbody.HttpBody, err error)

func (ConvGetImageServer) RunGateway

func (srv ConvGetImageServer) RunGateway()

func (ConvGetImageServer) SaveText

func (srv ConvGetImageServer) SaveText(ctx opentracing.SpanContext, text string)

type ConvertRequest

type ConvertRequest struct {
	ConvertRequestData

	ConvID string `json:"conv_id"`
}

type ConvertRequestData

type ConvertRequestData struct {
	InputText string     `json:"input_text"`
	FontSize  int32      `json:"font_size"`
	FontFile  string     `json:"font_file"`
	FontStyle FontStyles `json:"font_style"`
}

func (ConvertRequestData) UniqueID

func (cr ConvertRequestData) UniqueID() string

type FontStyles

type FontStyles int32
const (
	FontStyles_NORMAL FontStyles = 0
	FontStyles_ITALIC FontStyles = 1
)

Jump to

Keyboard shortcuts

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