Documentation ¶
Index ¶
Constants ¶
View Source
const ( PDF Format = "pdf" ODT Format = "odt" DOCX Format = "docx" DOC Format = "doc" Linux OSArchType = "linux_x86_64" Win64 OSArchType = "win_x86_64" Win32 OSArchType = "win_x86" Darwin OSArchType = "mac_x86_64" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocumentServiceClient ¶
type DocumentServiceClient struct{ Url string }
func (*DocumentServiceClient) Compile ¶
func (ds *DocumentServiceClient) Compile(db storage.FilesIF, template Template) (resp *http.Response, err error)
Compile packs the provided files into a ZIP and sends it to the document-service to be compiled as the format you have provided. if format is empty, it will take the default one which is PDF.
func (*DocumentServiceClient) DownloadExtension ¶
func (ds *DocumentServiceClient) DownloadExtension(arch string) (resp *http.Response, err error)
Download the template assistance extension for your writer.
type OSArchType ¶
type OSArchType string
func (OSArchType) String ¶
func (f OSArchType) String() string
type Template ¶
type Template struct { Format Format //the result format, default PDF Data interface{} //the data the template is going to resolved with TemplatePath string //odt template Assets []string //assets that are referenced in Data and you want to include into the ZIP EmbedError bool //print compilation error in the document }
Click to show internal directories.
Click to hide internal directories.