parametermanager

package
v0.0.0-...-e5ec0a4 Latest Latest
Warning

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

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

Documentation

Overview

Package parametermanager provides functionality to fetch configuration from Google Cloud Parameter Manager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client wraps the Parameter Manager service.

func NewClient

func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

NewClient creates a new Parameter Manager client.

func (*Client) FetchParameter

func (c *Client) FetchParameter(ctx context.Context, projectID, location, parameterName, version string) (*Resource, error)

FetchParameter is a high-level function to fetch a parameter. It resolves the latest version if version is empty.

type Resource

type Resource struct {
	Data    string
	Version string
}

Resource represents a fetched parameter configuration.

func FetchParameter

func FetchParameter(ctx context.Context, client *Client, projectID, location, parameterName, version string) (*Resource, error)

FetchParameter is a convenience function that creates a new client and fetches the parameter. If client is provided, it will be used. If client is nil, a new client is created for this call. For applications that need to fetch multiple parameters, it is more performant to create a single client using NewClient and reuse it for all calls.

Jump to

Keyboard shortcuts

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