Documentation
¶
Index ¶
- Constants
- func BlocksToJSON(blocks []Block) datatypes.JSON
- type Block
- type CommentOutput
- type CreateCommentInput
- type CreateCommentOutput
- type CreateDocumentInput
- type CreateDocumentOutput
- type CreateVersionInput
- type CreateVersionOutput
- type DeleteCommentInput
- type DeleteDocumentInput
- type DeleteDocumentUserPermissionInput
- type Document
- type DocumentConfig
- type GetCommentsInput
- type GetCommentsOutput
- type GetDocumentWithSpaceInput
- type GetDocumentWithSpaceOutput
- type GetDocumentsFromSpaceInput
- type GetDocumentsFromSpaceOutput
- type GetPublicDocumentInput
- type GetPublicDocumentOutput
- type GetTrashInput
- type GetTrashOutput
- type GetVersionInput
- type GetVersionOutput
- type InlineContent
- type ListDocumentPermissionsInput
- type ListDocumentPermissionsOutput
- type ListVersionsInput
- type ListVersionsOutput
- type MoveDocumentInput
- type MoveDocumentOutput
- type ReorderDocumentsInput
- type ReorderItem
- type ResolveCommentInput
- type RestoreDocumentInput
- type RestoreVersionInput
- type SearchInput
- type SearchOutput
- type SearchResultItem
- type SetPublicInput
- type UpdateCommentInput
- type UpdateDocumentInput
- type UpdateDocumentOutput
- type UpsertDocumentUserPermissionInput
- type VersionItem
Constants ¶
View Source
const ( BlockTypeParagraph = "paragraph" BlockTypeHeading = "heading" BlockTypeBulletListItem = "bulletListItem" BlockTypeNumberedListItem = "numberedListItem" BlockTypeCheckListItem = "checkListItem" BlockTypeTable = "table" BlockTypeImage = "image" BlockTypeVideo = "video" BlockTypeAudio = "audio" BlockTypeFile = "file" BlockTypeCodeBlock = "codeBlock" BlockTypeColumn = "column" BlockTypeColumnList = "columnList" )
Types de blocs BlockNote supportés
Variables ¶
This section is empty.
Functions ¶
func BlocksToJSON ¶
BlocksToJSON convertit []Block en datatypes.JSON pour le stockage
Types ¶
type Block ¶
type Block struct {
ID string `json:"id"`
Type string `json:"type"` // paragraph, heading, bulletListItem, table, etc.
Props map[string]any `json:"props"`
Content []InlineContent `json:"content"`
Children []Block `json:"children"`
}
Block représente un bloc BlockNote
func JSONToBlocks ¶
JSONToBlocks convertit datatypes.JSON en []Block
type CommentOutput ¶
type CreateCommentInput ¶
type CreateCommentInput struct {
UserId string
DocumentId string
ParentId *string
Content string
BlockId *string
}
Create comment
type CreateCommentOutput ¶
type CreateCommentOutput struct {
CommentId string
}
type CreateDocumentInput ¶
type CreateDocumentOutput ¶
type CreateVersionInput ¶
Create version manually
type CreateVersionOutput ¶
type DeleteCommentInput ¶
Delete comment
type DeleteDocumentInput ¶
type Document ¶
type Document struct {
Id string
Name string
Slug string
ParentId *string
SpaceId string
Public bool
Content []Block
Config DocumentConfig
Metadata map[string]any
CreatedAt time.Time
UpdatedAt time.Time
}
Document représente un document dans la couche application
type DocumentConfig ¶
type DocumentConfig struct {
FullWidth bool `json:"fullWidth"`
Icon string `json:"icon"`
Lock bool `json:"lock"`
HeaderBackground string `json:"headerBackground"`
}
DocumentConfig représente la configuration d'un document
type GetCommentsInput ¶
Get comments
type GetCommentsOutput ¶
type GetCommentsOutput struct {
Comments []CommentOutput
}
type GetPublicDocumentInput ¶
type GetPublicDocumentOutput ¶
type GetTrashInput ¶
type GetTrashOutput ¶
type GetVersionOutput ¶
type InlineContent ¶
type InlineContent struct {
Type string `json:"type"` // "text", "link"
Text string `json:"text,omitempty"`
Href string `json:"href,omitempty"`
Styles map[string]bool `json:"styles"`
}
InlineContent représente le contenu inline (texte, liens, etc.)
type ListDocumentPermissionsOutput ¶
type ListDocumentPermissionsOutput struct {
Permissions []domain.Permission
}
type ListVersionsInput ¶
type ListVersionsInput struct {
UserId string
SpaceId string
DocumentId string
Limit int
Offset int
}
List versions
type ListVersionsOutput ¶
type ListVersionsOutput struct {
Versions []VersionItem
TotalCount int64
}
type MoveDocumentInput ¶
type MoveDocumentOutput ¶
type ReorderDocumentsInput ¶
type ReorderDocumentsInput struct {
UserId string
SpaceId string
Items []ReorderItem
}
type ReorderItem ¶
type ResolveCommentInput ¶
Resolve comment
type RestoreDocumentInput ¶
type RestoreVersionInput ¶
Restore version
type SearchOutput ¶
type SearchOutput struct {
Results []SearchResultItem
}
type SearchResultItem ¶
type SetPublicInput ¶
type UpdateCommentInput ¶
Update comment
type UpdateDocumentInput ¶
type UpdateDocumentOutput ¶
Click to show internal directories.
Click to hide internal directories.