docs

package
v1.2.98 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Overview

Package docs реализация вохможности работы с вордовскими документами

Index

Constants

View Source
const ClientID = "165049723351-mgcbnem17vt14plfhtbfdcerc1ona2p7.apps.googleusercontent.com"

Variables

This section is empty.

Functions

func RenderReplaesDoc

func RenderReplaesDoc(ctx *fasthttp.RequestCtx, templatesName string, replaces map[string]string) error

RenderReplaesDoc read file with name {templatesName}, replace string from map & write to {w}

func ReplaceDocx

func ReplaceDocx(input, output string, replaces map[string]string) bool

ReplaceDocx replaces exist output an input in map

Types

type Docx

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

Docx struct that contains data from a docs

func (*Docx) Close

func (d *Docx) Close() error

Close the document

func (*Docx) GetContent

func (d *Docx) GetContent() string

GetContent returns the string content

func (*Docx) ReadFile

func (d *Docx) ReadFile(path string) error

ReadFile func reads a docs file

func (*Docx) UpdateContent

func (d *Docx) UpdateContent(newContent string)

UpdateContent updates the content string

func (*Docx) WriteToFile

func (d *Docx) WriteToFile(path string, data string) error

WriteToFile writes the changes to a new file

type SheetsGoogleDocs

type SheetsGoogleDocs struct {
	Service *sheets.Service
}

func (*SheetsGoogleDocs) Init

func (sheet *SheetsGoogleDocs) Init() (err error)

func (*SheetsGoogleDocs) Read

func (sheet *SheetsGoogleDocs) Read(spreadsheetId, readRange string) (*sheets.ValueRange, error)

func (*SheetsGoogleDocs) Sheets

func (sheet *SheetsGoogleDocs) Sheets(spreadsheetId, readRange string) (*sheets.ValueRange, error)

Jump to

Keyboard shortcuts

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