snippet

package
v0.0.0-...-05fba6c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSnippetNode

func AddSnippetNode(ctx *Context, title, content string, contentType string) (*graph.Node, error)

func EditNodeBlock

func EditNodeBlock(ctx *Context, n *graph.Node, b *graph.Block, save bool) (*graph.Block, error)

func EditSnippetNode

func EditSnippetNode(ctx *Context, id string, save bool) (*graph.Node, error)

func GetSnippetNode

func GetSnippetNode(ctx *Context, id string) (*graph.Node, error)

func GetSnippetNodeWithChildren

func GetSnippetNodeWithChildren(ctx *Context, id string) (*graph.Node, error)

func GetSnippetNodes

func GetSnippetNodes(ctx *Context, limit int, kind graph.Kind) ([]graph.Node, error)

func NewStoreFromContext

func NewStoreFromContext(ctx *Context) (graph.Store, error)

func RenderSnippetNodeView

func RenderSnippetNodeView(entry *config.Entry, n *graph.Node) error

func RenderSnippetNodes

func RenderSnippetNodes(entry *config.Entry, nodes []graph.Node, kind graph.Kind) error

func SearchSnippetNodes

func SearchSnippetNodes(ctx *Context, query string, limit int, kind graph.Kind) ([]graph.Node, error)

func UpdateNodeBlock

func UpdateNodeBlock(ctx *Context, n *graph.Node, b *graph.Block) error

func UpdateNodeBlockExecution

func UpdateNodeBlockExecution(ctx *Context, n *graph.Node, b *graph.Block, e *ExecutionInfo) error

func UpdateSnippetNode

func UpdateSnippetNode(ctx *Context, n *graph.Node) error

Types

type Context

type Context struct {
	ConfigEntry *config.Entry
	Metadata    *graph.Metadata
	// contains filtered or unexported fields
}

func NewContext

func NewContext(cfg *config.Config, agent string) *Context

func (*Context) GetStore

func (c *Context) GetStore() (graph.Store, error)

func (*Context) SetStore

func (c *Context) SetStore(store graph.Store)

type ExecutionInfo

type ExecutionInfo struct {
	ExecutedAt    *time.Time
	ExecutedBy    string
	ExitStatus    string
	ExecutionInfo string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL