sample

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 7 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"
	// 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 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 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.

func Replication added in v0.8.1

func Replication() *api.Message

Replication returns a sample replication.

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