api

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version       = "0.0.21"
	VersionCommit = ""
)

Version and VersionCommit hold the version information

Functions

func GetLanguageAliases

func GetLanguageAliases() map[string]source.Type

GetLanguageAliases returns a map of language aliases to their documentation source types

Types

type ErrorCode

type ErrorCode string
const (
	ErrInvalidPackagePath ErrorCode = "InvalidPackagePath"
)

type InitialQuery added in v0.0.11

type InitialQuery struct {
	SourceRef source.Reference

	// ForceUpdate determines whether to forcibly update by ignoring the cache
	ForceUpdate bool
}

InitialQuery is a structure that represents the initial query created from user input

func NewInitialQuery added in v0.0.11

func NewInitialQuery(input UserInput) (InitialQuery, error)

NewInitialQuery creates an initial query from user input

type Investigation added in v0.0.11

type Investigation struct {
	// Query is the initial query
	Query InitialQuery

	// CollectedData is data collected from each source
	CollectedData map[source.Type]source.Data
}

Investigation is a structure that represents data under investigation

func NewInvestigation added in v0.0.11

func NewInvestigation(query InitialQuery) *Investigation

NewInvestigation creates a new investigation

func (*Investigation) Do added in v0.0.11

func (i *Investigation) Do() error

func (Investigation) IsSufficient added in v0.0.11

func (i Investigation) IsSufficient() bool
type Link struct {
	Type source.Type
	URL  *url.URL
}

type Result added in v0.0.11

type Result struct {
	README string

	InitialQueryURL  *url.URL
	InitialQueryType source.Type
	Links            []Link
}

Result is a structure that represents the investigation result

func CreateResult added in v0.0.11

func CreateResult(inv *Investigation) Result

CreateResult generates a result from investigation data

func (Result) GetDocumentation added in v0.0.11

func (r Result) GetDocumentation() *url.URL
func (r Result) GetDocumentationLink() *Link

func (Result) GetHomepage added in v0.0.11

func (r Result) GetHomepage() *url.URL
func (r Result) GetHomepageLink() *Link

func (Result) GetRegistry added in v0.0.11

func (r Result) GetRegistry() *url.URL
func (r Result) GetRegistryLink() *Link

func (Result) GetRepository added in v0.0.11

func (r Result) GetRepository() *url.URL
func (r Result) GetRepositoryLink() *Link

type UserInput added in v0.0.11

type UserInput struct {
	// PackagePath is the path of the package
	PackagePath string
	// Language is the explicitly specified language
	Language string
	// ForceUpdate determines whether to forcibly update by ignoring the cache
	ForceUpdate bool
}

UserInput is a structure that represents input from the user

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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