Help us shape the future of Go! Take the 2026 Go Developer Survey

sample

package
v0.49.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 8 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 (
	// APIName is the name of the sample API.
	APIName = "secretmanager"
	// APITitle is the title of the sample API.
	APITitle = "Secret Manager API"
	// APIPackageName is the package name of the sample API.
	APIPackageName = "google.cloud.secretmanager.v1"
	// APIDescription is the description of the sample API.
	APIDescription = "Stores sensitive data such as API keys, passwords, and certificates.\nProvides convenience while improving security."
	// SpecificationName is the specification name of the sample API.
	SpecificationName = "google.cloud.secretmanager.v1"

	// ServiceName is the name of the sample service.
	ServiceName = "SecretManagerService"
	// DefaultHost is the default host of the sample service.
	DefaultHost = "secretmanager.googleapis.com"
	// Package is the package of the sample API.
	Package = "google.cloud.secretmanager.v1"
)
View Source
const (
	// LibrarianVersion is the librarian version used in [Config].
	LibrarianVersion = "v0.1.0"
	// 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"
	// InitialLegacyRustTag is the tag form of [InitialVersion] for use in
	// tests of the legacy Rust behavior where each release has a single tag.
	InitialLegacyRustTag = "v1.0.0"
	// InitialSwiftTag is the tag form of [InitialVersion] for use in
	// tests of the Swift behavior where each release has a single tag.
	InitialSwiftTag = "preview-20260809"
	// InitialLib1Tag is the tag form of [Lib1Name] [InitialVersion] for use in
	// tests.
	InitialLib1Tag = "google-cloud-storage/v1.0.0"
	// InitialLib2Tag is the tag form of [Lib2Name] [InitialVersion] for use in
	// tests.
	InitialLib2Tag = "gax-internal/v1.0.0"
	// NextLib1Tag is the tag form of [Lib1Name] [NextVersion] for use in
	// tests.
	NextLib1Tag = "google-cloud-storage/v1.1.0"
	// NextLib2Tag is the tag form of [Lib2Name] [NextVersion] for use in
	// tests.
	NextLib2Tag = "gax-internal/v1.1.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"
	// 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"
	// SwiftNonGAVersion is a non-GA client library version typical of a Swift
	// client library.
	SwiftNonGAVersion = "0.1.0-preview"
	// SwiftNextNonGAVersion is the next version of non-GA Swift client library
	// starting from [RustNonGAVersion].
	SwiftNextNonGAVersion = "0.2.0-preview"
)

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 API added in v0.8.1

func API() *api.API

API returns a sample API.

func Automatic added in v0.8.1

func Automatic() *api.Message

Automatic returns a sample automatic.

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 CreateRequest added in v0.8.1

func CreateRequest() *api.Message

CreateRequest returns a sample create request.

func CustomerManagedEncryption added in v0.8.1

func CustomerManagedEncryption() *api.Message

CustomerManagedEncryption returns a sample customer managed encryption.

func EnumState added in v0.8.1

func EnumState() *api.Enum

EnumState returns a sample enum state.

func ListSecretVersionsRequest added in v0.8.1

func ListSecretVersionsRequest() *api.Message

ListSecretVersionsRequest returns a sample list secret versions request.

func ListSecretVersionsResponse added in v0.8.1

func ListSecretVersionsResponse() *api.Message

ListSecretVersionsResponse returns a sample list secret versions response.

func MethodAddSecretVersion added in v0.8.1

func MethodAddSecretVersion() *api.Method

MethodAddSecretVersion returns a sample add secret version method.

func MethodCreate added in v0.8.1

func MethodCreate() *api.Method

MethodCreate returns a sample create method.

func MethodListSecretVersions added in v0.8.1

func MethodListSecretVersions() *api.Method

MethodListSecretVersions returns a sample list secret versions method.

func MethodUpdate added in v0.8.1

func MethodUpdate() *api.Method

MethodUpdate returns a sample update method.

func Replication added in v0.8.1

func Replication() *api.Message

Replication returns a sample replication.

func RepoMetadata added in v0.8.4

func RepoMetadata() *repometadata.RepoMetadata

RepoMetadata returns a sample repometadata.RepoMetadata. The Language field is left empty so callers can set it for their specific language.

func Secret added in v0.8.1

func Secret() *api.Message

Secret returns a sample secret.

func SecretPayload added in v0.8.1

func SecretPayload() *api.Message

SecretPayload returns a sample secret payload.

func SecretVersion added in v0.8.1

func SecretVersion() *api.Message

SecretVersion returns a sample secret version.

func Service added in v0.8.1

func Service() *api.Service

Service returns a sample service.

func ServiceConfig added in v0.8.1

func ServiceConfig() *serviceconfig.Service

ServiceConfig returns a sample service config.

func UpdateRequest added in v0.8.1

func UpdateRequest() *api.Message

UpdateRequest returns a sample update request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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