Documentation
¶
Overview ¶
Package docs is the Docs v1 JSON the vfs adapter reads and writes.
Index ¶
- type BatchUpdateDocumentRequest
- type BatchUpdateDocumentResponse
- type Body
- type Bullet
- type CreateParagraphBulletsRequest
- type DeleteContentRangeRequest
- type Document
- type DocumentTab
- type EmbeddedObject
- type ImageProperties
- type InlineObject
- type InlineObjectElement
- type InlineObjectProperties
- type InsertTableRequest
- type InsertTextRequest
- type Link
- type List
- type ListProperties
- type Location
- type NestingLevel
- type Paragraph
- type ParagraphElement
- type ParagraphStyle
- type Range
- type Request
- type SectionBreak
- type StructuralElement
- type Tab
- type TabProperties
- type Table
- type TableCell
- type TableOfContents
- type TableRow
- type TextRun
- type TextStyle
- type UpdateParagraphStyleRequest
- type UpdateTextStyleRequest
- type WriteControl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchUpdateDocumentRequest ¶
type BatchUpdateDocumentRequest struct {
Requests []*Request `json:"requests,omitempty"`
WriteControl *WriteControl `json:"writeControl,omitempty"`
}
BatchUpdateDocumentRequest is documents.batchUpdate.
type BatchUpdateDocumentResponse ¶
type BatchUpdateDocumentResponse struct {
WriteControl *WriteControl `json:"writeControl,omitempty"`
}
BatchUpdateDocumentResponse is the reply to documents.batchUpdate.
type Body ¶
type Body struct {
Content []*StructuralElement `json:"content,omitempty"`
}
Body is a tab's structural elements.
type Bullet ¶
type Bullet struct {
ListID string `json:"listId,omitempty"`
NestingLevel int64 `json:"nestingLevel,omitempty"`
}
Bullet puts a paragraph in a list.
type CreateParagraphBulletsRequest ¶
type CreateParagraphBulletsRequest struct {
Range *Range `json:"range,omitempty"`
BulletPreset string `json:"bulletPreset,omitempty"`
}
CreateParagraphBulletsRequest makes paragraphs a list.
type DeleteContentRangeRequest ¶
type DeleteContentRangeRequest struct {
Range *Range `json:"range,omitempty"`
}
DeleteContentRangeRequest deletes a range.
type Document ¶
type Document struct {
DocumentID string `json:"documentId,omitempty"`
RevisionID string `json:"revisionId,omitempty"`
Title string `json:"title,omitempty"`
Body *Body `json:"body,omitempty"`
Lists map[string]List `json:"lists,omitempty"`
InlineObjects map[string]InlineObject `json:"inlineObjects,omitempty"`
Tabs []*Tab `json:"tabs,omitempty"`
}
Document is documents.get with includeTabsContent: the tabs, or (a document read without tabs) the one body.
type DocumentTab ¶
type DocumentTab struct {
Body *Body `json:"body,omitempty"`
Lists map[string]List `json:"lists,omitempty"`
InlineObjects map[string]InlineObject `json:"inlineObjects,omitempty"`
}
DocumentTab is a tab's content.
type EmbeddedObject ¶
type EmbeddedObject struct {
Title string `json:"title,omitempty"`
ImageProperties *ImageProperties `json:"imageProperties,omitempty"`
}
EmbeddedObject is an embedded image.
type ImageProperties ¶
type ImageProperties struct {
ContentURI string `json:"contentUri,omitempty"`
}
ImageProperties locates an image.
type InlineObject ¶
type InlineObject struct {
InlineObjectProperties *InlineObjectProperties `json:"inlineObjectProperties,omitempty"`
}
InlineObject is an object a paragraph embeds.
type InlineObjectElement ¶
type InlineObjectElement struct {
InlineObjectID string `json:"inlineObjectId,omitempty"`
}
InlineObjectElement places an inline object.
type InlineObjectProperties ¶
type InlineObjectProperties struct {
EmbeddedObject *EmbeddedObject `json:"embeddedObject,omitempty"`
}
InlineObjectProperties holds the embedded object.
type InsertTableRequest ¶
type InsertTableRequest struct {
Location *Location `json:"location,omitempty"`
Rows int64 `json:"rows,omitempty"`
Columns int64 `json:"columns,omitempty"`
}
InsertTableRequest inserts an empty table.
type InsertTextRequest ¶
type InsertTextRequest struct {
Location *Location `json:"location,omitempty"`
Text string `json:"text,omitempty"`
}
InsertTextRequest inserts text.
type List ¶
type List struct {
ListProperties *ListProperties `json:"listProperties,omitempty"`
}
List is a list's properties.
type ListProperties ¶
type ListProperties struct {
NestingLevels []*NestingLevel `json:"nestingLevels,omitempty"`
}
ListProperties is a list's levels.
type NestingLevel ¶
type NestingLevel struct {
GlyphType string `json:"glyphType,omitempty"`
}
NestingLevel is one list level.
type Paragraph ¶
type Paragraph struct {
Elements []*ParagraphElement `json:"elements,omitempty"`
ParagraphStyle *ParagraphStyle `json:"paragraphStyle,omitempty"`
Bullet *Bullet `json:"bullet,omitempty"`
}
Paragraph is a paragraph's runs and style.
type ParagraphElement ¶
type ParagraphElement struct {
StartIndex int64 `json:"startIndex,omitempty"`
EndIndex int64 `json:"endIndex,omitempty"`
TextRun *TextRun `json:"textRun,omitempty"`
InlineObjectElement *InlineObjectElement `json:"inlineObjectElement,omitempty"`
}
ParagraphElement is a text run or an inline object.
type ParagraphStyle ¶
type ParagraphStyle struct {
NamedStyleType string `json:"namedStyleType,omitempty"`
}
ParagraphStyle is a paragraph's named style.
type Range ¶
type Range struct {
StartIndex int64 `json:"startIndex,omitempty"`
EndIndex int64 `json:"endIndex,omitempty"`
TabID string `json:"tabId,omitempty"`
}
Range is a span of a tab.
type Request ¶
type Request struct {
DeleteContentRange *DeleteContentRangeRequest `json:"deleteContentRange,omitempty"`
InsertText *InsertTextRequest `json:"insertText,omitempty"`
UpdateParagraphStyle *UpdateParagraphStyleRequest `json:"updateParagraphStyle,omitempty"`
CreateParagraphBullets *CreateParagraphBulletsRequest `json:"createParagraphBullets,omitempty"`
InsertTable *InsertTableRequest `json:"insertTable,omitempty"`
UpdateTextStyle *UpdateTextStyleRequest `json:"updateTextStyle,omitempty"`
}
Request is one batchUpdate edit; one field is set.
type SectionBreak ¶
type SectionBreak struct{}
SectionBreak marks a section break; the adapter reads only its span.
type StructuralElement ¶
type StructuralElement struct {
StartIndex int64 `json:"startIndex,omitempty"`
EndIndex int64 `json:"endIndex,omitempty"`
Paragraph *Paragraph `json:"paragraph,omitempty"`
SectionBreak *SectionBreak `json:"sectionBreak,omitempty"`
TableOfContents *TableOfContents `json:"tableOfContents,omitempty"`
Table *Table `json:"table,omitempty"`
}
StructuralElement is one paragraph, table, section break or table of contents.
type Tab ¶
type Tab struct {
TabProperties *TabProperties `json:"tabProperties,omitempty"`
DocumentTab *DocumentTab `json:"documentTab,omitempty"`
ChildTabs []*Tab `json:"childTabs,omitempty"`
}
Tab is one document tab and its child tabs.
type TabProperties ¶
type TabProperties struct {
TabID string `json:"tabId,omitempty"`
Title string `json:"title,omitempty"`
Index int64 `json:"index,omitempty"`
}
TabProperties names a tab.
type Table ¶
type Table struct {
TableRows []*TableRow `json:"tableRows,omitempty"`
}
Table is a table's rows.
type TableCell ¶
type TableCell struct {
StartIndex int64 `json:"startIndex,omitempty"`
EndIndex int64 `json:"endIndex,omitempty"`
Content []*StructuralElement `json:"content,omitempty"`
}
TableCell is a cell's content.
type TableOfContents ¶
type TableOfContents struct{}
TableOfContents marks a table of contents; the adapter reads only its span.
type TableRow ¶
type TableRow struct {
TableCells []*TableCell `json:"tableCells,omitempty"`
}
TableRow is a row's cells.
type TextRun ¶
type TextRun struct {
Content string `json:"content,omitempty"`
TextStyle *TextStyle `json:"textStyle,omitempty"`
}
TextRun is styled text.
type TextStyle ¶
type TextStyle struct {
Bold bool `json:"bold"`
Italic bool `json:"italic"`
Strikethrough bool `json:"strikethrough"`
Link *Link `json:"link"`
}
TextStyle is the run style the adapter reads and sets. Every field is sent, so an update with these fields clears the ones that are off.
type UpdateParagraphStyleRequest ¶
type UpdateParagraphStyleRequest struct {
Range *Range `json:"range,omitempty"`
ParagraphStyle *ParagraphStyle `json:"paragraphStyle,omitempty"`
Fields string `json:"fields,omitempty"`
}
UpdateParagraphStyleRequest sets the Fields of a paragraph style.
type UpdateTextStyleRequest ¶
type UpdateTextStyleRequest struct {
Range *Range `json:"range,omitempty"`
TextStyle *TextStyle `json:"textStyle,omitempty"`
Fields string `json:"fields,omitempty"`
}
UpdateTextStyleRequest sets the Fields of a text style.
type WriteControl ¶
type WriteControl struct {
RequiredRevisionID string `json:"requiredRevisionId,omitempty"`
}
WriteControl pins the revision a batch applies to.