Documentation ¶
Index ¶
- Constants
- func WithUserToken(ctx context.Context, userToken string) context.Context
- type AppMeta
- type BiTable
- func (b *BiTable) AddField(ctx context.Context, appToken, table, fieldName string, fieldType int64, ...) (*Field, error)
- func (b *BiTable) CreateTable(ctx context.Context, appToken, tableName string) (string, error)
- func (b *BiTable) CreateView(ctx context.Context, appToken, table, viewName string, viewType string) (*View, error)
- func (b *BiTable) DeleteField(ctx context.Context, appToken, table, fieldID string) (bool, error)
- func (b *BiTable) DeleteRecord(ctx context.Context, appToken, table, recordID string) (bool, error)
- func (b *BiTable) DropTable(ctx context.Context, appToken, tableID string) error
- func (b *BiTable) DropView(ctx context.Context, appToken string, table string, view string) error
- func (b *BiTable) GetApp(ctx context.Context, appToken string) (*AppMeta, error)
- func (b *BiTable) GetRecord(ctx context.Context, appToken, table, recordID string) (*Record, error)
- func (b *BiTable) InsertRecords(ctx context.Context, appToken, table string, data []map[string]interface{}) ([]*Record, error)
- func (b *BiTable) ListALLTable(ctx context.Context, appToken string) (*PageList, error)
- func (b *BiTable) ListAllFields(ctx context.Context, appToken, table string) (*PageList, error)
- func (b *BiTable) ListFields(ctx context.Context, appToken, table, view, pageToken string, pageSize int64) (*PageList, error)
- func (b *BiTable) ListRecords(ctx context.Context, ...) (*PageList, error)
- func (b *BiTable) ListTable(ctx context.Context, appToken string, pageToken string, pageSize int64) (*PageList, error)
- func (b *BiTable) ListViews(ctx context.Context, appToken string, table string, pageToken string, ...) (*PageList, error)
- func (b *BiTable) UpdateField(ctx context.Context, appToken, table, fieldID, fieldName string, ...) (*Field, error)
- func (b *BiTable) UpdateRecord(ctx context.Context, appToken, table, recordID string, ...) (*Record, error)
- func (b *BiTable) UpdateRecords(ctx context.Context, appToken, table string, ...) ([]*Record, error)
- type Field
- type FieldAttachment
- type FieldOption
- type FieldPerson
- type FieldProperty
- type FieldURL
- type PageList
- type Record
- type Sheet
- type SheetBlockInfo
- type SheetMerge
- type SheetProtectedRange
- type SheetProtectedRangeDimension
- type Sheets
- type Table
- type View
Constants ¶
View Source
const (
DefaultPageSize = 50
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BiTable ¶
func NewLarkClient ¶
func (*BiTable) CreateTable ¶
func (*BiTable) CreateView ¶
func (*BiTable) DeleteField ¶
func (*BiTable) DeleteRecord ¶
func (*BiTable) InsertRecords ¶
func (*BiTable) ListALLTable ¶
func (*BiTable) ListAllFields ¶
func (*BiTable) ListFields ¶
func (*BiTable) ListRecords ¶
func (*BiTable) UpdateField ¶
func (*BiTable) UpdateRecord ¶
type Field ¶
type Field struct { FieldID string `json:"field_id,omitempty"` FieldName string `json:"field_name,omitempty"` Type int64 `json:"type,omitempty"` Property *FieldProperty `json:"property,omitempty"` }
type FieldAttachment ¶
type FieldOption ¶
type FieldPerson ¶
type FieldProperty ¶
type FieldProperty struct { Options []*FieldOption `json:"options,omitempty"` Formatter string `json:"formatter,omitempty"` DateFormat string `json:"date_format,omitempty"` TimeFormat string `json:"time_format,omitempty"` AutoFill bool `json:"auto_fill,omitempty"` Multiple bool `json:"multiple,omitempty"` TableId string `json:"table_id,omitempty"` ViewId string `json:"view_id,omitempty"` Fields []string `json:"fields,omitempty"` }
type PageList ¶
type Sheet ¶
type Sheet struct { SheetID string `json:"sheetId,omitempty"` // sheet 的 id Title string `json:"title,omitempty"` // sheet 的标题 Index int64 `json:"index,omitempty"` // sheet 的位置 RowCount int64 `json:"rowCount,omitempty"` // sheet 的最大行数 ColumnCount int64 `json:"columnCount,omitempty"` // sheet 的最大列数 FrozenRowCount int64 `json:"frozenRowCount,omitempty"` // 该 sheet 的冻结行数,小于等于 sheet 的最大行数,0表示未设置冻结 FrozenColCount int64 `json:"frozenColCount,omitempty"` // 该 sheet 的冻结列数,小于等于 sheet 的最大列数,0表示未设置冻结 Merges []*SheetMerge `json:"merges,omitempty"` // 该 sheet 中合并单元格的范围 ProtectedRange *SheetProtectedRange `json:"protectedRange,omitempty"` // 该 sheet 中保护范围 BlockInfo *SheetBlockInfo `json:"blockInfo,omitempty"` // 若含有该字段,则此工作表不为表格 }
type SheetBlockInfo ¶
type SheetBlockInfo struct { BlockToken string `json:"blockToken,omitempty"` // block的token BlockType string `json:"blockType,omitempty"` // block的类型 }
SheetBlockInfo ...
type SheetMerge ¶
type SheetMerge struct { StartRowIndex int64 `json:"startRowIndex,omitempty"` // 合并单元格范围的开始行下标,index 从 0 开始 StartColumnIndex int64 `json:"startColumnIndex,omitempty"` // 合并单元格范围的开始列下标,index 从 0 开始 RowCount int64 `json:"rowCount,omitempty"` // 合并单元格范围的行数量 ColumnCount int64 `json:"columnCount,omitempty"` // 合并单元格范围的列数量 }
SheetMerge ...
type SheetProtectedRange ¶
type SheetProtectedRange struct { Dimension *SheetProtectedRangeDimension `json:"dimension,omitempty"` // 保护行列的信息,如果为保护工作表,则该字段为空 ProtectID string `json:"protectId,omitempty"` // 保护范围ID LockInfo string `json:"lockInfo,omitempty"` // 保护说明 SheetID string `json:"sheetId,omitempty"` // 保护工作表 ID }
SheetProtectedRange ...
type SheetProtectedRangeDimension ¶
type SheetProtectedRangeDimension struct { StartIndex int64 `json:"startIndex,omitempty"` // 保护行列的起始位置,位置从1开始 EndIndex int64 `json:"endIndex,omitempty"` // 保护行列的结束位置,位置从1开始 MajorDimension string `json:"majorDimension,omitempty"` // 若为ROWS,则为保护行;为COLUMNS,则为保护列 SheetID string `json:"sheetId,omitempty"` // 保护范围所在工作表 ID }
SheetProtectedRangeDimension ...
type Sheets ¶
func NewSheetsClient ¶
Click to show internal directories.
Click to hide internal directories.