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

api

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyAPIOptions

func ApplyAPIOptions(ctx context.Context, o *Options) []option.ClientOption

ApplyAPIOptions retorna os option.ClientOption da biblioteca google.golang.org/api baseados em Options.

func ConfigAdd

func ConfigAdd(path string)

ConfigAdd registers shared API-level GCP configuration keys under the given root path.

Types

type Options

type Options struct {
	ProjectID   string `config:"projectId"`
	Credentials struct {
		File string `config:"file"`
		JSON string `config:"json"`
	} `config:"credentials"`
	Endpoint     string        `config:"endpoint"`
	UseEmulator  bool          `config:"useEmulator"`
	EmulatorHost string        `config:"emulatorHost"`
	UserAgent    string        `config:"userAgent"`
	Scopes       []string      `config:"scopes"`
	Timeout      time.Duration `config:"timeout"`
	Proxy        string        `config:"proxy"`
	Retry        struct {
		MaxAttempts    int           `config:"maxAttempts"`
		InitialBackoff time.Duration `config:"initialBackoff"`
		MaxBackoff     time.Duration `config:"maxBackoff"`
		Multiplier     float64       `config:"multiplier"`
	} `config:"retry"`
}

Options holds shared API-level GCP client configuration.

func (*Options) ParseScopes

func (o *Options) ParseScopes() []string

ParseScopes splits comma-separated scopes.

Jump to

Keyboard shortcuts

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