types

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockConfig

type BlockConfig struct {
	Type     string   `yaml:"type"`
	Name     string   `yaml:"name,omitempty"`
	Settings Settings `yaml:"settings,omitempty"`

	// Ref names a reusable processor defined under Config.Processors. When set,
	// the block takes its type and base settings from that definition; any
	// Settings here override the referenced ones key-by-key. A block sets either
	// Ref or Type, not both (an inline Type equal to the referenced type is the
	// one allowed overlap).
	Ref string `yaml:"ref,omitempty"`

	// Process is the happy-path block chain of a "handle-errors" block. It is a
	// bare block list, like a flow's Process, so a handle-errors block reads as a
	// mini-flow embedded inline.
	Process []BlockConfig `yaml:"process,omitempty"`
	// Error is the error-path block chain of a "handle-errors" block: it runs when
	// the Process chain errors, with the error exposed as vars.error.
	Error []BlockConfig `yaml:"error,omitempty"`
	// Branches are the parallel flows of a "fork" block.
	Branches []FlowConfig `yaml:"branches,omitempty"`

	// Condition is the boolean expression of an "if" block.
	Condition string `yaml:"condition,omitempty"`
	// Then is the flow an "if" block runs when its condition is true.
	Then *FlowConfig `yaml:"then,omitempty"`
	// Else is the flow an "if" block runs when its condition is false (optional).
	Else *FlowConfig `yaml:"else,omitempty"`

	// Cases are the ordered, condition-guarded flows of a "switch" block.
	Cases []CaseConfig `yaml:"cases,omitempty"`
	// Default is the flow a "switch" block runs when no case matches (optional).
	Default *FlowConfig `yaml:"default,omitempty"`

	// Items is the expression a "foreach" block evaluates to the array it
	// iterates.
	Items string `yaml:"items,omitempty"`
	// As is the variable name a "foreach" block binds each element to; it
	// defaults to "item" when unset.
	As string `yaml:"as,omitempty"`
	// Mode is how a "foreach" block treats its body's results: "iterate" (the
	// default) threads the message through the body once per element, while "map"
	// collects each element's resulting body into an array that replaces the
	// message body.
	Mode string `yaml:"mode,omitempty"`
	// Body is the flow a "foreach", "cache-scope", or "enrich" block runs; foreach
	// runs it once per element, cache-scope runs it on a cache miss, enrich runs it
	// once on an isolated copy of the message.
	Body *FlowConfig `yaml:"body,omitempty"`

	// SetBody is an "enrich" block's CEL expression for the body to propagate back
	// to the message. It is evaluated against the scope's result (the message after
	// the body flow ran on an isolated clone), so it can reference the enriched
	// body/vars. Empty leaves the incoming body unchanged.
	SetBody string `yaml:"setBody,omitempty"`
	// SetVars is an "enrich" block's map of variable name to CEL expression. Each
	// expression is evaluated against the scope's result and set on the message, so
	// the block enriches exactly the variables it names.
	SetVars map[string]string `yaml:"setVars,omitempty"`

	// Key is the cache-key expression of a "cache-scope" block (evaluated per
	// message). TTL is how long a cached entry stays fresh, a duration string
	// ("5m"); empty uses the default and "0" never expires.
	Key string `yaml:"key,omitempty"`
	TTL string `yaml:"ttl,omitempty"`

	// Rules are the assertions of a "validate" block; all must evaluate true or
	// the block rejects the message.
	Rules []RuleConfig `yaml:"rules,omitempty"`
	// OnReject is the shared "filter" slot: the sub-flow a filter block (validate,
	// jwt-validate) runs when it rejects a message, before requesting the flow
	// stop. It shapes the terminal response itself. Empty uses the block's
	// built-in default response.
	OnReject *FlowConfig `yaml:"onReject,omitempty"`
	// RejectStatus is the HTTP status a filter block's built-in default response
	// uses when it rejects (and no OnReject sub-flow is set). Zero applies the
	// block's own default.
	RejectStatus int `yaml:"rejectStatus,omitempty"`

	// Connector names the LLM connector the AI composites (ai-router, ai-agent,
	// ai-retry) call through.
	Connector string `yaml:"connector,omitempty"`
	// Prompt is the routing/task/repair instruction given to the model by the AI
	// composites.
	Prompt string `yaml:"prompt,omitempty"`
	// Guardrail describes when the model should fall back to the Default path; it
	// is used by ai-router and ai-agent.
	Guardrail string `yaml:"guardrail,omitempty"`
	// Routes are the named, described branches of an "ai-router" block. The model
	// picks one; Default is the guardrail taken when it is not confident.
	Routes []RouteConfig `yaml:"routes,omitempty"`
	// Tools are the named, described branches of an "ai-agent" block, each wired
	// to the model as a callable function.
	Tools []ToolConfig `yaml:"tools,omitempty"`
	// Skills are named instruction resources an "ai-agent" can load on demand.
	// The agent is told each skill's name and description up front and is given
	// an implicit load_skill tool to pull a skill's full content (a rendered
	// template resource) into the conversation when it needs it.
	Skills []SkillConfig `yaml:"skills,omitempty"`
	// MaxIterations caps how many tool-calling turns an "ai-agent" runs before
	// falling back to the guardrail (default applied by the builder).
	MaxIterations int `yaml:"maxIterations,omitempty"`
	// MemoryThreadID enables per-thread conversation memory for an "ai-agent": a
	// CEL expression resolved to the thread id whose transcript is loaded before
	// the run and saved after. Empty disables memory.
	MemoryThreadID string `yaml:"memoryThreadId,omitempty"`
	// MemoryMaxTokens is the estimated-token budget for an "ai-agent"'s stored
	// transcript; it is compacted when it exceeds this. Default applied by the builder.
	MemoryMaxTokens int `yaml:"memoryMaxTokens,omitempty"`
	// MemoryCompaction is how an "ai-agent" shrinks memory over budget: "prune"
	// (drop oldest, the default) or "summarize" (fold the oldest turns into a summary).
	MemoryCompaction string `yaml:"memoryCompaction,omitempty"`
	// MaxAttempts caps how many times an "ai-retry" re-runs its Process chain
	// after an LLM-driven revision before falling through to Error (default
	// applied by the builder).
	MaxAttempts int `yaml:"maxAttempts,omitempty"`

	// ServerName is the MCP server name an "mcp-router" reports in its initialize
	// response; it defaults to the block name (then "octo-mcp") when unset.
	ServerName string `yaml:"serverName,omitempty"`
	// Resources are the template resources an "mcp-router" advertises as MCP
	// resources (each with its own uri) and serves on resources/read.
	Resources []MCPResourceConfig `yaml:"resources,omitempty"`
	// Prompts are the template resources an "mcp-router" advertises as MCP prompts
	// (each with named arguments) and renders on prompts/get. The "mcp-router"
	// reuses the Tools slot to expose flows as MCP tools.
	Prompts []MCPPromptConfig `yaml:"prompts,omitempty"`
}

BlockConfig describes one step in a flow. Leaf blocks use only Type, Name, and Settings. Composite kinds use explicit typed slots: a "handle-errors" populates Process and Error; a "fork" populates Branches; an "if" populates Condition/Then/Else; a "switch" populates Cases and optionally Default; a "foreach" populates Items/As/Body; an "enrich" populates Body and optionally SetBody/SetVars. The AI composites use Connector/Prompt and their own slots: an "ai-router" populates Routes (+ Default as the guardrail); an "ai-agent" populates Tools (+ Default), MaxIterations; an "ai-retry" populates Process/Error and MaxAttempts. The Flow<->Block recursion (FlowConfig.Process -> []BlockConfig -> the composite slots -> FlowConfig) lets the parser build the whole tree in one pass.

type CaseConfig

type CaseConfig struct {
	When string     `yaml:"when"`
	Flow FlowConfig `yaml:",inline"`
}

CaseConfig is one branch of a "switch" block: a boolean When expression and an inline flow (its process chain and optional name) to run when When is the first case to evaluate true.

type Config

type Config struct {
	Service ServiceConfig `yaml:"service"`
	// Env declares the environment variables this config may reference as ${NAME}
	// in settings values. Referencing an undeclared variable is an error.
	Env        []EnvVar          `yaml:"env,omitempty"`
	Connectors []ConnectorConfig `yaml:"connectors"`
	// Processors holds reusable, named processor definitions that flow blocks
	// reference by name via BlockConfig.Ref, mirroring how Connectors are
	// declared once and referenced by a flow's source.
	Processors []ProcessorConfig `yaml:"processors,omitempty"`
	Flows      []FlowConfig      `yaml:"flows,omitempty"`

	// Resources declares the external resources this config imports: the
	// .env-convention files combined into the runtime environment, and the template
	// resources aliased for reference from blocks and CEL. Declared resources are
	// loaded when the config loads, so a missing or malformed one fails at
	// deployment rather than when a message first references it.
	Resources ResourcesConfig `yaml:"resources,omitempty"`

	// ResolvedEnv holds the declared environment variables resolved to their
	// values (the same map used for ${NAME} substitution), so expressions can
	// read them as env.NAME. Populated during config load; not serialized.
	ResolvedEnv map[string]string `yaml:"-"`
}

Config is the top-level runtime configuration loaded from a config file.

type ConnectorConfig

type ConnectorConfig struct {
	Name     string   `yaml:"name"`
	Type     string   `yaml:"type"`
	Settings Settings `yaml:"settings,omitempty"`
}

ConnectorConfig describes a single connector instance and its settings.

type EnvVar

type EnvVar struct {
	Name string `yaml:"name"`
	// Default is the value used when neither the OS environment nor a .env file
	// supplies the variable. The pointer distinguishes an absent default (nil, so a
	// referenced-but-unresolved variable is an error) from an explicit empty
	// default (a value of "").
	Default *string `yaml:"default,omitempty"`
	// Required fails the load when the variable is not supplied by the OS
	// environment or a .env file.
	Required bool `yaml:"required,omitempty"`
}

EnvVar declares an environment variable the config depends on. Variables must be declared here before they can be referenced as ${NAME} in any settings value, so every external input a config relies on is documented in one place.

Resolution precedence is OS environment > .env file > Default. A variable marked Required must be supplied by the OS environment or a .env file; a Default does not satisfy it.

type FlowConfig

type FlowConfig struct {
	Name    string        `yaml:"name,omitempty"`
	Source  *SourceConfig `yaml:"source,omitempty"`
	Process []BlockConfig `yaml:"process"`
	// Error is the root flow's error path: when the Process chain returns an
	// error, the runtime exposes it as vars.error and runs this chain; on success
	// its output becomes the flow's result (recovery). It is a bare block chain,
	// like Process. Root flows only.
	Error   []BlockConfig `yaml:"error,omitempty"`
	Workers int           `yaml:"workers,omitempty"`
	Buffer  int           `yaml:"buffer,omitempty"`
	// Pool sizes the shared worker pool the root flow owns and passes down to
	// composite blocks that schedule work concurrently (e.g. a fork's branches).
	// Root flows only; defaults when unset.
	Pool int `yaml:"pool,omitempty"`
}

FlowConfig is the recursive unit of pipeline composition. The root flow, listed under Config.Flows, binds a Source and a worker-pool size; sub-flows nested inside a composite block reuse the same shape but must not set Source, Workers, Buffer, Pool, or Error (the core builder validates this).

type FlowEvent

type FlowEvent struct {
	// Kind is the lifecycle outcome this event records.
	Kind FlowEventKind
	// Flow is the name of the flow the message is travelling through.
	Flow string
	// Block is the type or name of the block where the event originated. It is
	// empty for source-level events.
	Block string
	// EventID is the Message.EventID this event concerns.
	EventID string
	// OccurredAt is when the event was published.
	OccurredAt time.Time
	// Err is set only for FlowEventFailed.
	Err error
	// Result is the message at the terminal event: the flow's output for
	// FlowEventCompleted, or the input message for FlowEventDropped and
	// FlowEventFailed. It is nil for FlowEventStarted. Subscribers must treat
	// it as read-only; it lets request/response sources return the final
	// payload to a caller correlated by EventID.
	Result *Message
}

FlowEvent is an immutable record of a single message's progress through a flow. It is pure data so any package (connectors, metrics) may consume it without depending on the core runtime.

type FlowEventKind

type FlowEventKind string

FlowEventKind enumerates the lifecycle outcomes published on the flow-event bus as a message travels through a flow.

const (
	// FlowEventStarted marks a message accepted onto a flow's pipeline.
	FlowEventStarted FlowEventKind = "started"
	// FlowEventCompleted marks a message that traversed the full block chain.
	FlowEventCompleted FlowEventKind = "completed"
	// FlowEventDropped marks a message a block intentionally filtered out.
	FlowEventDropped FlowEventKind = "dropped"
	// FlowEventFailed marks a message whose processing aborted with an error.
	FlowEventFailed FlowEventKind = "failed"
)

type MCPPromptArg

type MCPPromptArg struct {
	Name        string `yaml:"name"`
	Description string `yaml:"description,omitempty"`
	Required    bool   `yaml:"required,omitempty"`
}

MCPPromptArg describes one argument of an "mcp-router" prompt, advertised on prompts/list so clients know what to supply to prompts/get.

type MCPPromptConfig

type MCPPromptConfig struct {
	Name        string         `yaml:"name"`
	Description string         `yaml:"description,omitempty"`
	Arguments   []MCPPromptArg `yaml:"arguments,omitempty"`
	Resource    string         `yaml:"resource"`
}

MCPPromptConfig is one prompt an "mcp-router" advertises. Name is the id clients get it by; Description and Arguments are advertised metadata; Resource is the template resource whose rendered content becomes the prompt message. The prompt arguments are exposed to the template as the message body (body.<arg>).

type MCPResourceConfig

type MCPResourceConfig struct {
	URI         string `yaml:"uri"`
	Name        string `yaml:"name"`
	Description string `yaml:"description,omitempty"`
	MimeType    string `yaml:"mimeType,omitempty"`
	Resource    string `yaml:"resource"`
}

MCPResourceConfig is one resource an "mcp-router" advertises. URI is the stable id MCP clients read by; Name/Description/MimeType are advertised metadata; Resource is the template resource whose rendered content is returned.

type Message

type Message struct {
	// EventID uniquely identifies this message. It is generated at
	// construction time and is stable for the life of the message.
	EventID string `json:"event_id"`

	// CorrelationID groups related messages across a logical flow. It is
	// caller-supplied and may be empty.
	CorrelationID string `json:"correlation_id,omitempty"`

	// Variables holds arbitrary per-message values keyed by name. Use the
	// typed accessors on Variables rather than asserting types directly.
	Variables Variables `json:"variables,omitempty"`

	// Body is the decoded JSON payload. Pipeline stages may mutate it in
	// place; SetBodyJSON and BodyJSON bridge to and from wire bytes.
	Body any `json:"body,omitempty"`

	// BodySchema is the JSON Schema describing Body, stored as raw JSON.
	// Validation of Body against BodySchema lives in the core module, which
	// may depend on a schema library; types stays dependency-free.
	BodySchema json.RawMessage `json:"body_schema,omitempty"`

	// RawContent marks Body as carrying a raw, non-JSON payload in the shape
	// {contentType, rawData}. Raw-aware connectors (e.g. the http source) serve
	// rawData with the given MIME type instead of JSON-encoding Body. Defaults
	// to false; JSON remains the contract for every message that does not opt in.
	RawContent bool `json:"raw_content,omitempty"`
}

Message is the first-class unit of work flowing through the processing pipeline. The service is JSON-only by default, so Body normally holds decoded JSON (numbers are float64, objects map[string]any, arrays []any).

A message may opt out of that contract by setting RawContent: Body then holds the raw-content shape {contentType, rawData}, letting raw-aware connectors serve a typed non-JSON payload (see SetRawBody/RawBody).

func NewMessage

func NewMessage(correlationID string) (*Message, error)

NewMessage returns a Message with a freshly generated EventID and an initialized Variables map. correlationID may be empty.

func (*Message) BodyJSON

func (m *Message) BodyJSON() ([]byte, error)

BodyJSON marshals Body back to JSON bytes, for connectors writing the message out or for schema validation.

func (*Message) Clone

func (m *Message) Clone() *Message

Clone returns a copy of the message safe for concurrent use by independent branches (e.g. a fork's parallel flows). The copy gets fresh Variables and BodySchema backing storage and a deep copy of Body via a JSON round-trip, so top-level mutations on the copy do not affect the original.

Body is JSON-only by the type's contract, so the round-trip is well defined; as with SetBodyJSON it normalizes Body to decoded-JSON kinds (numbers become float64, objects map[string]any, arrays []any). Values stored inside Variables are copied shallowly, so deeply nested reference values remain shared.

RawContent is copied by the shallow struct copy, and a raw-content Body survives the round-trip intact because its rawData is a string, not raw bytes: the {contentType, rawData} map re-decodes to the same shape.

func (*Message) DecodeBody

func (m *Message) DecodeBody(target any) error

DecodeBody marshals Body and unmarshals it into target, which must be a non-nil pointer. It is the convenient path from a decoded body to a typed struct. It returns an error if Body has not been set.

func (*Message) RawBody

func (m *Message) RawBody() (contentType, rawData string, ok bool)

RawBody returns the contentType and rawData when the message is in raw-content mode and Body matches the expected shape; ok is false otherwise. Body may have been rebuilt from JSON (e.g. after Clone or a wire round-trip), so the keys are asserted defensively out of a map[string]any.

func (*Message) Rekey

func (m *Message) Rekey() (string, error)

Rekey assigns the message a freshly generated EventID, returning the new ID. It is used when a message is forwarded into another flow (e.g. by the flow-ref block) so the sub-invocation correlates on its own ID rather than colliding with the originating flow's terminal event, which keys on the original EventID.

func (*Message) Reported

func (m *Message) Reported() *Message

Reported returns a copy of the message with the runtime's internal variables removed: the shape to show a user. It is what a caller that serializes a whole message for human eyes — `octo invoke`, the CLI's debug envelope — should print.

The only such variable today is the stop flag, which a filter block sets to end the flow. It is bookkeeping between the engine and its blocks, so reporting a filtered flow's message as though it carried a variable the flow set itself would be a lie. Variables the flow really set are untouched.

func (*Message) RequestStop

func (m *Message) RequestStop()

RequestStop marks the message so the flow engine stops running further blocks once the current block returns, completing the flow with the message as-is (its configured body/status). It is the primitive behind "filter" blocks that terminate a flow and shape their own response. The flag rides in Variables, so it bubbles up through nested composite sub-flows and folds back across flow-ref boundaries automatically.

func (*Message) SetBodyJSON

func (m *Message) SetBodyJSON(raw []byte) error

SetBodyJSON decodes raw JSON into Body. Per encoding/json rules numbers become float64, objects map[string]any and arrays []any.

func (*Message) SetRawBody

func (m *Message) SetRawBody(contentType, rawData string)

SetRawBody puts the message into raw-content mode: Body becomes the shape {contentType, rawData} and RawContent is set true. rawData is a UTF-8 string written verbatim by raw-aware sinks (e.g. the http source's response writer).

func (*Message) StopRequested

func (m *Message) StopRequested() bool

StopRequested reports whether a block has called RequestStop on this message. The flow engine checks it after each block to short-circuit the chain.

type ProcessorConfig

type ProcessorConfig struct {
	Name     string   `yaml:"name"`
	Type     string   `yaml:"type"`
	Settings Settings `yaml:"settings,omitempty"`
}

ProcessorConfig is a reusable, named processor definition. Flow blocks select one by name through BlockConfig.Ref; the block's effective type is this Type and its effective settings are these Settings shallow-merged with any block-level overrides.

type ResourcesConfig

type ResourcesConfig struct {
	Env       []string           `yaml:"env,omitempty"`
	Templates []TemplateResource `yaml:"templates,omitempty"`
}

ResourcesConfig declares the external resources a config imports. Env lists the ids of .env-convention resources to combine into the runtime environment, in order (later ids overlay earlier ones). Templates declares the template resources this config uses, each optionally given a short alias for reference.

type RouteConfig

type RouteConfig struct {
	Name        string        `yaml:"name"`
	Description string        `yaml:"description"`
	Process     []BlockConfig `yaml:"process"`
}

RouteConfig is one branch of an "ai-router" block: a Name and a Description the model uses to choose, plus the Process chain to run when it is chosen. Process is a bare block list (not an inline FlowConfig) so the route's own Name does not collide with FlowConfig's name field on decode; a route never needs the other flow-level fields (source, workers, error).

type RuleConfig

type RuleConfig struct {
	Expr    string `yaml:"expr"`
	Message string `yaml:"message,omitempty"`
}

RuleConfig is one assertion of a "validate" block: a boolean CEL Expr that must hold, and the Message surfaced (in vars.validationErrors and the built-in response) when it does not.

type ServiceConfig

type ServiceConfig struct {
	Name        string `yaml:"name"`
	Environment string `yaml:"environment,omitempty"`
}

ServiceConfig describes the runtime service identity and environment.

type Settings

type Settings map[string]any

Settings is a connector- or processor-specific configuration map decoded from the YAML config. Components read it in one of two ways: project the whole map onto a typed struct with Decode (the preferred path, so each component owns its own settings shape), or read individual keys through the typed accessors, which share Variables' coercion policy.

func (Settings) Bool

func (s Settings) Bool(key string) (bool, bool)

Bool reads key as a bool.

func (Settings) Decode

func (s Settings) Decode(target any) error

Decode projects the settings onto target, a non-nil pointer to a struct, by round-tripping through JSON — the same bridge Message.DecodeBody uses. Each component declares its own settings struct with json tags matching the YAML keys, and a value of the wrong type surfaces as a decode error at startup.

func (Settings) Float

func (s Settings) Float(key string) (float64, bool)

Float reads key as a float64.

func (Settings) Int

func (s Settings) Int(key string) (int, bool)

Int reads key as an int, accepting the int, int64 and float64 forms a YAML or JSON decoder may produce.

func (Settings) String

func (s Settings) String(key string) (string, bool)

String reads key as a string. ok is false if the key is absent or not a string.

type SkillConfig

type SkillConfig struct {
	Name        string `yaml:"name"`
	Description string `yaml:"description"`
	Resource    string `yaml:"resource"`
}

SkillConfig is one skill available to an "ai-agent": a Name and Description advertised to the model up front, and Resource, the template resource whose rendered content the implicit load_skill tool returns when the model loads the skill. Skills keep the base prompt small while making deep, situational instructions available just-in-time.

type SourceConfig

type SourceConfig struct {
	// Connector is the Name of a configured connector instance, not its Type.
	Connector string   `yaml:"connector"`
	Type      string   `yaml:"type"`
	Settings  Settings `yaml:"settings,omitempty"`
}

SourceConfig binds a flow's entry point to a connector instance and a connector-specific source type.

type TemplateResource

type TemplateResource struct {
	Resource string `yaml:"resource"`
	As       string `yaml:"as,omitempty"`
}

TemplateResource declares a template resource. Resource is the resource id (a path under the config directory). As is an optional alias: when set, blocks and CEL can reference the template by the alias — e.g. templateResource("welcome") — instead of the full path; when empty the template is referenced by its resource id. Every declared template is loaded and parsed at config load, so a missing or malformed one fails at deployment rather than when a message first renders it.

type ToolConfig

type ToolConfig struct {
	Name        string        `yaml:"name"`
	Description string        `yaml:"description"`
	InputSchema string        `yaml:"inputSchema,omitempty"`
	Process     []BlockConfig `yaml:"process"`
}

ToolConfig is one branch of an "ai-agent" block, wired to the model as a callable function. Name and Description tell the model what the tool does; InputSchema is the JSON Schema for its arguments (a JSON document, written inline as a string); the Process chain runs the tool, its arguments arriving as the message body and its output body returned to the model as the result. Process is a bare block list (not an inline FlowConfig) for the same name-collision reason as RouteConfig.

type Variables

type Variables map[string]any

Variables is a named map of arbitrary per-message values. Its typed accessors apply a documented coercion policy so callers do not have to reason about whether a value was set directly in Go or decoded from JSON (where every number becomes float64).

func (Variables) Bool

func (v Variables) Bool(key string) (bool, bool)

Bool returns the value at key as a bool. ok is false if the key is absent or the value is not a bool.

func (Variables) Float

func (v Variables) Float(key string) (float64, bool)

Float returns the value at key as a float64. It accepts float64, int and int64. ok is false if the key is absent or not numeric.

func (Variables) Int

func (v Variables) Int(key string) (int, bool)

Int returns the value at key as an int. It accepts int, int64 and float64 (the latter covers JSON-decoded numbers) provided the value has no fractional part. ok is false otherwise.

func (*Variables) Set

func (v *Variables) Set(key string, value any)

Set stores value under key, allocating the map if needed.

func (Variables) String

func (v Variables) String(key string) (string, bool)

String returns the value at key as a string. ok is false if the key is absent or the value is not a string.

Jump to

Keyboard shortcuts

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