docuploader

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package docuploader provides functionality for packaging documentation for googleapis.dev and cloud.google.com.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocUploaderMetadata

type DocUploaderMetadata struct {
	// DistributionName is the language-idiomatic package/distribution name, for
	// example:
	// Python: google-cloud-storage
	// Node.js: @google/cloud-storage
	DistributionName string `json:"distributionName,omitempty"`

	// GithubRepository is the URI of the github repository. For example, Node's
	// Cloud Storage client would be
	// https://github.com/googleapis/nodejs-storage
	GithubRepository string `json:"githubRepository,omitempty"`

	// IssueTracker is the URI of the issue tracker. For example the Node
	// Storage client's issue tracker is
	// https://github.com/googleapis/nodejs-storage/issues
	IssueTracker string `json:"issueTracker,omitempty"`

	// Language is the (programming) language. While this isn't enforced with an
	// enum, you should use one of the following strings:  python, nodejs, ruby,
	// dotnet, java, go, php, cpp. In some cases you might need to use something
	// else, consult the docs team for guidance.
	Language string `json:"language,omitempty"`

	// Name is the product/API name. This *should* match the DNS name of the API
	// service. For example, Python's Cloud Storage client would list "storage"
	// because it talks to storage.googleapis.com. For non-API libraries, such
	// as auth, consult the docs team for guidance.
	Name string `json:"name,omitempty"`

	// ProductPage is the URI of the product page. For example
	// https://cloud.google.com/storage/
	ProductPage string `json:"productPage,omitempty"`

	// ServingPath is the serving path for this docset. If unspecified, it will
	// be set to `{stem}/{version}`. This is an advanced field, and should only
	// be set after consultation with the docs team.
	ServingPath string `json:"servingPath,omitempty"`

	// Stem is the published stem for this docset. If unspecified, it will be
	// set to `{language}/{name}`. This is an advanced field, and should only be
	// set after consultation with the docs team.
	Stem string `json:"stem,omitempty"`

	// UpdateTime is the timestamp when the documentation was built, in
	// an https://www.ietf.org/rfc/rfc3339.txt format (in UTC).
	UpdateTime string `json:"updateTime,omitempty"`

	// Version is the package version, for example 1.2.3, or 0.1.2-beta1.
	Version string `json:"version,omitempty"`

	// XRefServices specifies the DocFX xref service URLs required for these
	// docs. This is an advanced field, and should only be set after
	// consultation with the docs team.
	XRefServices []string `json:"xrefServices,omitempty"`

	// XRefs specifies the DocFX xref URLs required for these docs. This is an
	// advanced field, and should only be set after consultation with the docs
	// team.
	XRefs []string `json:"xrefs,omitempty"`
}

DocUploaderMetadata represents the structure of the docs.metadata.json file embedded in documentation tarballs. See https://github.com/googleapis/docuploader/blob/main/docuploader/protos/metadata.proto for original .proto file. Field comments are lightly-edited versions of comments on those fields.

func FromRepoMetadata

func FromRepoMetadata(repoMetadata *repometadata.RepoMetadata) *DocUploaderMetadata

FromRepoMetadata creates a new DocUploaderMetadata based on fields from the specified RepoMetadata. This does not populate UpdateTime or Version (which should always be populated by the caller afterwards) or the advanced fields (ServingPath, Stem, XRefServices, XRefs). No validation is performed for whether the fields have been set to non-empty vlaues in repoMetadata.

func (*DocUploaderMetadata) SetUpdateTime

func (d *DocUploaderMetadata) SetUpdateTime(updateTime time.Time) *DocUploaderMetadata

SetUpdateTime sets the UpdateTime field in the metadata to the specified updateTime, formatted in RFC-3339 format with second resolution, in UTC.

Jump to

Keyboard shortcuts

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