dev

package
v1.26.15 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const ManifestFilename = "manifest.yaml"
View Source
const RPCURLEnvName = "STORYDEN_RPC_URL"

Variables

This section is empty.

Functions

func CleanDoc

func CleanDoc(s string) string

func CommandFromManifest

func CommandFromManifest(manifest rpc.Manifest, override []string) (string, []string, error)

func CycleToken

func CycleToken(ctx context.Context, client *openapi.ClientWithResponses, id string) (string, error)

func DefaultAuthor

func DefaultAuthor() string

func DefaultPackagePath

func DefaultPackagePath(dir string, manifest rpc.Manifest) string

func DeletePlugin

func DeletePlugin(ctx context.Context, client *openapi.ClientWithResponses, id string) error

func DownloadPackage

func DownloadPackage(ctx context.Context, client *openapi.ClientWithResponses, id string, progress DownloadProgress) ([]byte, error)

func ExternalRPCURL

func ExternalRPCURL(endpoint string, token string) (string, error)

func FirstPlainSearchTerm

func FirstPlainSearchTerm(query string) string

func GetPlugin

func GetPlugin(ctx context.Context, client *openapi.ClientWithResponses, id string) (*openapi.Plugin, error)

func InstallSupervisedPackage

func InstallSupervisedPackage(ctx context.Context, client *openapi.ClientWithResponses, pkg *PackageArchive) (*openapi.Plugin, bool, error)

func LastPlainSearchTerm

func LastPlainSearchTerm(query string) string

func ListPlugins

func ListPlugins(ctx context.Context, client *openapi.ClientWithResponses) ([]openapi.Plugin, error)

func LoadGoPackage

func LoadGoPackage(ctx context.Context, dir string, importPath string) (*packages.Package, error)

func LoadGoPackages

func LoadGoPackages(ctx context.Context, dir string, pattern string, includeDeps bool) ([]*packages.Package, error)

func PackageDocs

func PackageDocs(pkg *packages.Package) map[string]string

func PackageFilename

func PackageFilename(ctx context.Context, data []byte, fallbackID string) string

func PlainSearchTerms

func PlainSearchTerms(query string) []string

func PluginMode

func PluginMode(p openapi.Plugin) string

func PluginStatus

func PluginStatus(p openapi.Plugin) string

func SearchPackageSymbols

func SearchPackageSymbols(pkg *packages.Package, query string, includeUnexported bool, max int, out *SymbolSearchResult, visited map[string]bool)

func Slugify

func Slugify(value string) string

func Titleize

func Titleize(value string) string

func Truncate

func Truncate(s string, max int) string

func UpdateManifest

func UpdateManifest(ctx context.Context, client *openapi.ClientWithResponses, id string, manifest rpc.Manifest) (*openapi.Plugin, error)

func WriteNewManifest

func WriteNewManifest(out io.Writer, dir string, manifest rpc.Manifest, force bool) error

func WritePackageFile

func WritePackageFile(path string, pkg *PackageArchive, force bool) error

Types

type DownloadProgress added in v1.26.14

type DownloadProgress func(downloaded, total int64)

type ExternalPlugin

type ExternalPlugin struct {
	ID    string
	Token string
}

func EnsureExternalPlugin

func EnsureExternalPlugin(ctx context.Context, client *openapi.ClientWithResponses, manifest rpc.Manifest, requestedID string, noUpdate bool) (*ExternalPlugin, error)

func ExternalPluginFromAPI

func ExternalPluginFromAPI(p openapi.Plugin) (*ExternalPlugin, error)

type ExtractResult

type ExtractResult struct {
	Files []string
}

func ExtractPackageArchive

func ExtractPackageArchive(data []byte, dir string, force bool) (*ExtractResult, error)

type GoFieldInfo

type GoFieldInfo struct {
	Name string `json:"name"`
	Type string `json:"type"`
	Tag  string `json:"tag,omitempty"`
}

func StructFields

func StructFields(s *types.Struct) []GoFieldInfo

type GoMethodInfo

type GoMethodInfo struct {
	Name      string `json:"name"`
	Receiver  string `json:"receiver,omitempty"`
	Signature string `json:"signature"`
}

func InterfaceMethods

func InterfaceMethods(iface *types.Interface) []GoMethodInfo

func NamedMethods

func NamedMethods(named *types.Named) []GoMethodInfo

type GoSymbolSummary

type GoSymbolSummary struct {
	ImportPath string `json:"import_path"`
	Name       string `json:"name"`
	Kind       string `json:"kind"`
	Signature  string `json:"signature,omitempty"`
	Doc        string `json:"doc,omitempty"`
}

func SymbolSummary

func SymbolSummary(importPath string, obj types.Object, doc string) GoSymbolSummary

type ManifestFile

type ManifestFile struct {
	Path     string
	Manifest rpc.Manifest
}

func ReadManifest

func ReadManifest(path string) (*ManifestFile, error)

func ReadProjectManifest

func ReadProjectManifest(dir string, manifestPath string) (*ManifestFile, error)

type PackageArchive

type PackageArchive struct {
	Manifest rpc.Manifest
	Bytes    []byte
	Files    []string
}

func BuildPackage

func BuildPackage(ctx context.Context, dir string, manifestPath string, excludePaths ...string) (*PackageArchive, error)

type PackageInfo

type PackageInfo struct {
	ImportPath    string `json:"import_path"`
	Name          string `json:"name"`
	ModulePath    string `json:"module_path,omitempty"`
	ModuleVersion string `json:"module_version,omitempty"`
	Standard      bool   `json:"standard"`
	Error         string `json:"error,omitempty"`
}

func PackageInfoFromPackage

func PackageInfoFromPackage(pkg *packages.Package) PackageInfo

type PackageListOptions

type PackageListOptions struct {
	Pattern     string
	IncludeDeps bool
	MaxPackages int
}

type PackageListResult

type PackageListResult struct {
	Packages  []PackageInfo `json:"packages"`
	Truncated bool          `json:"truncated"`
}

func ListGoPackages

func ListGoPackages(ctx context.Context, dir string, in PackageListOptions) (PackageListResult, error)

type PackageSymbolsOptions

type PackageSymbolsOptions struct {
	ImportPath        string
	IncludeUnexported bool
	MaxSymbols        int
}

type PackageSymbolsResult

type PackageSymbolsResult struct {
	Package   PackageInfo       `json:"package"`
	Imports   []PackageInfo     `json:"imports"`
	Symbols   []GoSymbolSummary `json:"symbols"`
	Truncated bool              `json:"truncated"`
}

type SymbolDetailOptions

type SymbolDetailOptions struct {
	ImportPath string
	Symbol     string
}

type SymbolDetailResult

type SymbolDetailResult struct {
	Package     PackageInfo       `json:"package"`
	Symbol      GoSymbolSummary   `json:"symbol"`
	Fields      []GoFieldInfo     `json:"fields,omitempty"`
	Methods     []GoMethodInfo    `json:"methods,omitempty"`
	Interface   []GoMethodInfo    `json:"interface_methods,omitempty"`
	RelatedInfo []GoSymbolSummary `json:"related_info,omitempty"`
}

type SymbolSearchOptions

type SymbolSearchOptions struct {
	Query             string
	Pattern           string
	IncludeDeps       bool
	IncludeUnexported bool
	MaxResults        int
}

type SymbolSearchResult

type SymbolSearchResult struct {
	Results   []GoSymbolSummary `json:"results"`
	Truncated bool              `json:"truncated"`
}

Jump to

Keyboard shortcuts

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