Documentation
¶
Overview ¶
Package sample provides functionality for generating sample values of the types contained in the internal package for testing purposes.
Index ¶
- Constants
- Variables
- func API() *api.API
- func Automatic() *api.Message
- func Config() *config.Config
- func CreateRequest() *api.Message
- func CustomerManagedEncryption() *api.Message
- func EnumState() *api.Enum
- func ListSecretVersionsRequest() *api.Message
- func ListSecretVersionsResponse() *api.Message
- func MethodAddSecretVersion() *api.Method
- func MethodCreate() *api.Method
- func MethodListSecretVersions() *api.Method
- func MethodUpdate() *api.Method
- func PreviewConfig() *config.Config
- func Replication() *api.Message
- func Secret() *api.Message
- func SecretPayload() *api.Message
- func SecretVersion() *api.Message
- func Service() *api.Service
- func ServiceConfig() *serviceconfig.Service
- func UpdateRequest() *api.Message
Constants ¶
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" )
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 ¶
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 ¶
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
CreateRequest returns a sample create request.
func CustomerManagedEncryption ¶ added in v0.8.1
CustomerManagedEncryption returns a sample customer managed encryption.
func ListSecretVersionsRequest ¶ added in v0.8.1
ListSecretVersionsRequest returns a sample list secret versions request.
func ListSecretVersionsResponse ¶ added in v0.8.1
ListSecretVersionsResponse returns a sample list secret versions response.
func MethodAddSecretVersion ¶ added in v0.8.1
MethodAddSecretVersion returns a sample add secret version method.
func MethodCreate ¶ added in v0.8.1
MethodCreate returns a sample create method.
func MethodListSecretVersions ¶ added in v0.8.1
MethodListSecretVersions returns a sample list secret versions method.
func MethodUpdate ¶ added in v0.8.1
MethodUpdate returns a sample update method.
func PreviewConfig ¶
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
Replication returns a sample replication.
func SecretPayload ¶ added in v0.8.1
SecretPayload returns a sample secret payload.
func SecretVersion ¶ added in v0.8.1
SecretVersion returns a sample secret version.
func ServiceConfig ¶ added in v0.8.1
func ServiceConfig() *serviceconfig.Service
ServiceConfig returns a sample service config.
func UpdateRequest ¶ added in v0.8.1
UpdateRequest returns a sample update request.
Types ¶
This section is empty.