Documentation ¶
Index ¶
Constants ¶
View Source
const (
KeepAliveTimeout = 30 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { ID string `json:"id,omitempty"` CreatedAt *time.Time `json:"created_at"` Content string `json:"content"` ContentType *executor.ContentType `json:"content_type"` MD5 string `json:"md5"` LastExecutedAt *time.Time `json:"last_executed_at,omitempty"` LastExecutedBy string `json:"last_executed_by,omitempty"` LastExitStatus string `json:"last_exit_status,omitempty"` LastExecutionInfo string `json:"last_execution_info,omitempty"` }
type ErrorResponse ¶
type Metadata ¶
type Metadata struct { SourceTitle string `json:"source_title"` SourceURI string `json:"source_uri"` Agent string `json:"Agent"` }
func NewMetadata ¶
type Node ¶
type Node struct { ID string `json:"id,omitempty"` CreatedAt *time.Time `json:"created_at"` OccurredAt *time.Time `json:"occurred_at,omitempty"` DeletedAt *time.Time `json:"deleted_at,omitempty"` Kind Kind `json:"kind"` Metadata Metadata `json:"metadata"` Title string `json:"title,omitempty"` Markdown string `json:"markdown,omitempty"` View string `json:"view"` Blocks []*Block `json:"blocks,omitempty"` Children string `json:"children,omitempty"` LastExecutedAt *time.Time `json:"last_executed_at"` LastExecutedBy string `json:"last_executed_by"` // ChildNodes is the actual reference to the node(s) // Note: currently, this relation is not persisted in the remote store // so skip this from json encoding.. ChildNodes []*Node `json:"-"` }
func NewNodeFromBlocks ¶
func (*Node) GetChildIDs ¶
func (*Node) HasChildren ¶
type Store ¶
type Store interface { // ExtractID parses the input string to // extract the ID understood by the store ExtractID(string) (string, error) // GetNodes returns the most recent n entries GetNodes(limit int, kind Kind) ([]Node, error) // GetNode returns the Node associated with this id GetNode(id string) (*Node, error) // AddNode adds a new node to this store AddNode(*Node) (*Node, error) // SearchNodes searches for nodes for provided query SearchNodes(query string, limit int, kind Kind) ([]Node, error) // GetChildren returns the children nodes of the parent node with this id GetChildren(parentID string) ([]Node, error) // UpdateNode updates the content of an existing node UpdateNode(node *Node) error // UpdateNodeBlock updates the block of an existing node at the server UpdateNodeBlock(node *Node, block *Block) error // UpdateNodeBlockExecution updates the block's execution info UpdateNodeBlockExecution(node *Node, block *Block) error }
Click to show internal directories.
Click to hide internal directories.