Documentation

Overview

Package internal contains data used through x/pkgsite.

Index

Constants

View Source
const (
	// LatestVersion signifies the latest available version in requests to the
	// proxy client.
	LatestVersion = "latest"

	// MainVersion represents the main branch.
	MainVersion = "main"

	// MasterVersion represents the master branch.
	MasterVersion = "master"

	// UnknownModulePath signifies that the module path for a given package
	// path is ambiguous or not known. This is because requests to the
	// frontend can come in the form of <import-path>[@<version>], and it is
	// not clear which part of the import-path is the module path.
	UnknownModulePath = "unknownModulePath"
)
View Source
const (
	ExperimentDeprecatedDoc               = "deprecated-doc"
	ExperimentEnableStdFrontendFetch      = "enable-std-frontend-fetch"
	ExperimentInsertSymbolSearchDocuments = "insert-symbol-search-documents"
	ExperimentNewUnitLayout               = "new-unit-layout"
	ExperimentReadSymbolHistory           = "read-symbol-history"
	ExperimentSearchGrouping              = "search-grouping"
	ExperimentSkipInsertSymbols           = "skip-insert-symbols"
	ExperimentStyleGuide                  = "styleguide"
	ExperimentSymbolHistoryMainPage       = "symbol-history-main-page"
	ExperimentSymbolHistoryVersionsPage   = "symbol-history-versions-page"
	ExperimentSymbolSearch                = "symbol-search"
)
View Source
const All = "all"

All represents all values for a build context element (GOOS or GOARCH).

View Source
const StringFieldMissing = "!MISSING"

StringFieldMissing is the value for string fields that are not present in a struct. We use it to distinguish a (possibly valid) empty string from a field that was never populated.

Variables

View Source
var (
	BuildContextAll     = BuildContext{All, All}
	BuildContextLinux   = BuildContext{"linux", "amd64"}
	BuildContextWindows = BuildContext{"windows", "amd64"}
	BuildContextDarwin  = BuildContext{"darwin", "amd64"}
	BuildContextJS      = BuildContext{"js", "wasm"}
)

BuildContexts are the build contexts we check when loading a package (see internal/fetch/load.go). We store documentation for all of the listed contexts. The order determines which environment's docs we will show as the default.

View Source
var DefaultBranches = map[string]bool{
	MainVersion:   true,
	MasterVersion: true,
}

DefaultBranches are default branches that are supported by pkgsite.

View Source
var Experiments = map[string]string{
	ExperimentDeprecatedDoc:               "Treat deprecated symbols specially in documentation.",
	ExperimentEnableStdFrontendFetch:      "Enable frontend fetching for module std.",
	ExperimentInsertSymbolSearchDocuments: "Insert data into symbol_search_documents.",
	ExperimentNewUnitLayout:               "Enable the new layout on the unit page.",
	ExperimentReadSymbolHistory:           "Read data from the symbol_history table.",
	ExperimentSearchGrouping:              "Group search results.",
	ExperimentSkipInsertSymbols:           "Don't insert data into symbols tables.",
	ExperimentStyleGuide:                  "Enable the styleguide.",
	ExperimentSymbolHistoryMainPage:       "Show package API history on the main unit page.",
	ExperimentSymbolHistoryVersionsPage:   "Show package API history on the versions page.",
	ExperimentSymbolSearch:                "Enable searching for symbols.",
}

Experiments represents all of the active experiments in the codebase and a description of each experiment.

Functions

func CandidateModulePaths

func CandidateModulePaths(fullPath string) []string

CandidateModulePaths returns the potential module paths that could contain the fullPath, from longest to shortest. It returns nil if no valid module paths can be constructed.

func CompareBuildContexts

func CompareBuildContexts(c1, c2 BuildContext) int

CompareBuildContexts returns a negative number, 0, or a positive number depending on the relative positions of c1 and c2 in BuildContexts.

func MajorVersionForModule

func MajorVersionForModule(modulePath string) string

MajorVersionForModule returns the final "vN" from the module path, if any. It returns the empty string if the module path is malformed. Examples:

"m.com" => ""
"m.com/v2" => "v2"
"gpkg.in/m.v1 = "v1"

func SeriesPathAndMajorVersion

func SeriesPathAndMajorVersion(modulePath string) (string, int)

SeriesPathAndMajorVersion splits modulePath into a series path and a numeric major version. If the path doesn't have a "vN" suffix, it returns 1. If the module path is invalid, it returns ("", 0).

func SeriesPathForModule

func SeriesPathForModule(modulePath string) string

SeriesPathForModule returns the series path for the provided modulePath.

func Suffix

func Suffix(fullPath, basePath string) string

Suffix returns the suffix of the fullPath. It assumes that basePath is a prefix of fullPath. If fullPath and basePath are the same, the empty string is returned.

func V1Path

func V1Path(fullPath, modulePath string) string

V1Path returns the path for version 1 of the package whose import path is fullPath. If modulePath is the standard library, then V1Path returns fullPath.

Types

type BuildContext

type BuildContext struct {
	GOOS, GOARCH string
}

A BuildContext describes a build context for the Go tool: information needed to build a Go package. For our purposes, we only care about the information that affects documentation generated from the package.

func (BuildContext) Match

func (pattern BuildContext) Match(target BuildContext) bool

Match reports whether its receiver, which acts like a pattern, matches its target, an ordinary BuildContext. In addition to the usual values, a pattern can have an empty GOOS or GOARCH, which means "match anything."

func (BuildContext) String

func (b BuildContext) String() string

String returns a string formatted representation of the build context.

type DataSource

type DataSource interface {

	// GetNestedModules returns the latest major version of all nested modules
	// given a modulePath path prefix.
	GetNestedModules(ctx context.Context, modulePath string) ([]*ModuleInfo, error)
	// GetUnit returns information about a directory, which may also be a
	// module and/or package. The module and version must both be known.
	// The BuildContext selects the documentation to read.
	GetUnit(ctx context.Context, pathInfo *UnitMeta, fields FieldSet, bc BuildContext) (_ *Unit, err error)
	// GetUnitMeta returns information about a path.
	GetUnitMeta(ctx context.Context, path, requestedModulePath, requestedVersion string) (_ *UnitMeta, err error)
	// GetModuleReadme gets the readme for the module.
	GetModuleReadme(ctx context.Context, modulePath, resolvedVersion string) (*Readme, error)

	// GetLatestInfo gets information about the latest versions of a unit and module.
	// See LatestInfo for documentation.
	GetLatestInfo(ctx context.Context, unitPath, modulePath string, latestUnitMeta *UnitMeta) (LatestInfo, error)
}

DataSource is the interface used by the frontend to interact with module data.

type Documentation

type Documentation struct {
	// The values of the GOOS and GOARCH environment variables used to parse the
	// package.
	GOOS     string
	GOARCH   string
	Synopsis string
	Source   []byte // encoded ast.Files; see godoc.Package.Encode
	API      []*Symbol
}

Documentation is the rendered documentation for a given package for a specific GOOS and GOARCH.

func DocumentationForBuildContext

func DocumentationForBuildContext(docs []*Documentation, bc BuildContext) *Documentation

DocumentationForBuildContext returns the first Documentation the list that matches the BuildContext, or nil if none does. A Documentation matches if its GOOS and GOARCH fields are the same as those of the BuildContext, or if the Documentation field is "all", or if the BuildContext field is empty. That is, empty BuildContext fields act as wildcards. So the zero BuildContext will match the first element of docs, if there is one.

func (*Documentation) BuildContext

func (d *Documentation) BuildContext() BuildContext

BuildContext returns the BuildContext for d.

type Experiment

type Experiment struct {

	// Name is the name of the feature.
	Name string

	// Rollout is the percentage of requests enrolled in the experiment.
	Rollout uint

	// Description provides a description of the experiment.
	Description string
}

Experiment holds data associated with an experimental feature for frontend or worker.

type FieldSet

type FieldSet int64

A FieldSet is a bit set of struct fields. It is used to avoid reading large struct fields from the data store. FieldSet is also the type of the individual bit values. (Think of them as singleton sets.)

MinimalFields (the zero value) is the empty set. AllFields is the set containing every field.

FieldSet bits are unique across the entire project, because some types are concatenations (via embedding) of others. For example, a

const (
	WithMain FieldSet = 1 << iota
	WithImports
	WithLicenses
)

FieldSet bits for fields that can be conditionally read from the data store.

const AllFields FieldSet = -1

AllFields is the FieldSet that contains all fields.

const MinimalFields FieldSet = 0

MinimalFields is the empty FieldSet.

type IndexVersion

type IndexVersion struct {
	Path      string
	Version   string
	Timestamp time.Time
}

IndexVersion holds the version information returned by the module index.

type LatestInfo

type LatestInfo struct {
	// MinorVersion is the latest minor version for the unit, regardless of
	// module.
	MinorVersion string

	// MinorModulePath is the module path for MinorVersion.
	MinorModulePath string

	// UnitExistsAtMinor is whether the unit exists at the latest minor version
	// of the module
	UnitExistsAtMinor bool

	// MajorModulePath is the path of the latest module path in the series.
	// For example, in the module path "github.com/casbin/casbin", there
	// is another module path with a greater major version
	// "github.com/casbin/casbin/v3". This field will be
	// "github.com/casbin/casbin/v3" or the input module path if no later module
	// path was found.
	MajorModulePath string

	// MajorUnitPath is the path of the unit in the latest major version of the
	// module, if it exists. For example, if the module is M, the unit is M/U,
	// and the latest major version is 3, then is field is "M/v3/U". If the module version
	// at MajorModulePath does not contain this unit, then it is the module path."
	MajorUnitPath string
}

LatestInfo holds information about the latest versions and paths. The information is relative to a unit in a module.

type LatestModuleVersions

type LatestModuleVersions struct {
	ModulePath    string
	RawVersion    string        // ignoring retractions
	CookedVersion string        // considering retractions
	GoodVersion   string        // successfully processed
	GoModFile     *modfile.File // of raw
	Deprecated    bool
	// contains filtered or unexported fields
}

LatestModuleVersions describes the latest versions of a module. It also holds the go.mod file of the raw latest version, which establishes whether the module is deprecated, and what versions are retracted.

func NewLatestModuleVersions

func NewLatestModuleVersions(modulePath, raw, cooked, good string, modBytes []byte) (*LatestModuleVersions, error)

func (*LatestModuleVersions) IsRetracted

func (li *LatestModuleVersions) IsRetracted(version string) bool

IsRetracted reports whether the version is retracted according to the go.mod file in the receiver.

func (*LatestModuleVersions) PopulateModuleInfo

func (li *LatestModuleVersions) PopulateModuleInfo(mi *ModuleInfo)

PopulateModuleInfo uses the LatestModuleVersions to populate fields of the given module.

type Module

type Module struct {
	ModuleInfo
	// Licenses holds all licenses within this module version, including those
	// that may be contained in nested subdirectories.
	Licenses []*licenses.License
	Units    []*Unit
}

A Module is a specific, reproducible build of a module.

func (*Module) Packages

func (m *Module) Packages() []*Unit

Packages returns all of the units for a module that are packages.

func (*Module) RemoveNonRedistributableData

func (m *Module) RemoveNonRedistributableData()

type ModuleInfo

type ModuleInfo struct {
	ModulePath        string
	Version           string
	CommitTime        time.Time
	IsRedistributable bool
	// HasGoMod describes whether the module zip has a go.mod file.
	HasGoMod   bool
	SourceInfo *source.Info

	// Deprecated describes whether the module is deprecated.
	Deprecated bool
	// DeprecationComment is the comment describing the deprecation, if any.
	DeprecationComment string
	// Retracted describes whether the module version is retracted.
	Retracted bool
	// RetractionRationale is the reason for the retraction, if any.
	RetractionRationale string
}

ModuleInfo holds metadata associated with a module.

func (*ModuleInfo) SeriesPath

func (v *ModuleInfo) SeriesPath() string

SeriesPath returns the series path for the module.

A series is a group of modules that share the same base path and are assumed to be major-version variants.

The series path is the module path without the version. For most modules, this will be the module path for all module versions with major version 0 or 1. For gopkg.in modules, the series path does not correspond to any module version.

Examples: The module paths "a/b" and "a/b/v2" both have series path "a/b". The module paths "gopkg.in/yaml.v1" and "gopkg.in/yaml.v2" both have series path "gopkg.in/yaml".

type ModuleVersionState

type ModuleVersionState struct {
	ModulePath string
	Version    string

	// IndexTimestamp is the timestamp received from the Index for this version,
	// which should correspond to the time this version was committed to the
	// Index.
	IndexTimestamp time.Time
	// CreatedAt is the time this version was originally inserted into the
	// module version state table.
	CreatedAt time.Time

	// Status is the most recent HTTP status code received from the Fetch service
	// for this version, or nil if no request to the fetch service has been made.
	Status int
	// Error is the most recent HTTP response body received from the Fetch
	// service, for a response with an unsuccessful status code. It is used for
	// debugging only, and has no semantic significance.
	Error string
	// TryCount is the number of times a fetch of this version has been
	// attempted.
	TryCount int
	// LastProcessedAt is the last time this version was updated with a result
	// from the fetch service.
	LastProcessedAt *time.Time
	// NextProcessedAfter is the next time a fetch for this version should be
	// attempted.
	NextProcessedAfter time.Time

	// AppVersion is the value of the GAE_VERSION environment variable, which is
	// set by app engine. It is a timestamp in the format 20190709t112655 that
	// is close to, but not the same as, the deployment time. For example, the
	// deployment time for the above timestamp might be Jul 9, 2019, 11:29:59 AM.
	AppVersion string

	// HasGoMod says whether the zip file has a go.mod file.
	HasGoMod bool

	// GoModPath is the path declared in the go.mod file fetched from the proxy.
	GoModPath string

	// NumPackages it the number of packages that were processed as part of the
	// module (regardless of whether the processing was successful).
	NumPackages *int
}

ModuleVersionState holds a worker module version state.

type PackageMeta

type PackageMeta struct {
	Path              string
	Name              string
	Synopsis          string
	IsRedistributable bool
	Licenses          []*licenses.Metadata // metadata of applicable licenses
}

PackageMeta represents the metadata of a package in a module version.

func (*PackageMeta) RemoveNonRedistributableData

func (p *PackageMeta) RemoveNonRedistributableData()

type PackageVersionState

type PackageVersionState struct {
	PackagePath string
	ModulePath  string
	Version     string
	Status      int
	Error       string
}

PackageVersionState holds a worker package version state. It is associated with a given module version state.

type Readme

type Readme struct {
	Filepath string
	Contents string
}

Readme is a README at the specified filepath.

type SearchResult

type SearchResult struct {
	Name        string
	PackagePath string
	ModulePath  string
	Version     string
	Synopsis    string
	Licenses    []string

	CommitTime time.Time

	// Score is used to sort items in an array of SearchResult.
	Score float64

	// NumImportedBy is the number of packages that import PackagePath.
	NumImportedBy uint64

	// SameModule is a list of SearchResults from the same module as this one,
	// with lower scores.
	SameModule []*SearchResult

	// OtherMajor is a set of module paths with the same series path but at
	// different major versions of this module.
	OtherMajor map[string]bool

	// NumResults is the total number of packages that were returned for this
	// search.
	NumResults uint64

	// Approximate reports whether NumResults is an approximate count. NumResults
	// can be approximate if search scanned only a subset of documents, and
	// result count is estimated using the hyperloglog algorithm.
	Approximate bool

	// Symbols are the symbols returned by a search request.
	Symbols []string
}

SearchResult represents a single search result from SearchDocuments.

type Symbol

type Symbol struct {
	SymbolMeta

	// Children contain the child symbols for this symbol. This will
	// only be populated when the SymbolType is "Type". For example, the
	// children of net/http.Handler are FileServer, NotFoundHandler,
	// RedirectHandler, StripPrefix, and TimeoutHandler. Each child
	// symbol will have ParentName set to the Name of this type.
	Children []*SymbolMeta

	// GOOS specifies the execution operating system where the symbol appears.
	GOOS string

	// GOARCH specifies the execution architecture where the symbol appears.
	GOARCH string
}

Symbol is an element in the package API. A symbol can be a constant, variable, function, or type.

type SymbolBuildContexts

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

SymbolBuildContexts represents the build contexts that are associated with a SymbolMeta.

func (*SymbolBuildContexts) AddBuildContext

func (us *SymbolBuildContexts) AddBuildContext(build BuildContext)

AddBuildContext adds a build context supported by this UnitSymbol.

func (*SymbolBuildContexts) BuildContexts

func (us *SymbolBuildContexts) BuildContexts() []BuildContext

BuildContexts returns the build contexts for this UnitSymbol.

func (*SymbolBuildContexts) InAll

func (us *SymbolBuildContexts) InAll() bool

InAll reports whether the unit symbol supports all build contexts.

func (*SymbolBuildContexts) RemoveBuildContexts

func (us *SymbolBuildContexts) RemoveBuildContexts()

RemoveBuildContexts removes all of the build contexts associated with this unit symbol.

func (*SymbolBuildContexts) SupportsBuild

func (us *SymbolBuildContexts) SupportsBuild(build BuildContext) bool

SupportsBuild reports whether the provided build is supported by this UnitSymbol. If the build is BuildContextAll, this is interpreted as this unit symbol supports at least one build context.

type SymbolHistory

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

SymbolHistory represents the history for when a symbol name was first added to a package.

func NewSymbolHistory

func NewSymbolHistory() *SymbolHistory

NewSymbolHistory returns a new *SymbolHistory.

func (*SymbolHistory) AddSymbol

func (sh *SymbolHistory) AddSymbol(sm SymbolMeta, v string, build BuildContext)

AddSymbol adds the given symbol to SymbolHistory.

func (*SymbolHistory) GetSymbol

func (sh *SymbolHistory) GetSymbol(name, v string, build BuildContext) (_ *SymbolMeta, err error)

GetSymbol returns the unit symbol for a given name, version and build context.

func (*SymbolHistory) SymbolsAtVersion

func (sh *SymbolHistory) SymbolsAtVersion(v string) map[string]map[SymbolMeta]*SymbolBuildContexts

SymbolsAtVersion returns a map of name to SymbolMeta to UnitSymbol for a given version.

func (*SymbolHistory) Versions

func (sh *SymbolHistory) Versions() []string

Versions returns an array of the versions in versionToNameToUnitSymbol, sorted by increasing semver.

type SymbolKind

type SymbolKind string

SymbolKind is the type of a symbol.

const (
	SymbolKindConstant SymbolKind = "Constant"
	SymbolKindVariable SymbolKind = "Variable"
	SymbolKindFunction SymbolKind = "Function"
	SymbolKindType     SymbolKind = "Type"
	SymbolKindField    SymbolKind = "Field"
	SymbolKindMethod   SymbolKind = "Method"
)

type SymbolMeta

type SymbolMeta struct {
	// Name is the name of the symbol.
	Name string

	// Synopsis is the one line description of the symbol as displayed
	// in the package documentation.
	Synopsis string

	// Section is the section that a symbol appears in.
	Section SymbolSection

	// Kind is the type of a symbol, which is either a constant, variable,
	// function, type, field or method.
	Kind SymbolKind

	// ParentName if name of the parent type if available, otherwise
	// the empty string. For example, the parent type for
	// net/http.FileServer is Handler.
	ParentName string
}

SymbolMeta is the metadata for an element in the package API. A symbol can be a constant, variable, function, or type.

type SymbolSection

type SymbolSection string

SymbolSection is the documentation section where a symbol appears.

const (
	SymbolSectionConstants SymbolSection = "Constants"
	SymbolSectionVariables SymbolSection = "Variables"
	SymbolSectionFunctions SymbolSection = "Functions"
	SymbolSectionTypes     SymbolSection = "Types"
)

type Unit

type Unit struct {
	UnitMeta
	Readme          *Readme
	BuildContexts   []BuildContext   // set only on read
	Documentation   []*Documentation // at most one on read
	Subdirectories  []*PackageMeta
	Imports         []string
	LicenseContents []*licenses.License
	Symbols         map[BuildContext][]*Symbol
	NumImports      int
	NumImportedBy   int

	// SymbolHistory is a map of symbolName to the version when the symbol was
	// first added to the package.
	SymbolHistory map[string]string
}

Unit represents the contents of some path in the Go package/module namespace. It might be a module, a package, both a module and a package, or none of the above: a directory within a module that has no .go files, but contains other units, licenses and/or READMEs."

func (*Unit) RemoveNonRedistributableData

func (u *Unit) RemoveNonRedistributableData()

type UnitMeta

type UnitMeta struct {
	// Unit level information
	//
	Path              string
	Name              string
	IsRedistributable bool
	Licenses          []*licenses.Metadata

	// Module level information
	// Note: IsRedistributable (above) applies to the unit;
	// ModuleInfo.IsRedistributable applies to the module.
	ModuleInfo
}

UnitMeta represents metadata about a unit.

func (*UnitMeta) IsCommand

func (um *UnitMeta) IsCommand() bool

IsCommand reports whether the path represents a package path.

func (*UnitMeta) IsModule

func (um *UnitMeta) IsModule() bool

IsModule reports whether the path represents a module path.

func (*UnitMeta) IsPackage

func (um *UnitMeta) IsPackage() bool

IsPackage reports whether the path represents a package path.

type VersionMap

type VersionMap struct {
	ModulePath       string
	RequestedVersion string
	ResolvedVersion  string
	GoModPath        string
	Status           int
	Error            string
	UpdatedAt        time.Time
}

VersionMap holds metadata associated with module queries for a version.

Directories

Path Synopsis
Package auth authorizes programs to make HTTP requests to the discovery site.
Package auth authorizes programs to make HTTP requests to the discovery site.
Package cache implements a redis-based page cache for pkgsite.
Package cache implements a redis-based page cache for pkgsite.
Package config resolves shared configuration for Go Discovery services, and provides functions to access this configuration.
Package config resolves shared configuration for Go Discovery services, and provides functions to access this configuration.
dynconfig
Package dynconfig supports dynamic configuration for pkgsite services.
Package dynconfig supports dynamic configuration for pkgsite services.
Package cookie is used to get and set HTTP cookies.
Package cookie is used to get and set HTTP cookies.
Package database adds some useful functionality to a sql.DB.
Package database adds some useful functionality to a sql.DB.
Package dcensus provides functionality for debug instrumentation.
Package dcensus provides functionality for debug instrumentation.
Package derrors defines internal error values to categorize the different types error semantics we support.
Package derrors defines internal error values to categorize the different types error semantics we support.
Package experiment provides functionality for experiments.
Package experiment provides functionality for experiments.
Package fetch provides a way to fetch modules from a proxy.
Package fetch provides a way to fetch modules from a proxy.
Package frontend provides functionality for running the pkg.go.dev site.
Package frontend provides functionality for running the pkg.go.dev site.
Package godoc is for rendering Go documentation.
Package godoc is for rendering Go documentation.
codec
Package codec implements the general-purpose part of an encoder for Go values.
Package codec implements the general-purpose part of an encoder for Go values.
dochtml
Package dochtml renders Go package documentation into HTML.
Package dochtml renders Go package documentation into HTML.
Package index provides a client for communicating with the module index.
Package index provides a client for communicating with the module index.
Package licenses detects licenses and determines whether they are redistributable.
Package licenses detects licenses and determines whether they are redistributable.
Package localdatasource implements an in-memory internal.DataSource used to load and display documentation for local modules that are not available via a proxy.
Package localdatasource implements an in-memory internal.DataSource used to load and display documentation for local modules that are not available via a proxy.
Package log supports structured and unstructured logging with levels.
Package log supports structured and unstructured logging with levels.
Package middleware implements a simple middleware pattern for http handlers, along with implementations for some common middlewares.
Package middleware implements a simple middleware pattern for http handlers, along with implementations for some common middlewares.
Package poller supports periodic polling to load a value.
Package poller supports periodic polling to load a value.
Package postgres provides functionality for reading and writing to the postgres database.
Package postgres provides functionality for reading and writing to the postgres database.
Package proxy provides a client for interacting with a proxy.
Package proxy provides a client for interacting with a proxy.
Package proxydatasource implements an internal.DataSource backed solely by a proxy instance.
Package proxydatasource implements an internal.DataSource backed solely by a proxy instance.
Package queue provides queue implementations that can be used for asynchronous scheduling of fetch actions.
Package queue provides queue implementations that can be used for asynchronous scheduling of fetch actions.
Package secrets is used to interact with secretmanager.
Package secrets is used to interact with secretmanager.
Package source constructs public URLs that link to the source files in a module.
Package source constructs public URLs that link to the source files in a module.
Package static builds static assets for the frontend and the worker.
Package static builds static assets for the frontend and the worker.
Package stdlib supports special handling of the Go standard library.
Package stdlib supports special handling of the Go standard library.
testing
dbtest
Package dbtest supports testing with a database.
Package dbtest supports testing with a database.
htmlcheck
Package htmlcheck provides a set of functions that check for properties of a parsed HTML document.
Package htmlcheck provides a set of functions that check for properties of a parsed HTML document.
pagecheck
Package pagecheck implements HTML checkers for discovery site pages.
Package pagecheck implements HTML checkers for discovery site pages.
sample
Package sample provides functionality for generating sample values of the types contained in the internal package.
Package sample provides functionality for generating sample values of the types contained in the internal package.
testhelper
Package testhelper provides shared functionality and constants to be used in Discovery tests.
Package testhelper provides shared functionality and constants to be used in Discovery tests.
Package version handles version types.
Package version handles version types.
Package worker provides functionality for running a worker service.
Package worker provides functionality for running a worker service.
Package xcontext is a package to offer the extra functionality we need from contexts that is not available from the standard context package.
Package xcontext is a package to offer the extra functionality we need from contexts that is not available from the standard context package.