Documentation ¶
Overview ¶
Package escpospb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterEscPosServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEscPosServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EscPosServiceClient) error
- func RegisterEscPosServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEscPosServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EscPosServiceServer) error
- func RegisterEscPosServiceServer(s *grpc.Server, srv EscPosServiceServer)
- type DeleteHtmlTemplatesRequest
- func (*DeleteHtmlTemplatesRequest) Descriptor() ([]byte, []int)
- func (m *DeleteHtmlTemplatesRequest) GetHtmlTemplatesId() []string
- func (*DeleteHtmlTemplatesRequest) ProtoMessage()
- func (m *DeleteHtmlTemplatesRequest) Reset()
- func (m *DeleteHtmlTemplatesRequest) String() string
- func (m *DeleteHtmlTemplatesRequest) XXX_DiscardUnknown()
- func (m *DeleteHtmlTemplatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DeleteHtmlTemplatesRequest) XXX_Merge(src proto.Message)
- func (m *DeleteHtmlTemplatesRequest) XXX_Size() int
- func (m *DeleteHtmlTemplatesRequest) XXX_Unmarshal(b []byte) error
- type DeleteHtmlTemplatesResponse
- func (*DeleteHtmlTemplatesResponse) Descriptor() ([]byte, []int)
- func (*DeleteHtmlTemplatesResponse) ProtoMessage()
- func (m *DeleteHtmlTemplatesResponse) Reset()
- func (m *DeleteHtmlTemplatesResponse) String() string
- func (m *DeleteHtmlTemplatesResponse) XXX_DiscardUnknown()
- func (m *DeleteHtmlTemplatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DeleteHtmlTemplatesResponse) XXX_Merge(src proto.Message)
- func (m *DeleteHtmlTemplatesResponse) XXX_Size() int
- func (m *DeleteHtmlTemplatesResponse) XXX_Unmarshal(b []byte) error
- type Element
- func (*Element) Descriptor() ([]byte, []int)
- func (m *Element) GetContentImage() []byte
- func (m *Element) GetContentText() string
- func (m *Element) GetEtype() ElementType
- func (m *Element) GetImageContentType() string
- func (m *Element) GetSize() ElementSize
- func (*Element) ProtoMessage()
- func (m *Element) Reset()
- func (m *Element) String() string
- func (m *Element) XXX_DiscardUnknown()
- func (m *Element) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Element) XXX_Merge(src proto.Message)
- func (m *Element) XXX_Size() int
- func (m *Element) XXX_Unmarshal(b []byte) error
- type ElementAlign
- type ElementRow
- func (*ElementRow) Descriptor() ([]byte, []int)
- func (m *ElementRow) GetAlign() ElementAlign
- func (m *ElementRow) GetElements() []*Element
- func (*ElementRow) ProtoMessage()
- func (m *ElementRow) Reset()
- func (m *ElementRow) String() string
- func (m *ElementRow) XXX_DiscardUnknown()
- func (m *ElementRow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ElementRow) XXX_Merge(src proto.Message)
- func (m *ElementRow) XXX_Size() int
- func (m *ElementRow) XXX_Unmarshal(b []byte) error
- type ElementSize
- type ElementType
- type EscPosServiceClient
- type EscPosServiceServer
- type GetHtmlTemplateRequest
- func (*GetHtmlTemplateRequest) Descriptor() ([]byte, []int)
- func (m *GetHtmlTemplateRequest) GetId() string
- func (*GetHtmlTemplateRequest) ProtoMessage()
- func (m *GetHtmlTemplateRequest) Reset()
- func (m *GetHtmlTemplateRequest) String() string
- func (m *GetHtmlTemplateRequest) XXX_DiscardUnknown()
- func (m *GetHtmlTemplateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetHtmlTemplateRequest) XXX_Merge(src proto.Message)
- func (m *GetHtmlTemplateRequest) XXX_Size() int
- func (m *GetHtmlTemplateRequest) XXX_Unmarshal(b []byte) error
- type GetHtmlTemplateResponse
- func (*GetHtmlTemplateResponse) Descriptor() ([]byte, []int)
- func (m *GetHtmlTemplateResponse) GetHtmlTemplate() *HtmlTemplate
- func (*GetHtmlTemplateResponse) ProtoMessage()
- func (m *GetHtmlTemplateResponse) Reset()
- func (m *GetHtmlTemplateResponse) String() string
- func (m *GetHtmlTemplateResponse) XXX_DiscardUnknown()
- func (m *GetHtmlTemplateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetHtmlTemplateResponse) XXX_Merge(src proto.Message)
- func (m *GetHtmlTemplateResponse) XXX_Size() int
- func (m *GetHtmlTemplateResponse) XXX_Unmarshal(b []byte) error
- type HtmlTemplate
- func (*HtmlTemplate) Descriptor() ([]byte, []int)
- func (m *HtmlTemplate) GetContent() string
- func (m *HtmlTemplate) GetId() string
- func (m *HtmlTemplate) GetName() string
- func (*HtmlTemplate) ProtoMessage()
- func (m *HtmlTemplate) Reset()
- func (m *HtmlTemplate) String() string
- func (m *HtmlTemplate) XXX_DiscardUnknown()
- func (m *HtmlTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HtmlTemplate) XXX_Merge(src proto.Message)
- func (m *HtmlTemplate) XXX_Size() int
- func (m *HtmlTemplate) XXX_Unmarshal(b []byte) error
- type ListHtmlTemplatesRequest
- func (*ListHtmlTemplatesRequest) Descriptor() ([]byte, []int)
- func (*ListHtmlTemplatesRequest) ProtoMessage()
- func (m *ListHtmlTemplatesRequest) Reset()
- func (m *ListHtmlTemplatesRequest) String() string
- func (m *ListHtmlTemplatesRequest) XXX_DiscardUnknown()
- func (m *ListHtmlTemplatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListHtmlTemplatesRequest) XXX_Merge(src proto.Message)
- func (m *ListHtmlTemplatesRequest) XXX_Size() int
- func (m *ListHtmlTemplatesRequest) XXX_Unmarshal(b []byte) error
- type ListHtmlTemplatesResponse
- func (*ListHtmlTemplatesResponse) Descriptor() ([]byte, []int)
- func (m *ListHtmlTemplatesResponse) GetHtmlTemplates() []*HtmlTemplate
- func (*ListHtmlTemplatesResponse) ProtoMessage()
- func (m *ListHtmlTemplatesResponse) Reset()
- func (m *ListHtmlTemplatesResponse) String() string
- func (m *ListHtmlTemplatesResponse) XXX_DiscardUnknown()
- func (m *ListHtmlTemplatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListHtmlTemplatesResponse) XXX_Merge(src proto.Message)
- func (m *ListHtmlTemplatesResponse) XXX_Size() int
- func (m *ListHtmlTemplatesResponse) XXX_Unmarshal(b []byte) error
- type NewHtmlTemplateRequest
- func (*NewHtmlTemplateRequest) Descriptor() ([]byte, []int)
- func (m *NewHtmlTemplateRequest) GetHtmlTemplate() *HtmlTemplate
- func (*NewHtmlTemplateRequest) ProtoMessage()
- func (m *NewHtmlTemplateRequest) Reset()
- func (m *NewHtmlTemplateRequest) String() string
- func (m *NewHtmlTemplateRequest) XXX_DiscardUnknown()
- func (m *NewHtmlTemplateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NewHtmlTemplateRequest) XXX_Merge(src proto.Message)
- func (m *NewHtmlTemplateRequest) XXX_Size() int
- func (m *NewHtmlTemplateRequest) XXX_Unmarshal(b []byte) error
- type NewHtmlTemplateResponse
- func (*NewHtmlTemplateResponse) Descriptor() ([]byte, []int)
- func (m *NewHtmlTemplateResponse) GetHtmlTemplate() *HtmlTemplate
- func (*NewHtmlTemplateResponse) ProtoMessage()
- func (m *NewHtmlTemplateResponse) Reset()
- func (m *NewHtmlTemplateResponse) String() string
- func (m *NewHtmlTemplateResponse) XXX_DiscardUnknown()
- func (m *NewHtmlTemplateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NewHtmlTemplateResponse) XXX_Merge(src proto.Message)
- func (m *NewHtmlTemplateResponse) XXX_Size() int
- func (m *NewHtmlTemplateResponse) XXX_Unmarshal(b []byte) error
- type PrintElementsRequest
- func (*PrintElementsRequest) Descriptor() ([]byte, []int)
- func (m *PrintElementsRequest) GetCut() bool
- func (m *PrintElementsRequest) GetElementRows() []*ElementRow
- func (*PrintElementsRequest) ProtoMessage()
- func (m *PrintElementsRequest) Reset()
- func (m *PrintElementsRequest) String() string
- func (m *PrintElementsRequest) XXX_DiscardUnknown()
- func (m *PrintElementsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrintElementsRequest) XXX_Merge(src proto.Message)
- func (m *PrintElementsRequest) XXX_Size() int
- func (m *PrintElementsRequest) XXX_Unmarshal(b []byte) error
- type PrintElementsResponse
- func (*PrintElementsResponse) Descriptor() ([]byte, []int)
- func (*PrintElementsResponse) ProtoMessage()
- func (m *PrintElementsResponse) Reset()
- func (m *PrintElementsResponse) String() string
- func (m *PrintElementsResponse) XXX_DiscardUnknown()
- func (m *PrintElementsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrintElementsResponse) XXX_Merge(src proto.Message)
- func (m *PrintElementsResponse) XXX_Size() int
- func (m *PrintElementsResponse) XXX_Unmarshal(b []byte) error
- type PrintHtmlTemplateRequest
- func (*PrintHtmlTemplateRequest) Descriptor() ([]byte, []int)
- func (m *PrintHtmlTemplateRequest) GetCut() bool
- func (m *PrintHtmlTemplateRequest) GetId() string
- func (m *PrintHtmlTemplateRequest) GetName() string
- func (m *PrintHtmlTemplateRequest) GetParams() map[string]string
- func (*PrintHtmlTemplateRequest) ProtoMessage()
- func (m *PrintHtmlTemplateRequest) Reset()
- func (m *PrintHtmlTemplateRequest) String() string
- func (m *PrintHtmlTemplateRequest) XXX_DiscardUnknown()
- func (m *PrintHtmlTemplateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrintHtmlTemplateRequest) XXX_Merge(src proto.Message)
- func (m *PrintHtmlTemplateRequest) XXX_Size() int
- func (m *PrintHtmlTemplateRequest) XXX_Unmarshal(b []byte) error
- type PrintHtmlTemplateResponse
- func (*PrintHtmlTemplateResponse) Descriptor() ([]byte, []int)
- func (*PrintHtmlTemplateResponse) ProtoMessage()
- func (m *PrintHtmlTemplateResponse) Reset()
- func (m *PrintHtmlTemplateResponse) String() string
- func (m *PrintHtmlTemplateResponse) XXX_DiscardUnknown()
- func (m *PrintHtmlTemplateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrintHtmlTemplateResponse) XXX_Merge(src proto.Message)
- func (m *PrintHtmlTemplateResponse) XXX_Size() int
- func (m *PrintHtmlTemplateResponse) XXX_Unmarshal(b []byte) error
- type PrintRawRequest
- func (*PrintRawRequest) Descriptor() ([]byte, []int)
- func (m *PrintRawRequest) GetRaw() []byte
- func (*PrintRawRequest) ProtoMessage()
- func (m *PrintRawRequest) Reset()
- func (m *PrintRawRequest) String() string
- func (m *PrintRawRequest) XXX_DiscardUnknown()
- func (m *PrintRawRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrintRawRequest) XXX_Merge(src proto.Message)
- func (m *PrintRawRequest) XXX_Size() int
- func (m *PrintRawRequest) XXX_Unmarshal(b []byte) error
- type PrintRawResponse
- func (*PrintRawResponse) Descriptor() ([]byte, []int)
- func (*PrintRawResponse) ProtoMessage()
- func (m *PrintRawResponse) Reset()
- func (m *PrintRawResponse) String() string
- func (m *PrintRawResponse) XXX_DiscardUnknown()
- func (m *PrintRawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrintRawResponse) XXX_Merge(src proto.Message)
- func (m *PrintRawResponse) XXX_Size() int
- func (m *PrintRawResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedEscPosServiceServer
- func (*UnimplementedEscPosServiceServer) DeleteHtmlTemplates(ctx context.Context, req *DeleteHtmlTemplatesRequest) (*DeleteHtmlTemplatesResponse, error)
- func (*UnimplementedEscPosServiceServer) GetHtmlTemplate(ctx context.Context, req *GetHtmlTemplateRequest) (*GetHtmlTemplateResponse, error)
- func (*UnimplementedEscPosServiceServer) ListHtmlTemplates(ctx context.Context, req *ListHtmlTemplatesRequest) (*ListHtmlTemplatesResponse, error)
- func (*UnimplementedEscPosServiceServer) NewHtmlTemplate(ctx context.Context, req *NewHtmlTemplateRequest) (*NewHtmlTemplateResponse, error)
- func (*UnimplementedEscPosServiceServer) PrintElements(ctx context.Context, req *PrintElementsRequest) (*PrintElementsResponse, error)
- func (*UnimplementedEscPosServiceServer) PrintHtmlTemplate(ctx context.Context, req *PrintHtmlTemplateRequest) (*PrintHtmlTemplateResponse, error)
- func (*UnimplementedEscPosServiceServer) PrintRaw(ctx context.Context, req *PrintRawRequest) (*PrintRawResponse, error)
- func (*UnimplementedEscPosServiceServer) UpdateHtmlTemplate(ctx context.Context, req *UpdateHtmlTemplateRequest) (*UpdateHtmlTemplateResponse, error)
- type UpdateHtmlTemplateRequest
- func (*UpdateHtmlTemplateRequest) Descriptor() ([]byte, []int)
- func (m *UpdateHtmlTemplateRequest) GetHtmlTemplate() *HtmlTemplate
- func (*UpdateHtmlTemplateRequest) ProtoMessage()
- func (m *UpdateHtmlTemplateRequest) Reset()
- func (m *UpdateHtmlTemplateRequest) String() string
- func (m *UpdateHtmlTemplateRequest) XXX_DiscardUnknown()
- func (m *UpdateHtmlTemplateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UpdateHtmlTemplateRequest) XXX_Merge(src proto.Message)
- func (m *UpdateHtmlTemplateRequest) XXX_Size() int
- func (m *UpdateHtmlTemplateRequest) XXX_Unmarshal(b []byte) error
- type UpdateHtmlTemplateResponse
- func (*UpdateHtmlTemplateResponse) Descriptor() ([]byte, []int)
- func (m *UpdateHtmlTemplateResponse) GetHtmlTemplate() *HtmlTemplate
- func (*UpdateHtmlTemplateResponse) ProtoMessage()
- func (m *UpdateHtmlTemplateResponse) Reset()
- func (m *UpdateHtmlTemplateResponse) String() string
- func (m *UpdateHtmlTemplateResponse) XXX_DiscardUnknown()
- func (m *UpdateHtmlTemplateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UpdateHtmlTemplateResponse) XXX_Merge(src proto.Message)
- func (m *UpdateHtmlTemplateResponse) XXX_Size() int
- func (m *UpdateHtmlTemplateResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ElementAlign_name = map[int32]string{
0: "LEFT",
1: "CENTER",
2: "RIGHT",
}
var ElementAlign_value = map[string]int32{
"LEFT": 0,
"CENTER": 1,
"RIGHT": 2,
}
var ElementSize_name = map[int32]string{
0: "DEFAULT",
1: "SMALL",
2: "NORMAL",
3: "LARGE",
4: "HUGE",
}
var ElementSize_value = map[string]int32{
"DEFAULT": 0,
"SMALL": 1,
"NORMAL": 2,
"LARGE": 3,
"HUGE": 4,
}
var ElementType_name = map[int32]string{
0: "TEXT",
1: "IMAGE",
}
var ElementType_value = map[string]int32{
"TEXT": 0,
"IMAGE": 1,
}
Functions ¶
func RegisterEscPosServiceHandler ¶
func RegisterEscPosServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEscPosServiceHandler registers the http handlers for service EscPosService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEscPosServiceHandlerClient ¶
func RegisterEscPosServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EscPosServiceClient) error
RegisterEscPosServiceHandlerClient registers the http handlers for service EscPosService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EscPosServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EscPosServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EscPosServiceClient" to call the correct interceptors.
func RegisterEscPosServiceHandlerFromEndpoint ¶
func RegisterEscPosServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEscPosServiceHandlerFromEndpoint is same as RegisterEscPosServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEscPosServiceHandlerServer ¶
func RegisterEscPosServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EscPosServiceServer) error
RegisterEscPosServiceHandlerServer registers the http handlers for service EscPosService to "mux". UnaryRPC :call EscPosServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterEscPosServiceServer ¶
func RegisterEscPosServiceServer(s *grpc.Server, srv EscPosServiceServer)
Types ¶
type DeleteHtmlTemplatesRequest ¶
type DeleteHtmlTemplatesRequest struct { // 删除Html模板id列表 HtmlTemplatesId []string `protobuf:"bytes,1,rep,name=html_templates_id,json=htmlTemplatesId,proto3" json:"html_templates_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
删除Html模板请求
func (*DeleteHtmlTemplatesRequest) Descriptor ¶
func (*DeleteHtmlTemplatesRequest) Descriptor() ([]byte, []int)
func (*DeleteHtmlTemplatesRequest) GetHtmlTemplatesId ¶
func (m *DeleteHtmlTemplatesRequest) GetHtmlTemplatesId() []string
func (*DeleteHtmlTemplatesRequest) ProtoMessage ¶
func (*DeleteHtmlTemplatesRequest) ProtoMessage()
func (*DeleteHtmlTemplatesRequest) Reset ¶
func (m *DeleteHtmlTemplatesRequest) Reset()
func (*DeleteHtmlTemplatesRequest) String ¶
func (m *DeleteHtmlTemplatesRequest) String() string
func (*DeleteHtmlTemplatesRequest) XXX_DiscardUnknown ¶
func (m *DeleteHtmlTemplatesRequest) XXX_DiscardUnknown()
func (*DeleteHtmlTemplatesRequest) XXX_Marshal ¶
func (m *DeleteHtmlTemplatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeleteHtmlTemplatesRequest) XXX_Merge ¶
func (m *DeleteHtmlTemplatesRequest) XXX_Merge(src proto.Message)
func (*DeleteHtmlTemplatesRequest) XXX_Size ¶
func (m *DeleteHtmlTemplatesRequest) XXX_Size() int
func (*DeleteHtmlTemplatesRequest) XXX_Unmarshal ¶
func (m *DeleteHtmlTemplatesRequest) XXX_Unmarshal(b []byte) error
type DeleteHtmlTemplatesResponse ¶
type DeleteHtmlTemplatesResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
删除Html模板结果
func (*DeleteHtmlTemplatesResponse) Descriptor ¶
func (*DeleteHtmlTemplatesResponse) Descriptor() ([]byte, []int)
func (*DeleteHtmlTemplatesResponse) ProtoMessage ¶
func (*DeleteHtmlTemplatesResponse) ProtoMessage()
func (*DeleteHtmlTemplatesResponse) Reset ¶
func (m *DeleteHtmlTemplatesResponse) Reset()
func (*DeleteHtmlTemplatesResponse) String ¶
func (m *DeleteHtmlTemplatesResponse) String() string
func (*DeleteHtmlTemplatesResponse) XXX_DiscardUnknown ¶
func (m *DeleteHtmlTemplatesResponse) XXX_DiscardUnknown()
func (*DeleteHtmlTemplatesResponse) XXX_Marshal ¶
func (m *DeleteHtmlTemplatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeleteHtmlTemplatesResponse) XXX_Merge ¶
func (m *DeleteHtmlTemplatesResponse) XXX_Merge(src proto.Message)
func (*DeleteHtmlTemplatesResponse) XXX_Size ¶
func (m *DeleteHtmlTemplatesResponse) XXX_Size() int
func (*DeleteHtmlTemplatesResponse) XXX_Unmarshal ¶
func (m *DeleteHtmlTemplatesResponse) XXX_Unmarshal(b []byte) error
type Element ¶
type Element struct { // 打印类型 Etype ElementType `protobuf:"varint,1,opt,name=etype,proto3,enum=escposService.ElementType" json:"etype,omitempty"` // 文本类型打印内容 ContentText string `protobuf:"bytes,2,opt,name=content_text,json=contentText,proto3" json:"content_text,omitempty"` // 图片类型打印内容 ContentImage []byte `protobuf:"bytes,3,opt,name=content_image,json=contentImage,proto3" json:"content_image,omitempty"` // 图片类型, 默认为png (png|jpg|jpeg|bmp) ImageContentType string `protobuf:"bytes,5,opt,name=image_content_type,json=imageContentType,proto3" json:"image_content_type,omitempty"` // 字号 // 图片类型无效 Size ElementSize `protobuf:"varint,4,opt,name=size,proto3,enum=escposService.ElementSize" json:"size,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Element对象
func (*Element) Descriptor ¶
func (*Element) GetContentImage ¶
func (*Element) GetContentText ¶
func (*Element) GetEtype ¶
func (m *Element) GetEtype() ElementType
func (*Element) GetImageContentType ¶
func (*Element) GetSize ¶
func (m *Element) GetSize() ElementSize
func (*Element) ProtoMessage ¶
func (*Element) ProtoMessage()
func (*Element) XXX_DiscardUnknown ¶
func (m *Element) XXX_DiscardUnknown()
func (*Element) XXX_Marshal ¶
func (*Element) XXX_Unmarshal ¶
type ElementAlign ¶
type ElementAlign int32
Element行内容对齐方式
const ( // 左对齐 ElementAlign_LEFT ElementAlign = 0 // 居中 ElementAlign_CENTER ElementAlign = 1 // 右对齐 ElementAlign_RIGHT ElementAlign = 2 )
func (ElementAlign) EnumDescriptor ¶
func (ElementAlign) EnumDescriptor() ([]byte, []int)
func (ElementAlign) String ¶
func (x ElementAlign) String() string
type ElementRow ¶
type ElementRow struct { // 打印对象列表 Elements []*Element `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"` // 行对齐方式 Align ElementAlign `protobuf:"varint,2,opt,name=align,proto3,enum=escposService.ElementAlign" json:"align,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
单行中打印对象
func (*ElementRow) Descriptor ¶
func (*ElementRow) Descriptor() ([]byte, []int)
func (*ElementRow) GetAlign ¶
func (m *ElementRow) GetAlign() ElementAlign
func (*ElementRow) GetElements ¶
func (m *ElementRow) GetElements() []*Element
func (*ElementRow) ProtoMessage ¶
func (*ElementRow) ProtoMessage()
func (*ElementRow) Reset ¶
func (m *ElementRow) Reset()
func (*ElementRow) String ¶
func (m *ElementRow) String() string
func (*ElementRow) XXX_DiscardUnknown ¶
func (m *ElementRow) XXX_DiscardUnknown()
func (*ElementRow) XXX_Marshal ¶
func (m *ElementRow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ElementRow) XXX_Merge ¶
func (m *ElementRow) XXX_Merge(src proto.Message)
func (*ElementRow) XXX_Size ¶
func (m *ElementRow) XXX_Size() int
func (*ElementRow) XXX_Unmarshal ¶
func (m *ElementRow) XXX_Unmarshal(b []byte) error
type ElementSize ¶
type ElementSize int32
Element文字尺寸
const ( // DEFAULT = NORMAL ElementSize_DEFAULT ElementSize = 0 // 小字体 ElementSize_SMALL ElementSize = 1 // 中字体 ElementSize_NORMAL ElementSize = 2 // 大字体 ElementSize_LARGE ElementSize = 3 // 超大字体 ElementSize_HUGE ElementSize = 4 )
func (ElementSize) EnumDescriptor ¶
func (ElementSize) EnumDescriptor() ([]byte, []int)
func (ElementSize) String ¶
func (x ElementSize) String() string
type ElementType ¶
type ElementType int32
Element内容类型
const ( // 文本类型 ElementType_TEXT ElementType = 0 // 图片类型 ElementType_IMAGE ElementType = 1 )
func (ElementType) EnumDescriptor ¶
func (ElementType) EnumDescriptor() ([]byte, []int)
func (ElementType) String ¶
func (x ElementType) String() string
type EscPosServiceClient ¶
type EscPosServiceClient interface { // PrintRaw 直接输入打印设备协议数据进行打印 // // 用于支持外部程序直接通过协议方式打印 // 此方法为最底层与硬件设备通讯的方法 PrintRaw(ctx context.Context, in *PrintRawRequest, opts ...grpc.CallOption) (*PrintRawResponse, error) // PrintElements 通过Element对象描述内容进行打印 // // Element基于行进行内容描述,通过描述每行的内容构建为打印数据 // 不支持单行中图片与文字混合打印 // // 底层方法为PrintRaw PrintElements(ctx context.Context, in *PrintElementsRequest, opts ...grpc.CallOption) (*PrintElementsResponse, error) // PrintHtmlTemplate 通过Html预设模板内容进行插值打印 // // 模板中请使用"{{}}"符号标记占位符 // 如: 联系电话: {{tel}} // 参数: {"params": {"tel": "123"}} // // 底层方法为PrintElements PrintHtmlTemplate(ctx context.Context, in *PrintHtmlTemplateRequest, opts ...grpc.CallOption) (*PrintHtmlTemplateResponse, error) // NewHtmlTemplate 新建一个Html模板 NewHtmlTemplate(ctx context.Context, in *NewHtmlTemplateRequest, opts ...grpc.CallOption) (*NewHtmlTemplateResponse, error) // ListHtmlTemplates 获取Html模板列表 ListHtmlTemplates(ctx context.Context, in *ListHtmlTemplatesRequest, opts ...grpc.CallOption) (*ListHtmlTemplatesResponse, error) // GetHtmlTemplate 获取Html模板 GetHtmlTemplate(ctx context.Context, in *GetHtmlTemplateRequest, opts ...grpc.CallOption) (*GetHtmlTemplateResponse, error) // UpdateHtmlTemplate 更新Html模板 // // HtmlTemplate基于(Quill)[https://quilljs.com]实现编辑部分 // // 插值占位符为{{}} // 插值使用请参考PrintHtmlTemplate及PrintHtmlTemplateRequest UpdateHtmlTemplate(ctx context.Context, in *UpdateHtmlTemplateRequest, opts ...grpc.CallOption) (*UpdateHtmlTemplateResponse, error) // DeleteHtmlTemplates 删除Html模板列表 DeleteHtmlTemplates(ctx context.Context, in *DeleteHtmlTemplatesRequest, opts ...grpc.CallOption) (*DeleteHtmlTemplatesResponse, error) }
EscPosServiceClient is the client API for EscPosService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEscPosServiceClient ¶
func NewEscPosServiceClient(cc grpc.ClientConnInterface) EscPosServiceClient
type EscPosServiceServer ¶
type EscPosServiceServer interface { // PrintRaw 直接输入打印设备协议数据进行打印 // // 用于支持外部程序直接通过协议方式打印 // 此方法为最底层与硬件设备通讯的方法 PrintRaw(context.Context, *PrintRawRequest) (*PrintRawResponse, error) // PrintElements 通过Element对象描述内容进行打印 // // Element基于行进行内容描述,通过描述每行的内容构建为打印数据 // 不支持单行中图片与文字混合打印 // // 底层方法为PrintRaw PrintElements(context.Context, *PrintElementsRequest) (*PrintElementsResponse, error) // PrintHtmlTemplate 通过Html预设模板内容进行插值打印 // // 模板中请使用"{{}}"符号标记占位符 // 如: 联系电话: {{tel}} // 参数: {"params": {"tel": "123"}} // // 底层方法为PrintElements PrintHtmlTemplate(context.Context, *PrintHtmlTemplateRequest) (*PrintHtmlTemplateResponse, error) // NewHtmlTemplate 新建一个Html模板 NewHtmlTemplate(context.Context, *NewHtmlTemplateRequest) (*NewHtmlTemplateResponse, error) // ListHtmlTemplates 获取Html模板列表 ListHtmlTemplates(context.Context, *ListHtmlTemplatesRequest) (*ListHtmlTemplatesResponse, error) // GetHtmlTemplate 获取Html模板 GetHtmlTemplate(context.Context, *GetHtmlTemplateRequest) (*GetHtmlTemplateResponse, error) // UpdateHtmlTemplate 更新Html模板 // // HtmlTemplate基于(Quill)[https://quilljs.com]实现编辑部分 // // 插值占位符为{{}} // 插值使用请参考PrintHtmlTemplate及PrintHtmlTemplateRequest UpdateHtmlTemplate(context.Context, *UpdateHtmlTemplateRequest) (*UpdateHtmlTemplateResponse, error) // DeleteHtmlTemplates 删除Html模板列表 DeleteHtmlTemplates(context.Context, *DeleteHtmlTemplatesRequest) (*DeleteHtmlTemplatesResponse, error) }
EscPosServiceServer is the server API for EscPosService service.
type GetHtmlTemplateRequest ¶
type GetHtmlTemplateRequest struct { // Html模板id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
获取指定模板内容请求
func (*GetHtmlTemplateRequest) Descriptor ¶
func (*GetHtmlTemplateRequest) Descriptor() ([]byte, []int)
func (*GetHtmlTemplateRequest) GetId ¶
func (m *GetHtmlTemplateRequest) GetId() string
func (*GetHtmlTemplateRequest) ProtoMessage ¶
func (*GetHtmlTemplateRequest) ProtoMessage()
func (*GetHtmlTemplateRequest) Reset ¶
func (m *GetHtmlTemplateRequest) Reset()
func (*GetHtmlTemplateRequest) String ¶
func (m *GetHtmlTemplateRequest) String() string
func (*GetHtmlTemplateRequest) XXX_DiscardUnknown ¶
func (m *GetHtmlTemplateRequest) XXX_DiscardUnknown()
func (*GetHtmlTemplateRequest) XXX_Marshal ¶
func (m *GetHtmlTemplateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetHtmlTemplateRequest) XXX_Merge ¶
func (m *GetHtmlTemplateRequest) XXX_Merge(src proto.Message)
func (*GetHtmlTemplateRequest) XXX_Size ¶
func (m *GetHtmlTemplateRequest) XXX_Size() int
func (*GetHtmlTemplateRequest) XXX_Unmarshal ¶
func (m *GetHtmlTemplateRequest) XXX_Unmarshal(b []byte) error
type GetHtmlTemplateResponse ¶
type GetHtmlTemplateResponse struct { // Html模板 HtmlTemplate *HtmlTemplate `protobuf:"bytes,1,opt,name=html_template,json=htmlTemplate,proto3" json:"html_template,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
获取指定模板内容结果
func (*GetHtmlTemplateResponse) Descriptor ¶
func (*GetHtmlTemplateResponse) Descriptor() ([]byte, []int)
func (*GetHtmlTemplateResponse) GetHtmlTemplate ¶
func (m *GetHtmlTemplateResponse) GetHtmlTemplate() *HtmlTemplate
func (*GetHtmlTemplateResponse) ProtoMessage ¶
func (*GetHtmlTemplateResponse) ProtoMessage()
func (*GetHtmlTemplateResponse) Reset ¶
func (m *GetHtmlTemplateResponse) Reset()
func (*GetHtmlTemplateResponse) String ¶
func (m *GetHtmlTemplateResponse) String() string
func (*GetHtmlTemplateResponse) XXX_DiscardUnknown ¶
func (m *GetHtmlTemplateResponse) XXX_DiscardUnknown()
func (*GetHtmlTemplateResponse) XXX_Marshal ¶
func (m *GetHtmlTemplateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetHtmlTemplateResponse) XXX_Merge ¶
func (m *GetHtmlTemplateResponse) XXX_Merge(src proto.Message)
func (*GetHtmlTemplateResponse) XXX_Size ¶
func (m *GetHtmlTemplateResponse) XXX_Size() int
func (*GetHtmlTemplateResponse) XXX_Unmarshal ¶
func (m *GetHtmlTemplateResponse) XXX_Unmarshal(b []byte) error
type HtmlTemplate ¶
type HtmlTemplate struct { // 创建时id将自动生成 // 修改时根据此id获取模板数据 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 创建时传入空值将生成随机名 // 修改时传入空值将不改变 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 修改时传入空值将不改变 Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Html模板
func (*HtmlTemplate) Descriptor ¶
func (*HtmlTemplate) Descriptor() ([]byte, []int)
func (*HtmlTemplate) GetContent ¶
func (m *HtmlTemplate) GetContent() string
func (*HtmlTemplate) GetId ¶
func (m *HtmlTemplate) GetId() string
func (*HtmlTemplate) GetName ¶
func (m *HtmlTemplate) GetName() string
func (*HtmlTemplate) ProtoMessage ¶
func (*HtmlTemplate) ProtoMessage()
func (*HtmlTemplate) Reset ¶
func (m *HtmlTemplate) Reset()
func (*HtmlTemplate) String ¶
func (m *HtmlTemplate) String() string
func (*HtmlTemplate) XXX_DiscardUnknown ¶
func (m *HtmlTemplate) XXX_DiscardUnknown()
func (*HtmlTemplate) XXX_Marshal ¶
func (m *HtmlTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HtmlTemplate) XXX_Merge ¶
func (m *HtmlTemplate) XXX_Merge(src proto.Message)
func (*HtmlTemplate) XXX_Size ¶
func (m *HtmlTemplate) XXX_Size() int
func (*HtmlTemplate) XXX_Unmarshal ¶
func (m *HtmlTemplate) XXX_Unmarshal(b []byte) error
type ListHtmlTemplatesRequest ¶
type ListHtmlTemplatesRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
获取模板列表请求
func (*ListHtmlTemplatesRequest) Descriptor ¶
func (*ListHtmlTemplatesRequest) Descriptor() ([]byte, []int)
func (*ListHtmlTemplatesRequest) ProtoMessage ¶
func (*ListHtmlTemplatesRequest) ProtoMessage()
func (*ListHtmlTemplatesRequest) Reset ¶
func (m *ListHtmlTemplatesRequest) Reset()
func (*ListHtmlTemplatesRequest) String ¶
func (m *ListHtmlTemplatesRequest) String() string
func (*ListHtmlTemplatesRequest) XXX_DiscardUnknown ¶
func (m *ListHtmlTemplatesRequest) XXX_DiscardUnknown()
func (*ListHtmlTemplatesRequest) XXX_Marshal ¶
func (m *ListHtmlTemplatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListHtmlTemplatesRequest) XXX_Merge ¶
func (m *ListHtmlTemplatesRequest) XXX_Merge(src proto.Message)
func (*ListHtmlTemplatesRequest) XXX_Size ¶
func (m *ListHtmlTemplatesRequest) XXX_Size() int
func (*ListHtmlTemplatesRequest) XXX_Unmarshal ¶
func (m *ListHtmlTemplatesRequest) XXX_Unmarshal(b []byte) error
type ListHtmlTemplatesResponse ¶
type ListHtmlTemplatesResponse struct { // Html模板列表 HtmlTemplates []*HtmlTemplate `protobuf:"bytes,1,rep,name=html_templates,json=htmlTemplates,proto3" json:"html_templates,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
获取模板列表结果
func (*ListHtmlTemplatesResponse) Descriptor ¶
func (*ListHtmlTemplatesResponse) Descriptor() ([]byte, []int)
func (*ListHtmlTemplatesResponse) GetHtmlTemplates ¶
func (m *ListHtmlTemplatesResponse) GetHtmlTemplates() []*HtmlTemplate
func (*ListHtmlTemplatesResponse) ProtoMessage ¶
func (*ListHtmlTemplatesResponse) ProtoMessage()
func (*ListHtmlTemplatesResponse) Reset ¶
func (m *ListHtmlTemplatesResponse) Reset()
func (*ListHtmlTemplatesResponse) String ¶
func (m *ListHtmlTemplatesResponse) String() string
func (*ListHtmlTemplatesResponse) XXX_DiscardUnknown ¶
func (m *ListHtmlTemplatesResponse) XXX_DiscardUnknown()
func (*ListHtmlTemplatesResponse) XXX_Marshal ¶
func (m *ListHtmlTemplatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListHtmlTemplatesResponse) XXX_Merge ¶
func (m *ListHtmlTemplatesResponse) XXX_Merge(src proto.Message)
func (*ListHtmlTemplatesResponse) XXX_Size ¶
func (m *ListHtmlTemplatesResponse) XXX_Size() int
func (*ListHtmlTemplatesResponse) XXX_Unmarshal ¶
func (m *ListHtmlTemplatesResponse) XXX_Unmarshal(b []byte) error
type NewHtmlTemplateRequest ¶
type NewHtmlTemplateRequest struct { // html模板 HtmlTemplate *HtmlTemplate `protobuf:"bytes,1,opt,name=html_template,json=htmlTemplate,proto3" json:"html_template,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
新建Html模板请求
func (*NewHtmlTemplateRequest) Descriptor ¶
func (*NewHtmlTemplateRequest) Descriptor() ([]byte, []int)
func (*NewHtmlTemplateRequest) GetHtmlTemplate ¶
func (m *NewHtmlTemplateRequest) GetHtmlTemplate() *HtmlTemplate
func (*NewHtmlTemplateRequest) ProtoMessage ¶
func (*NewHtmlTemplateRequest) ProtoMessage()
func (*NewHtmlTemplateRequest) Reset ¶
func (m *NewHtmlTemplateRequest) Reset()
func (*NewHtmlTemplateRequest) String ¶
func (m *NewHtmlTemplateRequest) String() string
func (*NewHtmlTemplateRequest) XXX_DiscardUnknown ¶
func (m *NewHtmlTemplateRequest) XXX_DiscardUnknown()
func (*NewHtmlTemplateRequest) XXX_Marshal ¶
func (m *NewHtmlTemplateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NewHtmlTemplateRequest) XXX_Merge ¶
func (m *NewHtmlTemplateRequest) XXX_Merge(src proto.Message)
func (*NewHtmlTemplateRequest) XXX_Size ¶
func (m *NewHtmlTemplateRequest) XXX_Size() int
func (*NewHtmlTemplateRequest) XXX_Unmarshal ¶
func (m *NewHtmlTemplateRequest) XXX_Unmarshal(b []byte) error
type NewHtmlTemplateResponse ¶
type NewHtmlTemplateResponse struct { // html模板 HtmlTemplate *HtmlTemplate `protobuf:"bytes,1,opt,name=html_template,json=htmlTemplate,proto3" json:"html_template,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
新建html模板结果
func (*NewHtmlTemplateResponse) Descriptor ¶
func (*NewHtmlTemplateResponse) Descriptor() ([]byte, []int)
func (*NewHtmlTemplateResponse) GetHtmlTemplate ¶
func (m *NewHtmlTemplateResponse) GetHtmlTemplate() *HtmlTemplate
func (*NewHtmlTemplateResponse) ProtoMessage ¶
func (*NewHtmlTemplateResponse) ProtoMessage()
func (*NewHtmlTemplateResponse) Reset ¶
func (m *NewHtmlTemplateResponse) Reset()
func (*NewHtmlTemplateResponse) String ¶
func (m *NewHtmlTemplateResponse) String() string
func (*NewHtmlTemplateResponse) XXX_DiscardUnknown ¶
func (m *NewHtmlTemplateResponse) XXX_DiscardUnknown()
func (*NewHtmlTemplateResponse) XXX_Marshal ¶
func (m *NewHtmlTemplateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NewHtmlTemplateResponse) XXX_Merge ¶
func (m *NewHtmlTemplateResponse) XXX_Merge(src proto.Message)
func (*NewHtmlTemplateResponse) XXX_Size ¶
func (m *NewHtmlTemplateResponse) XXX_Size() int
func (*NewHtmlTemplateResponse) XXX_Unmarshal ¶
func (m *NewHtmlTemplateResponse) XXX_Unmarshal(b []byte) error
type PrintElementsRequest ¶
type PrintElementsRequest struct { // 打印element行对象列表 ElementRows []*ElementRow `protobuf:"bytes,1,rep,name=element_rows,json=elementRows,proto3" json:"element_rows,omitempty"` // 是否切纸 需打印机类型支持 Cut bool `protobuf:"varint,2,opt,name=cut,proto3" json:"cut,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
打印对象请求
func (*PrintElementsRequest) Descriptor ¶
func (*PrintElementsRequest) Descriptor() ([]byte, []int)
func (*PrintElementsRequest) GetCut ¶
func (m *PrintElementsRequest) GetCut() bool
func (*PrintElementsRequest) GetElementRows ¶
func (m *PrintElementsRequest) GetElementRows() []*ElementRow
func (*PrintElementsRequest) ProtoMessage ¶
func (*PrintElementsRequest) ProtoMessage()
func (*PrintElementsRequest) Reset ¶
func (m *PrintElementsRequest) Reset()
func (*PrintElementsRequest) String ¶
func (m *PrintElementsRequest) String() string
func (*PrintElementsRequest) XXX_DiscardUnknown ¶
func (m *PrintElementsRequest) XXX_DiscardUnknown()
func (*PrintElementsRequest) XXX_Marshal ¶
func (m *PrintElementsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrintElementsRequest) XXX_Merge ¶
func (m *PrintElementsRequest) XXX_Merge(src proto.Message)
func (*PrintElementsRequest) XXX_Size ¶
func (m *PrintElementsRequest) XXX_Size() int
func (*PrintElementsRequest) XXX_Unmarshal ¶
func (m *PrintElementsRequest) XXX_Unmarshal(b []byte) error
type PrintElementsResponse ¶
type PrintElementsResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
打印对象结果
func (*PrintElementsResponse) Descriptor ¶
func (*PrintElementsResponse) Descriptor() ([]byte, []int)
func (*PrintElementsResponse) ProtoMessage ¶
func (*PrintElementsResponse) ProtoMessage()
func (*PrintElementsResponse) Reset ¶
func (m *PrintElementsResponse) Reset()
func (*PrintElementsResponse) String ¶
func (m *PrintElementsResponse) String() string
func (*PrintElementsResponse) XXX_DiscardUnknown ¶
func (m *PrintElementsResponse) XXX_DiscardUnknown()
func (*PrintElementsResponse) XXX_Marshal ¶
func (m *PrintElementsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrintElementsResponse) XXX_Merge ¶
func (m *PrintElementsResponse) XXX_Merge(src proto.Message)
func (*PrintElementsResponse) XXX_Size ¶
func (m *PrintElementsResponse) XXX_Size() int
func (*PrintElementsResponse) XXX_Unmarshal ¶
func (m *PrintElementsResponse) XXX_Unmarshal(b []byte) error
type PrintHtmlTemplateRequest ¶
type PrintHtmlTemplateRequest struct { // 可与name选填 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 可与id选填, 仅匹配首个同名模板 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 模板参数, 模板页面中使用"{{}}"符号标记 // 如: 联系电话: {{tel}}, 参数中使用{"params": {"tel": "123"}} // 打印内容则为: 联系电话: 123 Params map[string]string `` /* 153-byte string literal not displayed */ // 是否切纸 需打印机类型支持 Cut bool `protobuf:"varint,4,opt,name=cut,proto3" json:"cut,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Html模板打印请求
func (*PrintHtmlTemplateRequest) Descriptor ¶
func (*PrintHtmlTemplateRequest) Descriptor() ([]byte, []int)
func (*PrintHtmlTemplateRequest) GetCut ¶
func (m *PrintHtmlTemplateRequest) GetCut() bool
func (*PrintHtmlTemplateRequest) GetId ¶
func (m *PrintHtmlTemplateRequest) GetId() string
func (*PrintHtmlTemplateRequest) GetName ¶
func (m *PrintHtmlTemplateRequest) GetName() string
func (*PrintHtmlTemplateRequest) GetParams ¶
func (m *PrintHtmlTemplateRequest) GetParams() map[string]string
func (*PrintHtmlTemplateRequest) ProtoMessage ¶
func (*PrintHtmlTemplateRequest) ProtoMessage()
func (*PrintHtmlTemplateRequest) Reset ¶
func (m *PrintHtmlTemplateRequest) Reset()
func (*PrintHtmlTemplateRequest) String ¶
func (m *PrintHtmlTemplateRequest) String() string
func (*PrintHtmlTemplateRequest) XXX_DiscardUnknown ¶
func (m *PrintHtmlTemplateRequest) XXX_DiscardUnknown()
func (*PrintHtmlTemplateRequest) XXX_Marshal ¶
func (m *PrintHtmlTemplateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrintHtmlTemplateRequest) XXX_Merge ¶
func (m *PrintHtmlTemplateRequest) XXX_Merge(src proto.Message)
func (*PrintHtmlTemplateRequest) XXX_Size ¶
func (m *PrintHtmlTemplateRequest) XXX_Size() int
func (*PrintHtmlTemplateRequest) XXX_Unmarshal ¶
func (m *PrintHtmlTemplateRequest) XXX_Unmarshal(b []byte) error
type PrintHtmlTemplateResponse ¶
type PrintHtmlTemplateResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Html模板打印结果
func (*PrintHtmlTemplateResponse) Descriptor ¶
func (*PrintHtmlTemplateResponse) Descriptor() ([]byte, []int)
func (*PrintHtmlTemplateResponse) ProtoMessage ¶
func (*PrintHtmlTemplateResponse) ProtoMessage()
func (*PrintHtmlTemplateResponse) Reset ¶
func (m *PrintHtmlTemplateResponse) Reset()
func (*PrintHtmlTemplateResponse) String ¶
func (m *PrintHtmlTemplateResponse) String() string
func (*PrintHtmlTemplateResponse) XXX_DiscardUnknown ¶
func (m *PrintHtmlTemplateResponse) XXX_DiscardUnknown()
func (*PrintHtmlTemplateResponse) XXX_Marshal ¶
func (m *PrintHtmlTemplateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrintHtmlTemplateResponse) XXX_Merge ¶
func (m *PrintHtmlTemplateResponse) XXX_Merge(src proto.Message)
func (*PrintHtmlTemplateResponse) XXX_Size ¶
func (m *PrintHtmlTemplateResponse) XXX_Size() int
func (*PrintHtmlTemplateResponse) XXX_Unmarshal ¶
func (m *PrintHtmlTemplateResponse) XXX_Unmarshal(b []byte) error
type PrintRawRequest ¶
type PrintRawRequest struct { // escpos协议数据 Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
打印bytes数据请求
func (*PrintRawRequest) Descriptor ¶
func (*PrintRawRequest) Descriptor() ([]byte, []int)
func (*PrintRawRequest) GetRaw ¶
func (m *PrintRawRequest) GetRaw() []byte
func (*PrintRawRequest) ProtoMessage ¶
func (*PrintRawRequest) ProtoMessage()
func (*PrintRawRequest) Reset ¶
func (m *PrintRawRequest) Reset()
func (*PrintRawRequest) String ¶
func (m *PrintRawRequest) String() string
func (*PrintRawRequest) XXX_DiscardUnknown ¶
func (m *PrintRawRequest) XXX_DiscardUnknown()
func (*PrintRawRequest) XXX_Marshal ¶
func (m *PrintRawRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrintRawRequest) XXX_Merge ¶
func (m *PrintRawRequest) XXX_Merge(src proto.Message)
func (*PrintRawRequest) XXX_Size ¶
func (m *PrintRawRequest) XXX_Size() int
func (*PrintRawRequest) XXX_Unmarshal ¶
func (m *PrintRawRequest) XXX_Unmarshal(b []byte) error
type PrintRawResponse ¶
type PrintRawResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
打印bytes数据结果
func (*PrintRawResponse) Descriptor ¶
func (*PrintRawResponse) Descriptor() ([]byte, []int)
func (*PrintRawResponse) ProtoMessage ¶
func (*PrintRawResponse) ProtoMessage()
func (*PrintRawResponse) Reset ¶
func (m *PrintRawResponse) Reset()
func (*PrintRawResponse) String ¶
func (m *PrintRawResponse) String() string
func (*PrintRawResponse) XXX_DiscardUnknown ¶
func (m *PrintRawResponse) XXX_DiscardUnknown()
func (*PrintRawResponse) XXX_Marshal ¶
func (m *PrintRawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrintRawResponse) XXX_Merge ¶
func (m *PrintRawResponse) XXX_Merge(src proto.Message)
func (*PrintRawResponse) XXX_Size ¶
func (m *PrintRawResponse) XXX_Size() int
func (*PrintRawResponse) XXX_Unmarshal ¶
func (m *PrintRawResponse) XXX_Unmarshal(b []byte) error
type UnimplementedEscPosServiceServer ¶
type UnimplementedEscPosServiceServer struct { }
UnimplementedEscPosServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedEscPosServiceServer) DeleteHtmlTemplates ¶
func (*UnimplementedEscPosServiceServer) DeleteHtmlTemplates(ctx context.Context, req *DeleteHtmlTemplatesRequest) (*DeleteHtmlTemplatesResponse, error)
func (*UnimplementedEscPosServiceServer) GetHtmlTemplate ¶
func (*UnimplementedEscPosServiceServer) GetHtmlTemplate(ctx context.Context, req *GetHtmlTemplateRequest) (*GetHtmlTemplateResponse, error)
func (*UnimplementedEscPosServiceServer) ListHtmlTemplates ¶
func (*UnimplementedEscPosServiceServer) ListHtmlTemplates(ctx context.Context, req *ListHtmlTemplatesRequest) (*ListHtmlTemplatesResponse, error)
func (*UnimplementedEscPosServiceServer) NewHtmlTemplate ¶
func (*UnimplementedEscPosServiceServer) NewHtmlTemplate(ctx context.Context, req *NewHtmlTemplateRequest) (*NewHtmlTemplateResponse, error)
func (*UnimplementedEscPosServiceServer) PrintElements ¶
func (*UnimplementedEscPosServiceServer) PrintElements(ctx context.Context, req *PrintElementsRequest) (*PrintElementsResponse, error)
func (*UnimplementedEscPosServiceServer) PrintHtmlTemplate ¶
func (*UnimplementedEscPosServiceServer) PrintHtmlTemplate(ctx context.Context, req *PrintHtmlTemplateRequest) (*PrintHtmlTemplateResponse, error)
func (*UnimplementedEscPosServiceServer) PrintRaw ¶
func (*UnimplementedEscPosServiceServer) PrintRaw(ctx context.Context, req *PrintRawRequest) (*PrintRawResponse, error)
func (*UnimplementedEscPosServiceServer) UpdateHtmlTemplate ¶
func (*UnimplementedEscPosServiceServer) UpdateHtmlTemplate(ctx context.Context, req *UpdateHtmlTemplateRequest) (*UpdateHtmlTemplateResponse, error)
type UpdateHtmlTemplateRequest ¶
type UpdateHtmlTemplateRequest struct { // Html模板 HtmlTemplate *HtmlTemplate `protobuf:"bytes,1,opt,name=html_template,json=htmlTemplate,proto3" json:"html_template,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
更新Html模板请求
func (*UpdateHtmlTemplateRequest) Descriptor ¶
func (*UpdateHtmlTemplateRequest) Descriptor() ([]byte, []int)
func (*UpdateHtmlTemplateRequest) GetHtmlTemplate ¶
func (m *UpdateHtmlTemplateRequest) GetHtmlTemplate() *HtmlTemplate
func (*UpdateHtmlTemplateRequest) ProtoMessage ¶
func (*UpdateHtmlTemplateRequest) ProtoMessage()
func (*UpdateHtmlTemplateRequest) Reset ¶
func (m *UpdateHtmlTemplateRequest) Reset()
func (*UpdateHtmlTemplateRequest) String ¶
func (m *UpdateHtmlTemplateRequest) String() string
func (*UpdateHtmlTemplateRequest) XXX_DiscardUnknown ¶
func (m *UpdateHtmlTemplateRequest) XXX_DiscardUnknown()
func (*UpdateHtmlTemplateRequest) XXX_Marshal ¶
func (m *UpdateHtmlTemplateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdateHtmlTemplateRequest) XXX_Merge ¶
func (m *UpdateHtmlTemplateRequest) XXX_Merge(src proto.Message)
func (*UpdateHtmlTemplateRequest) XXX_Size ¶
func (m *UpdateHtmlTemplateRequest) XXX_Size() int
func (*UpdateHtmlTemplateRequest) XXX_Unmarshal ¶
func (m *UpdateHtmlTemplateRequest) XXX_Unmarshal(b []byte) error
type UpdateHtmlTemplateResponse ¶
type UpdateHtmlTemplateResponse struct { // html模板 HtmlTemplate *HtmlTemplate `protobuf:"bytes,1,opt,name=html_template,json=htmlTemplate,proto3" json:"html_template,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
更新Html模板结果
func (*UpdateHtmlTemplateResponse) Descriptor ¶
func (*UpdateHtmlTemplateResponse) Descriptor() ([]byte, []int)
func (*UpdateHtmlTemplateResponse) GetHtmlTemplate ¶
func (m *UpdateHtmlTemplateResponse) GetHtmlTemplate() *HtmlTemplate
func (*UpdateHtmlTemplateResponse) ProtoMessage ¶
func (*UpdateHtmlTemplateResponse) ProtoMessage()
func (*UpdateHtmlTemplateResponse) Reset ¶
func (m *UpdateHtmlTemplateResponse) Reset()
func (*UpdateHtmlTemplateResponse) String ¶
func (m *UpdateHtmlTemplateResponse) String() string
func (*UpdateHtmlTemplateResponse) XXX_DiscardUnknown ¶
func (m *UpdateHtmlTemplateResponse) XXX_DiscardUnknown()
func (*UpdateHtmlTemplateResponse) XXX_Marshal ¶
func (m *UpdateHtmlTemplateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdateHtmlTemplateResponse) XXX_Merge ¶
func (m *UpdateHtmlTemplateResponse) XXX_Merge(src proto.Message)
func (*UpdateHtmlTemplateResponse) XXX_Size ¶
func (m *UpdateHtmlTemplateResponse) XXX_Size() int
func (*UpdateHtmlTemplateResponse) XXX_Unmarshal ¶
func (m *UpdateHtmlTemplateResponse) XXX_Unmarshal(b []byte) error