A headless libreoffice instance wrapped in GRPC.
This would be used when you need to quickly convert document types. For example a Microsoft Word Document to a PDF.
Libreoffice Headless: https://help.libreoffice.org/latest/he/text/shared/guide/start_parameters.html
GRPC: https://pkg.go.dev/google.golang.org/grpc
This can largely change based on your configuration, so keep that in mind.
In order to make modifications or expand the API you must use the protoc tool to generate the protobuf files without having to write them yourself. Run the command below to re-generate these files:
protoc proto/service.proto --go_out=proto/ --go_opt=paths=source_relative --proto_path=proto/ --go-grpc_out=proto/ --go-grpc_opt=paths=source_relative
Then copy those generated files to proto/gobre and your client.
go run .
docker compose watch
Build and deploy to your cluster based on your configuration.
- Once the docker is running find the ip address
- Make a GPRC request like
<ip address>:8081
as the server andGobre/HandleRequest
as the handler. - Have a message formatted like
{
"FileData": "raw file data",
"NewFileType": "pdf",
"OriginalFileType": "docx"
}
- Make GRPC call.
*Note you can use reflection on your client to get the avaiable service definitions and data structures.
go test -v -cover ./... -coverprofile test_data/cover.out
go tool cover -html test_data/cover.out -o test_data/cover.html
Please make an issue with a detailed description of your feature or problem.