Documentation
¶
Index ¶
- type AvailableTypesResponse
- type BulkDeleteRowsRequest
- type CreateDatabaseRequest
- type CreateDatabaseResponse
- type CreateRowRequest
- type CreateRowResponse
- type CreateViewRequest
- type CreateViewResponse
- type DatabaseItem
- type DatabasePermissionItem
- type DeleteDatabasePermissionRequest
- type DeleteDatabasePermissionResponse
- type DeleteDatabaseRequest
- type DeleteRowRequest
- type DeleteViewRequest
- type EmptyRequest
- type FilterConfig
- type FilterRule
- type GetDatabaseRequest
- type GetDatabaseResponse
- type GetRowRequest
- type GetRowResponse
- type ListDatabasePermissionsRequest
- type ListDatabasePermissionsResponse
- type ListDatabasesRequest
- type ListDatabasesResponse
- type ListRowsRequest
- type ListRowsResponse
- type MessageResponse
- type MoveDatabaseRequest
- type MoveDatabaseResponse
- type PropertySchema
- type RowItem
- type SearchDatabaseResultItem
- type SearchDatabasesRequest
- type SearchDatabasesResponse
- type SortConfig
- type TypeInfo
- type UpdateDatabaseRequest
- type UpdateRowRequest
- type UpdateViewRequest
- type UpsertDatabasePermissionRequest
- type UpsertDatabasePermissionResponse
- type UserInfo
- type ViewConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailableTypesResponse ¶
type AvailableTypesResponse struct {
Types []TypeInfo `json:"types"`
}
Available property types
type BulkDeleteRowsRequest ¶
type CreateDatabaseRequest ¶
type CreateDatabaseRequest struct {
SpaceId string `json:"space_id"`
DocumentId *string `json:"document_id,omitempty"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Icon string `json:"icon,omitempty"`
Schema []PropertySchema `json:"schema"`
Type string `json:"type,omitempty"` // "spreadsheet" or "document", defaults to "spreadsheet"
}
type CreateDatabaseResponse ¶
type CreateRowRequest ¶
type CreateRowRequest struct {
DatabaseId string `path:"database_id"`
Properties map[string]interface{} `json:"properties"`
Content map[string]interface{} `json:"content,omitempty"`
ShowInSidebar bool `json:"show_in_sidebar,omitempty"`
}
Row requests
type CreateRowResponse ¶
type CreateViewRequest ¶
type CreateViewRequest struct {
DatabaseId string `path:"database_id"`
Name string `json:"name" validate:"required"`
Type string `json:"type" validate:"required,oneof=table board calendar gallery list timeline"`
Filter map[string]interface{} `json:"filter,omitempty"`
Sort []SortConfig `json:"sort,omitempty"`
Columns []string `json:"columns,omitempty"`
}
View requests
type CreateViewResponse ¶
type CreateViewResponse struct {
Id string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Filter map[string]interface{} `json:"filter,omitempty"`
Sort []SortConfig `json:"sort,omitempty"`
Columns []string `json:"columns,omitempty"`
}
View responses
type DatabaseItem ¶
type DatabaseItem struct {
Id string `json:"id"`
DocumentId *string `json:"document_id,omitempty"`
Name string `json:"name"`
Description string `json:"description"`
Icon string `json:"icon"`
Type string `json:"type"`
RowCount int64 `json:"row_count"`
CreatedBy string `json:"created_by"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type DatabasePermissionItem ¶
type DatabasePermissionItem struct {
Id string `json:"id"`
UserId *string `json:"user_id,omitempty"`
Username *string `json:"username,omitempty"`
GroupId *string `json:"group_id,omitempty"`
GroupName *string `json:"group_name,omitempty"`
Role string `json:"role"`
}
Permission item
type DeleteDatabasePermissionRequest ¶
type DeleteDatabasePermissionRequest struct {
DatabaseId string `path:"database_id"`
UserId *string `query:"user_id"`
GroupId *string `query:"group_id"`
}
Delete permission request
type DeleteDatabasePermissionResponse ¶
type DeleteDatabasePermissionResponse struct {
Success bool `json:"success"`
}
type DeleteDatabaseRequest ¶
type DeleteDatabaseRequest struct {
DatabaseId string `path:"database_id"`
}
type DeleteRowRequest ¶
type DeleteViewRequest ¶
type EmptyRequest ¶
type EmptyRequest struct{}
type FilterConfig ¶
type FilterConfig struct {
And []FilterRule `json:"and,omitempty"`
Or []FilterRule `json:"or,omitempty"`
}
type FilterRule ¶
type FilterRule struct {
Property string `json:"property"`
Condition string `json:"condition"` // eq, neq, gt, lt, gte, lte, contains, is_empty, is_not_empty
Value interface{} `json:"value,omitempty"`
}
Filter rule for querying rows
type GetDatabaseRequest ¶
type GetDatabaseRequest struct {
DatabaseId string `path:"database_id"`
}
type GetDatabaseResponse ¶
type GetDatabaseResponse struct {
Id string `json:"id"`
SpaceId string `json:"space_id"`
DocumentId *string `json:"document_id,omitempty"`
Name string `json:"name"`
Description string `json:"description"`
Icon string `json:"icon"`
Schema []PropertySchema `json:"schema"`
Views []ViewConfig `json:"views"`
DefaultView string `json:"default_view"`
Type string `json:"type"`
CreatedBy string `json:"created_by"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type GetRowRequest ¶
type GetRowResponse ¶
type GetRowResponse struct {
Id string `json:"id"`
DatabaseId string `json:"database_id"`
Properties map[string]interface{} `json:"properties"`
Content map[string]interface{} `json:"content,omitempty"`
ShowInSidebar bool `json:"show_in_sidebar"`
CreatedBy string `json:"created_by"`
CreatedByUser *UserInfo `json:"created_by_user,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByUser *UserInfo `json:"updated_by_user,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type ListDatabasePermissionsRequest ¶
type ListDatabasePermissionsRequest struct {
DatabaseId string `path:"database_id"`
}
List permissions request/response
type ListDatabasePermissionsResponse ¶
type ListDatabasePermissionsResponse struct {
Permissions []DatabasePermissionItem `json:"permissions"`
}
type ListDatabasesRequest ¶
type ListDatabasesRequest struct {
SpaceId string `query:"space_id"`
}
type ListDatabasesResponse ¶
type ListDatabasesResponse struct {
Databases []DatabaseItem `json:"databases"`
}
type ListRowsRequest ¶
type ListRowsResponse ¶
type MessageResponse ¶
type MessageResponse struct {
Message string `json:"message"`
}
type MoveDatabaseRequest ¶
type MoveDatabaseRequest struct {
DatabaseId string `path:"database_id"`
DocumentId *string `json:"document_id"`
}
Move database
type MoveDatabaseResponse ¶
type PropertySchema ¶
type RowItem ¶
type RowItem struct {
Id string `json:"id"`
Properties map[string]interface{} `json:"properties"`
Content map[string]interface{} `json:"content,omitempty"`
ShowInSidebar bool `json:"show_in_sidebar"`
CreatedBy string `json:"created_by"`
CreatedByUser *UserInfo `json:"created_by_user,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByUser *UserInfo `json:"updated_by_user,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type SearchDatabaseResultItem ¶
type SearchDatabaseResultItem struct {
Id string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Icon string `json:"icon,omitempty"`
Type string `json:"type"`
SpaceId string `json:"space_id"`
SpaceName string `json:"space_name"`
UpdatedAt time.Time `json:"updated_at"`
}
type SearchDatabasesRequest ¶
type SearchDatabasesRequest struct {
Query string `query:"q"`
SpaceId *string `query:"space_id"`
Limit int `query:"limit"`
}
Search
type SearchDatabasesResponse ¶
type SearchDatabasesResponse struct {
Results []SearchDatabaseResultItem `json:"results"`
}
type SortConfig ¶
type UpdateDatabaseRequest ¶
type UpdateDatabaseRequest struct {
DatabaseId string `path:"database_id"`
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
Icon *string `json:"icon,omitempty"`
Schema *[]PropertySchema `json:"schema,omitempty"`
DefaultView *string `json:"default_view,omitempty"`
}
type UpdateRowRequest ¶
type UpdateViewRequest ¶
type UpdateViewRequest struct {
DatabaseId string `path:"database_id"`
ViewId string `path:"view_id"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Filter map[string]interface{} `json:"filter,omitempty"`
Sort []SortConfig `json:"sort,omitempty"`
Columns []string `json:"columns,omitempty"`
HiddenColumns []string `json:"hidden_columns,omitempty"`
GroupBy *string `json:"group_by,omitempty"`
}
type UpsertDatabasePermissionRequest ¶
type UpsertDatabasePermissionRequest struct {
DatabaseId string `path:"database_id"`
UserId *string `json:"user_id,omitempty"`
GroupId *string `json:"group_id,omitempty"`
Role string `json:"role"`
}
Upsert permission request
type UpsertDatabasePermissionResponse ¶
type UpsertDatabasePermissionResponse struct {
Success bool `json:"success"`
}
type UserInfo ¶
type UserInfo struct {
Id string `json:"id"`
Username string `json:"username"`
AvatarUrl string `json:"avatar_url,omitempty"`
}
UserInfo contains basic user information for display
type ViewConfig ¶
type ViewConfig struct {
Id string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Filter map[string]interface{} `json:"filter,omitempty"`
Sort []SortConfig `json:"sort,omitempty"`
Columns []string `json:"columns,omitempty"`
HiddenColumns []string `json:"hidden_columns,omitempty"`
GroupBy string `json:"group_by,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.