testutil

package
v1.112.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyConfig

type EmptyConfig struct {
	Setting         string `mapstructure:"setting"`
	GrpcAddr        string `mapstructure:"grpc_address"`
	HttpAddr        string `mapstructure:"http_address"`
	DBName          string `mapstructure:"database_name"`
	ServicePassword string `mapstructure:"service_password"`
}

func (EmptyConfig) GRPCAddr

func (e EmptyConfig) GRPCAddr() string

func (EmptyConfig) HTTPAddr

func (e EmptyConfig) HTTPAddr() string

func (EmptyConfig) MetricsAddr added in v1.66.0

func (e EmptyConfig) MetricsAddr() string

An empty address keeps Boot from attaching a metrics server in tests.

func (EmptyConfig) Validate

func (e EmptyConfig) Validate() error

type InvalidConfig

type InvalidConfig struct {
	GrpcAddr string `mapstructure:"grpc_address"`
	DBName   string `mapstructure:"database_name"`
}

func (InvalidConfig) GRPCAddr

func (i InvalidConfig) GRPCAddr() string

func (InvalidConfig) Validate

func (i InvalidConfig) Validate() error

type TokenConfig added in v1.105.0

type TokenConfig struct {
	EmptyConfig `mapstructure:",squash"`
	ServiceAuth serviceauth.Config `mapstructure:",squash"`
}

TokenConfig is an EmptyConfig whose callers present a service token, as auth's and data-access's do: what config.Load requires a token of and config.LoadHosted does not.

func (TokenConfig) ServiceTokens added in v1.105.0

func (c TokenConfig) ServiceTokens() serviceauth.Config

Jump to

Keyboard shortcuts

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