memegen

package
v0.0.0-...-2af310e Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_memegen_proto protoreflect.FileDescriptor

Functions

func NewMemegenEndpoints

func NewMemegenEndpoints() []*api.Endpoint

func RegisterMemegenHandler

func RegisterMemegenHandler(s server.Server, hdlr MemegenHandler, opts ...server.HandlerOption) error

Types

type Box

type Box struct {

	// text to display
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// x axis position
	X int32 `protobuf:"varint,2,opt,name=x,proto3" json:"x,omitempty"`
	// y axis position
	Y int32 `protobuf:"varint,3,opt,name=y,proto3" json:"y,omitempty"`
	// width in pixels
	Width int32 `protobuf:"varint,4,opt,name=width,proto3" json:"width,omitempty"`
	// height in pixels
	Height int32 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"`
	// colour hex code
	Color string `protobuf:"bytes,6,opt,name=color,proto3" json:"color,omitempty"`
	// outline color hex code
	Outline string `protobuf:"bytes,7,opt,name=outline,proto3" json:"outline,omitempty"`
	// contains filtered or unexported fields
}

func (*Box) Descriptor deprecated

func (*Box) Descriptor() ([]byte, []int)

Deprecated: Use Box.ProtoReflect.Descriptor instead.

func (*Box) GetColor

func (x *Box) GetColor() string

func (*Box) GetHeight

func (x *Box) GetHeight() int32

func (*Box) GetOutline

func (x *Box) GetOutline() string

func (*Box) GetText

func (x *Box) GetText() string

func (*Box) GetWidth

func (x *Box) GetWidth() int32

func (*Box) GetX

func (x *Box) GetX() int32

func (*Box) GetY

func (x *Box) GetY() int32

func (*Box) ProtoMessage

func (*Box) ProtoMessage()

func (*Box) ProtoReflect

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

func (*Box) Reset

func (x *Box) Reset()

func (*Box) String

func (x *Box) String() string

type GenerateRequest

type GenerateRequest struct {

	// the template id to use
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// top text
	TopText string `protobuf:"bytes,2,opt,name=top_text,json=topText,proto3" json:"top_text,omitempty"`
	// bottom text
	BottomText string `protobuf:"bytes,3,opt,name=bottom_text,json=bottomText,proto3" json:"bottom_text,omitempty"`
	// font: arial or impact
	Font string `protobuf:"bytes,4,opt,name=font,proto3" json:"font,omitempty"`
	// font size; defaults to 50px
	MaxFontSize string `protobuf:"bytes,5,opt,name=max_font_size,json=maxFontSize,proto3" json:"max_font_size,omitempty"`
	// contains filtered or unexported fields
}

func (*GenerateRequest) Descriptor deprecated

func (*GenerateRequest) Descriptor() ([]byte, []int)

Deprecated: Use GenerateRequest.ProtoReflect.Descriptor instead.

func (*GenerateRequest) GetBottomText

func (x *GenerateRequest) GetBottomText() string

func (*GenerateRequest) GetFont

func (x *GenerateRequest) GetFont() string

func (*GenerateRequest) GetId

func (x *GenerateRequest) GetId() string

func (*GenerateRequest) GetMaxFontSize

func (x *GenerateRequest) GetMaxFontSize() string

func (*GenerateRequest) GetTopText

func (x *GenerateRequest) GetTopText() string

func (*GenerateRequest) ProtoMessage

func (*GenerateRequest) ProtoMessage()

func (*GenerateRequest) ProtoReflect

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

func (*GenerateRequest) Reset

func (x *GenerateRequest) Reset()

func (*GenerateRequest) String

func (x *GenerateRequest) String() string

type GenerateResponse

type GenerateResponse struct {

	// url of the memegen
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*GenerateResponse) Descriptor deprecated

func (*GenerateResponse) Descriptor() ([]byte, []int)

Deprecated: Use GenerateResponse.ProtoReflect.Descriptor instead.

func (*GenerateResponse) GetUrl

func (x *GenerateResponse) GetUrl() string

func (*GenerateResponse) ProtoMessage

func (*GenerateResponse) ProtoMessage()

func (*GenerateResponse) ProtoReflect

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

func (*GenerateResponse) Reset

func (x *GenerateResponse) Reset()

func (*GenerateResponse) String

func (x *GenerateResponse) String() string

type MemegenHandler

type MemegenHandler interface {
	Templates(context.Context, *TemplatesRequest, *TemplatesResponse) error
	Generate(context.Context, *GenerateRequest, *GenerateResponse) error
}

type MemegenService

type MemegenService interface {
	Templates(ctx context.Context, in *TemplatesRequest, opts ...client.CallOption) (*TemplatesResponse, error)
	Generate(ctx context.Context, in *GenerateRequest, opts ...client.CallOption) (*GenerateResponse, error)
}

func NewMemegenService

func NewMemegenService(name string, c client.Client) MemegenService

type Template

type Template struct {

	// id of the memegen
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// name of the memegen
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// url of the memegen
	Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	// width in pixels
	Width int32 `protobuf:"varint,4,opt,name=width,proto3" json:"width,omitempty"`
	// height in pixels
	Height int32 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"`
	// number of boxes used
	BoxCount int32 `protobuf:"varint,6,opt,name=box_count,json=boxCount,proto3" json:"box_count,omitempty"`
	// contains filtered or unexported fields
}

func (*Template) Descriptor deprecated

func (*Template) Descriptor() ([]byte, []int)

Deprecated: Use Template.ProtoReflect.Descriptor instead.

func (*Template) GetBoxCount

func (x *Template) GetBoxCount() int32

func (*Template) GetHeight

func (x *Template) GetHeight() int32

func (*Template) GetId

func (x *Template) GetId() string

func (*Template) GetName

func (x *Template) GetName() string

func (*Template) GetUrl

func (x *Template) GetUrl() string

func (*Template) GetWidth

func (x *Template) GetWidth() int32

func (*Template) ProtoMessage

func (*Template) ProtoMessage()

func (*Template) ProtoReflect

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

func (*Template) Reset

func (x *Template) Reset()

func (*Template) String

func (x *Template) String() string

type TemplatesRequest

type TemplatesRequest struct {
	// contains filtered or unexported fields
}

List the available templates

func (*TemplatesRequest) Descriptor deprecated

func (*TemplatesRequest) Descriptor() ([]byte, []int)

Deprecated: Use TemplatesRequest.ProtoReflect.Descriptor instead.

func (*TemplatesRequest) ProtoMessage

func (*TemplatesRequest) ProtoMessage()

func (*TemplatesRequest) ProtoReflect

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

func (*TemplatesRequest) Reset

func (x *TemplatesRequest) Reset()

func (*TemplatesRequest) String

func (x *TemplatesRequest) String() string

type TemplatesResponse

type TemplatesResponse struct {
	Templates []*Template `protobuf:"bytes,1,rep,name=templates,proto3" json:"templates,omitempty"`
	// contains filtered or unexported fields
}

func (*TemplatesResponse) Descriptor deprecated

func (*TemplatesResponse) Descriptor() ([]byte, []int)

Deprecated: Use TemplatesResponse.ProtoReflect.Descriptor instead.

func (*TemplatesResponse) GetTemplates

func (x *TemplatesResponse) GetTemplates() []*Template

func (*TemplatesResponse) ProtoMessage

func (*TemplatesResponse) ProtoMessage()

func (*TemplatesResponse) ProtoReflect

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

func (*TemplatesResponse) Reset

func (x *TemplatesResponse) Reset()

func (*TemplatesResponse) String

func (x *TemplatesResponse) String() string

Jump to

Keyboard shortcuts

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