docx

package
v0.0.0-...-86b787e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Docx

type Docx struct {
	// contains filtered or unexported fields
}

func (*Docx) Replace

func (d *Docx) Replace(oldString string, newString string, num int) (err error)

func (*Docx) ReplaceCoreRaw

func (d *Docx) ReplaceCoreRaw(oldString string, newString string)

func (*Docx) ReplaceFooter

func (d *Docx) ReplaceFooter(oldString string, newString string) (err error)

func (*Docx) ReplaceFooterRaw

func (d *Docx) ReplaceFooterRaw(oldString string, newString string) (err error)

func (*Docx) ReplaceHeader

func (d *Docx) ReplaceHeader(oldString string, newString string) (err error)
func (d *Docx) ReplaceLink(oldString string, newString string, num int) (err error)

func (*Docx) ReplaceRaw

func (d *Docx) ReplaceRaw(oldString string, newString string, num int)

func (*Docx) Write

func (d *Docx) Write(ioWriter io.Writer) (err error)

func (*Docx) WriteToFile

func (d *Docx) WriteToFile(path string) (err error)

func (*Docx) WriteToTmpFile

func (d *Docx) WriteToTmpFile() (s string, err error)

type DocxContext

type DocxContext struct {
	ID        int64 `storm:"index,unique`
	Key       string
	Url       string
	FileBytes []byte
}

func BuildDocx

func BuildDocx(baseurl string, b []byte) (*DocxContext, error)

d.ReplaceFooterRaw("HONEYDROP_TOKEN_URL", "http://localhost:3000/blah.png")

type ReplaceDocx

type ReplaceDocx struct {
	// contains filtered or unexported fields
}

func ReadDocx

func ReadDocx(reader ZipData) (*ReplaceDocx, error)

func ReadDocxFile

func ReadDocxFile(path string) (*ReplaceDocx, error)

func ReadDocxFromMemory

func ReadDocxFromMemory(data io.ReaderAt, size int64) (*ReplaceDocx, error)

func (*ReplaceDocx) Close

func (r *ReplaceDocx) Close() error

func (*ReplaceDocx) Editable

func (r *ReplaceDocx) Editable() *Docx

type ZipData

type ZipData interface {
	// contains filtered or unexported methods
}

Contains functions to work with data from a zip file

type ZipFile

type ZipFile struct {
	// contains filtered or unexported fields
}

Type for zip files read from disk

type ZipInMemory

type ZipInMemory struct {
	// contains filtered or unexported fields
}

Type for in memory zip files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL