Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONString ¶
JSONString returns json.Marshal(x) as a string. If json.Marshal returns an error, jsonString returns the error text as a JSON string beginning "ERROR:".
func ReadJSONFile ¶
ReadJSONFile JSON-decodes the contents of filename into pvalue, which must be a pointer.
func WriteJSONFile ¶
WriteJSONFile writes value to filename as JSON.
Types ¶
type ContextKey ¶
type ContextKey[T any] struct { // contains filtered or unexported fields }
A ContextKey is a unique, typed key for a value stored in a context.
func NewContextKey ¶
func NewContextKey[T any]() ContextKey[T]
NewContextKey returns a context key for a value of type T.
func (ContextKey[T]) FromContext ¶
func (k ContextKey[T]) FromContext(ctx context.Context) T
FromContext returns the value associated with this key in the context, or the internal.Zero value for T if the key is not present.
func (ContextKey[T]) NewContext ¶
func (k ContextKey[T]) NewContext(ctx context.Context, value T) context.Context
NewContext returns ctx augmented with this key and the given value.
Directories
¶
Path | Synopsis |
---|---|
Package atype provides types for Genkit actions.
|
Package atype provides types for Genkit actions. |
cmd
|
|
jsonschemagen
A simple, self-contained code generator for JSON Schema.
|
A simple, self-contained code generator for JSON Schema. |
weave
The weave command is a simple preprocessor for markdown files.
|
The weave command is a simple preprocessor for markdown files. |
Package snippets contains snippets that are incorporated into documentation (see the docs-go directory under the repo root).
|
Package snippets contains snippets that are incorporated into documentation (see the docs-go directory under the repo root). |
init
!+main
|
!+main |
Package fakeembedder provides a fake implementation of genkit.Embedder for testing purposes.
|
Package fakeembedder provides a fake implementation of genkit.Embedder for testing purposes. |
Click to show internal directories.
Click to hide internal directories.