sample

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package sample provides functionality for generating sample values of the types contained in the internal package for testing purposes.

Index

Constants

View Source
const (
	// Lib1Name is the name of the first library added to the [Config].
	Lib1Name = "google-cloud-storage"
	// Lib2Name is the name of the second library added to the [Config].
	Lib2Name = "gax-internal"
	// InitialTag is the tag form of [InitialVersion] for use in tests.
	InitialTag = "v1.0.0"
	// InitialVersion is the initial version assigned to libraries in
	// [Config].
	InitialVersion = "1.0.0"
	// NextVersion is the next version typically assigned to libraries
	// starting from [InitialVersion].
	NextVersion = "1.1.0"
	// InitialPreviewTag is the tag form of [InitialPreviewVersion] for use in
	// tests.
	InitialPreviewTag = "v1.1.0-preview.1"
	// InitialPreviewVersion is an initial version that can be assigned to
	// libraries on a preview branch.
	InitialPreviewVersion = "1.1.0-preview.1"
	// NextPreviewPrereleaseVersion is the next prerelease version typically
	// assigned to preview libraries starting from [InitialPreviewVersion].
	NextPreviewPrereleaseVersion = "1.1.0-preview.2"
	// NextPreviewCoreVersion is the next core version typically
	// assigned to preview libraries starting from [InitialPreviewVersion] when
	// the main version has moved on to [NextVersion].
	NextPreviewCoreVersion = "1.2.0-preview.1"
	// RustNonGAVersion is a non-GA client library version typical of a Rust
	// client library.
	RustNonGAVersion = "0.1.0-beta"
	// RustNextNonGAVersion is the next version of non-GA Rust client library
	// starting from [RustNonGAVersion].
	RustNextNonGAVersion = "0.1.1-beta"
)

Variables

View Source
var (
	// Lib1Output is the [config.Library] Output path of [Lib1Name] included in
	// [Config].
	Lib1Output = filepath.Join("src", "storage")
	// Lib2Output is the [config.Library] Output path of [Lib2Name] included in
	// [Config].
	Lib2Output = filepath.Join("src", "gax-internal")
)

Functions

func Config

func Config() *config.Config

Config produces a config.Config instance populated with most of the properties necessary for testing. It produces a unique instance each time so that individual test cases may modify their own instance as needed.

func PreviewConfig

func PreviewConfig() *config.Config

PreviewConfig produces a config.Config using the normal Config function, but modifies the resulting config.Config properties to align with that of a Preview generation track.

Types

This section is empty.

Jump to

Keyboard shortcuts

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