Documentation
¶
Index ¶
- func AddFilePermission(ctx context.Context, config auth.Config, fileID, email, role string) error
- func AddLinkToText(ctx context.Context, config auth.Config, docID, searchText, url string) error
- func AddTable(ctx context.Context, config auth.Config, docID string, rows, columns int64) error
- func AddText(ctx context.Context, config auth.Config, docID, text string) error
- func AddTextAfterLine(ctx context.Context, config auth.Config, docID, lineContent, textToAdd string) error
- func AddTextAfterPatternInLine(ctx context.Context, config auth.Config, docID, pattern, textToAdd string) error
- func AddTextBetweenLines(ctx context.Context, config auth.Config, ...) error
- func AddTextToTableCell(ctx context.Context, config auth.Config, docID string, ...) error
- func CreateGoogleDoc(ctx context.Context, config auth.Config, title string) (*docs.Document, error)
- func ExportGoogleDocAsText(ctx context.Context, config auth.Config, fileID string) (string, error)
- func GetDocumentEndIndex(ctx context.Context, config auth.Config, docID string) (int64, error)
- func GetDocumentURL(fileID string) string
- func InsertTextWithLinkAndRender(ctx context.Context, config auth.Config, docID, text, url string, ...) error
- func MakeCopyOfGoogleDoc(ctx context.Context, config auth.Config, fileID, newTitle string) (*drive.File, error)
- func RenameGoogleDoc(ctx context.Context, config auth.Config, fileID, newTitle string) error
- func ReplaceMultipleTexts(ctx context.Context, config auth.Config, docID string, ...) error
- func ReplaceText(ctx context.Context, config auth.Config, docID, oldText, newText string) error
- func SetColorToTableCell(ctx context.Context, config auth.Config, docID string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFilePermission ¶
AddFilePermission adds permissions to a file for a specific email.
func AddLinkToText ¶
AddLinkToText adds a hyperlink to specific text in the document.
func AddTextAfterLine ¶
func AddTextAfterLine(ctx context.Context, config auth.Config, docID, lineContent, textToAdd string) error
AddTextAfterLine adds text after a known line.
func AddTextAfterPatternInLine ¶
func AddTextAfterPatternInLine(ctx context.Context, config auth.Config, docID, pattern, textToAdd string) error
AddTextAfterPatternInLine adds text after a known pattern in a line.
func AddTextBetweenLines ¶
func AddTextBetweenLines(ctx context.Context, config auth.Config, docID, startLine, endLine, textToAdd string) error
AddTextBetweenLines adds text between two known lines.
func AddTextToTableCell ¶
func AddTextToTableCell(ctx context.Context, config auth.Config, docID string, tableIndex, rowIndex, columnIndex int64, text string) error
AddTextToTableCell adds text to a specific cell in a table.
func CreateGoogleDoc ¶
CreateGoogleDoc creates a new Google Doc with the given title.
func ExportGoogleDocAsText ¶
ExportGoogleDocAsText exports a Google Doc as plain text.
func GetDocumentEndIndex ¶
GetDocumentEndIndex retrieves the index at the end of the document's body content.
func GetDocumentURL ¶
GetDocumentURL constructs the URL of a Google Doc given its file ID.
func InsertTextWithLinkAndRender ¶
func InsertTextWithLinkAndRender(ctx context.Context, config auth.Config, docID, text, url string, locationIndex int64) error
InsertTextWithLinkAndRender inserts text into a Google Doc, applies a hyperlink to it, and ensures it's rendered properly.
func MakeCopyOfGoogleDoc ¶
func MakeCopyOfGoogleDoc(ctx context.Context, config auth.Config, fileID, newTitle string) (*drive.File, error)
MakeCopyOfGoogleDoc makes a copy of an existing Google Doc.
func RenameGoogleDoc ¶
RenameGoogleDoc renames a Google Doc.
func ReplaceMultipleTexts ¶
func ReplaceMultipleTexts(ctx context.Context, config auth.Config, docID string, replacements map[string]string) error
ReplaceMultipleTexts replaces multiple strings in the Google Doc.
func ReplaceText ¶
ReplaceText replaces all occurrences of oldText with newText in the document.
Types ¶
This section is empty.