Documentation
¶
Index ¶
- Constants
- func CleanDoc(s string) string
- func CommandFromManifest(manifest rpc.Manifest, override []string) (string, []string, error)
- func CycleToken(ctx context.Context, client *openapi.ClientWithResponses, id string) (string, error)
- func DefaultAuthor() string
- func DefaultPackagePath(dir string, manifest rpc.Manifest) string
- func DeletePlugin(ctx context.Context, client *openapi.ClientWithResponses, id string) error
- func DownloadPackage(ctx context.Context, client *openapi.ClientWithResponses, id string, ...) ([]byte, error)
- func ExternalRPCURL(endpoint string, token string) (string, error)
- func FirstPlainSearchTerm(query string) string
- func GetPlugin(ctx context.Context, client *openapi.ClientWithResponses, id string) (*openapi.Plugin, error)
- func InstallSupervisedPackage(ctx context.Context, client *openapi.ClientWithResponses, pkg *PackageArchive) (*openapi.Plugin, bool, error)
- func LastPlainSearchTerm(query string) string
- func ListPlugins(ctx context.Context, client *openapi.ClientWithResponses) ([]openapi.Plugin, error)
- func LoadGoPackage(ctx context.Context, dir string, importPath string) (*packages.Package, error)
- func LoadGoPackages(ctx context.Context, dir string, pattern string, includeDeps bool) ([]*packages.Package, error)
- func PackageDocs(pkg *packages.Package) map[string]string
- func PackageFilename(ctx context.Context, data []byte, fallbackID string) string
- func PlainSearchTerms(query string) []string
- func PluginMode(p openapi.Plugin) string
- func PluginStatus(p openapi.Plugin) string
- func SearchPackageSymbols(pkg *packages.Package, query string, includeUnexported bool, max int, ...)
- func SetActiveState(ctx context.Context, client *openapi.ClientWithResponses, id string, ...) (*openapi.Plugin, error)
- func Slugify(value string) string
- func Titleize(value string) string
- func Truncate(s string, max int) string
- func UpdateManifest(ctx context.Context, client *openapi.ClientWithResponses, id string, ...) (*openapi.Plugin, error)
- func WriteNewManifest(out io.Writer, dir string, manifest rpc.Manifest, force bool) error
- func WritePackageFile(path string, pkg *PackageArchive, force bool) error
- type DownloadProgress
- type ExternalPlugin
- type ExtractResult
- type GoFieldInfo
- type GoMethodInfo
- type GoSymbolSummary
- type ManifestFile
- type PackageArchive
- type PackageInfo
- type PackageListOptions
- type PackageListResult
- type PackageSymbolsOptions
- type PackageSymbolsResult
- type SymbolDetailOptions
- type SymbolDetailResult
- type SymbolSearchOptions
- type SymbolSearchResult
Constants ¶
View Source
const ManifestFilename = "manifest.yaml"
View Source
const RPCURLEnvName = "STORYDEN_RPC_URL"
Variables ¶
This section is empty.
Functions ¶
func CommandFromManifest ¶
func CycleToken ¶
func DefaultAuthor ¶
func DefaultAuthor() string
func DeletePlugin ¶
func DownloadPackage ¶
func DownloadPackage(ctx context.Context, client *openapi.ClientWithResponses, id string, progress DownloadProgress) ([]byte, error)
func FirstPlainSearchTerm ¶
func InstallSupervisedPackage ¶
func InstallSupervisedPackage(ctx context.Context, client *openapi.ClientWithResponses, pkg *PackageArchive) (*openapi.Plugin, bool, error)
func LastPlainSearchTerm ¶
func ListPlugins ¶
func LoadGoPackage ¶
func LoadGoPackages ¶
func PackageFilename ¶
func PlainSearchTerms ¶
func PluginMode ¶
func PluginStatus ¶
func SearchPackageSymbols ¶
func SetActiveState ¶
func SetActiveState(ctx context.Context, client *openapi.ClientWithResponses, id string, state openapi.PluginActiveState) (*openapi.Plugin, error)
func UpdateManifest ¶
func WriteNewManifest ¶
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 ¶
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 ¶
func ReadManifest ¶
func ReadManifest(path string) (*ManifestFile, error)
func ReadProjectManifest ¶
func ReadProjectManifest(dir string, manifestPath string) (*ManifestFile, error)
type PackageArchive ¶
func BuildPackage ¶
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 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 PackageSymbolsResult ¶
type PackageSymbolsResult struct {
Package PackageInfo `json:"package"`
Imports []PackageInfo `json:"imports"`
Symbols []GoSymbolSummary `json:"symbols"`
Truncated bool `json:"truncated"`
}
func GoPackageSymbols ¶
func GoPackageSymbols(ctx context.Context, dir string, in PackageSymbolsOptions) (PackageSymbolsResult, error)
type SymbolDetailOptions ¶
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"`
}
func GoSymbolDetail ¶
func GoSymbolDetail(ctx context.Context, dir string, in SymbolDetailOptions) (SymbolDetailResult, error)
type SymbolSearchOptions ¶
type SymbolSearchResult ¶
type SymbolSearchResult struct {
Results []GoSymbolSummary `json:"results"`
Truncated bool `json:"truncated"`
}
func GoSymbolSearch ¶
func GoSymbolSearch(ctx context.Context, dir string, in SymbolSearchOptions) (SymbolSearchResult, error)
Click to show internal directories.
Click to hide internal directories.