Documentation
¶
Index ¶
- Variables
- func NewMemegenEndpoints() []*api.Endpoint
- func RegisterMemegenHandler(s server.Server, hdlr MemegenHandler, opts ...server.HandlerOption) error
- type Box
- func (*Box) Descriptor() ([]byte, []int)deprecated
- func (x *Box) GetColor() string
- func (x *Box) GetHeight() int32
- func (x *Box) GetOutline() string
- func (x *Box) GetText() string
- func (x *Box) GetWidth() int32
- func (x *Box) GetX() int32
- func (x *Box) GetY() int32
- func (*Box) ProtoMessage()
- func (x *Box) ProtoReflect() protoreflect.Message
- func (x *Box) Reset()
- func (x *Box) String() string
- type GenerateRequest
- func (*GenerateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GenerateRequest) GetBottomText() string
- func (x *GenerateRequest) GetFont() string
- func (x *GenerateRequest) GetId() string
- func (x *GenerateRequest) GetMaxFontSize() string
- func (x *GenerateRequest) GetTopText() string
- func (*GenerateRequest) ProtoMessage()
- func (x *GenerateRequest) ProtoReflect() protoreflect.Message
- func (x *GenerateRequest) Reset()
- func (x *GenerateRequest) String() string
- type GenerateResponse
- type MemegenHandler
- type MemegenService
- type Template
- func (*Template) Descriptor() ([]byte, []int)deprecated
- func (x *Template) GetBoxCount() int32
- func (x *Template) GetHeight() int32
- func (x *Template) GetId() string
- func (x *Template) GetName() string
- func (x *Template) GetUrl() string
- func (x *Template) GetWidth() int32
- func (*Template) ProtoMessage()
- func (x *Template) ProtoReflect() protoreflect.Message
- func (x *Template) Reset()
- func (x *Template) String() string
- type TemplatesRequest
- type TemplatesResponse
- func (*TemplatesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TemplatesResponse) GetTemplates() []*Template
- func (*TemplatesResponse) ProtoMessage()
- func (x *TemplatesResponse) ProtoReflect() protoreflect.Message
- func (x *TemplatesResponse) Reset()
- func (x *TemplatesResponse) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_memegen_proto protoreflect.FileDescriptor
Functions ¶
func NewMemegenEndpoints ¶
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) GetOutline ¶
func (*Box) ProtoMessage ¶
func (*Box) ProtoMessage()
func (*Box) ProtoReflect ¶
func (x *Box) ProtoReflect() protoreflect.Message
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) GetBoxCount ¶
func (*Template) ProtoMessage ¶
func (*Template) ProtoMessage()
func (*Template) ProtoReflect ¶
func (x *Template) ProtoReflect() protoreflect.Message
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
Click to show internal directories.
Click to hide internal directories.