Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/houseme/feie
Flying Goose Cloud print go language sdk
https://github.com/houseme/feie
cloud-print feie feie-cloud feieyun go golang houseme printer sdk sdk-go
Last synced: 9 days ago
JSON representation
Flying Goose Cloud print go language sdk
- Host: GitHub
- URL: https://github.com/houseme/feie
- Owner: houseme
- License: apache-2.0
- Created: 2023-02-12T10:20:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-25T05:05:19.000Z (7 months ago)
- Last Synced: 2024-04-25T06:24:09.953Z (7 months ago)
- Topics: cloud-print, feie, feie-cloud, feieyun, go, golang, houseme, printer, sdk, sdk-go
- Language: Go
- Homepage: https://houseme.github.io/feie/
- Size: 102 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# FeiE Printer SDK for Golang
[![Go Reference](https://pkg.go.dev/badge/github.com/houseme/feie.svg)](https://pkg.go.dev/github.com/houseme/feie)
[![FEIE-CI](https://github.com/houseme/feie/actions/workflows/go.yml/badge.svg)](https://github.com/houseme/feie/actions/workflows/go.yml)
![GitHub](https://img.shields.io/github/license/houseme/feie?style=flat-square)
![GitHub go.mod Go version (branch)](https://img.shields.io/github/go-mod/go-version/houseme/feie/main?style=flat-square)Flying Goose Cloud print go language sdk
## Installation
```bash
go get -u -v github.com/houseme/feie@main
```## Usage
```go
package mainimport (
"context"
"fmt"
"github.com/houseme/feie"
)func main() {
ctx := context.Background()
c := feie.New(ctx, feie.WithUser("xxxxx"), feie.WithUserKey("xxxxx"))
// 通过SetUserKey设置用户key 和 操作方法中user参数覆盖new方法传入的 User和UserKey
// 设置用户key
c.SetUserKey("xxxxx")
// 添加打印机
printerAddResp, err := c.OpenPrinterAddList(ctx, &feie.PrinterAddReq{
PrinterContent: "xxxxxx",
User: "xxxxx",
})
if err != nil {
panic(err)
}
fmt.Println("PrinterAddResp:", printerAddResp)
// Reset 重置 User和UserKey 前提是new方法传入的 User和UserKey不为空
c.Reset()
// 执行打印
printMsgReq, err := c.OpenPrintMsg(ctx, &feie.PrintMsgReq{
SN: "xxxxx",
Content: "xxxxx",
User: "xxxxx",
})
if err != nil {
panic(err)
}
fmt.Println("PrintMsgResp:", printMsgReq)
}```
## License
FeiE is primarily distributed under the terms of both the [Apache License (Version 2.0)](LICENSE)