Help us shape the future of Go! Take the 2026 Go Developer Survey

dsl

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package dsl contains OPS's compatibility parser for older action-oriented route manifests. New .nflow pipeline declarations are parsed through Flow's exported compiler preprocessing API instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyConfigLine

func ApplyConfigLine(cfg *Config, line string)

Types

type Config

type Config struct {
	Strict bool
	Silent map[string]bool
}

type Modifiers

type Modifiers struct {
	CustomName        string
	Path              string
	Method            string
	Transports        []TransportBinding
	Description       string
	Scope             string
	ReqType           string
	ResType           string
	Timeout           time.Duration
	CacheTTL          time.Duration
	RetryMax          int
	Idempotent        bool
	Roles             []string
	Permissions       []string
	Features          []string
	Tags              []string
	RequiresAuth      bool
	SuccessStatus     int
	BudgetMicros      int64
	RateLimit         string
	RateLimitBurst    int
	ConcurrencyLimit  int32
	BreakerFailures   int
	BreakerCooldown   time.Duration
	HITLPrompt        string
	HITLOptions       []string
	HITLTriggers      []string
	BackoffStrategy   string
	BackoffBase       time.Duration
	BackoffMax        time.Duration
	RetryPredicate    string
	Priority          string
	CacheKey          string
	Audit             bool
	IdempotencyHeader string
	Deprecated        bool
	DeprecatedSince   string
	DeprecatedUse     string
}

type ParsedLine

type ParsedLine struct {
	RawName     string
	HeadAtom    string
	IsComposite bool
	Modifiers   Modifiers
}

func ParseLine

func ParseLine(input string) (ParsedLine, bool)

ParseLine parses the legacy `action.name:route="POST /path":flag` form. It intentionally does not parse modern @pipeline blocks; those are handled by Flow's preprocessor in the parent analyzer package.

type TransportBinding

type TransportBinding struct {
	Kind       string            `json:"kind"`
	Protocol   string            `json:"protocol,omitempty"`
	Target     string            `json:"target"`
	Method     string            `json:"method,omitempty"`
	Path       string            `json:"path,omitempty"`
	Subject    string            `json:"subject,omitempty"`
	Schedule   string            `json:"schedule,omitempty"`
	QueueGroup string            `json:"queue_group,omitempty"`
	Interval   time.Duration     `json:"interval,omitempty"`
	Stream     bool              `json:"stream,omitempty"`
	Raw        bool              `json:"raw,omitempty"`
	Meta       map[string]string `json:"meta,omitempty"`
	Aliases    []string          `json:"aliases,omitempty"`
}

Jump to

Keyboard shortcuts

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