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

calleffect

package
v0.2.7 Latest Latest
Warning

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

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

Documentation

Overview

Package calleffect defines the closed, language-neutral vocabulary for repository-declared call effects. Language frontends resolve syntax and domain projectors remain responsible for emitting valid graph facts.

Index

Constants

View Source
const (
	RoleEvent   = "event"
	RoleHandler = "handler"
	RoleMethod  = "method"
	RoleURL     = "url"
)
View Source
const (
	PropertySource = "adapter_source"
	PropertySymbol = "adapter_symbol"
)

Variables

This section is empty.

Functions

func ValidateEffect

func ValidateEffect(effect Effect) error

Types

type Adapter

type Adapter struct {
	Language string
	Symbol   string
	Effects  []Effect
	Line     int
	Column   int
	Legacy   bool
}

type Effect

type Effect struct {
	Kind   Kind
	Roles  map[string]Selector
	Line   int
	Column int
}

type Kind

type Kind string
const (
	EventPublish        Kind = "event.publish"
	EventSubscribe      Kind = "event.subscribe"
	EventUnsubscribe    Kind = "event.unsubscribe"
	EventConnectionTest Kind = "event.connection_test"
	HTTPRequest         Kind = "http.request"
)

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func New

func New(adapters []Adapter) (Registry, error)

func (Registry) Lookup

func (r Registry) Lookup(language, symbol string) []Effect

func (Registry) SemanticKey

func (r Registry) SemanticKey() string

type Selector

type Selector struct {
	Argument int
	Line     int
	Column   int
}

Jump to

Keyboard shortcuts

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