test

package
v1.146.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Environment = env.Environment("dev")

Environment for test.

View Source
var ErrInvalidToken = errors.New("invalid token")

ErrInvalidToken ...

View Source
var Version = version.Version("1.0.0")

Version for test.

Functions

func NewBaselimeTracerConfig added in v1.128.0

func NewBaselimeTracerConfig() *tracer.Config

NewBaselimeTracerConfig for test.

func NewCmdConfig added in v1.80.0

func NewCmdConfig(flag string) (*cmd.Config, error)

NewCmdConfig for test.

func NewCompressor added in v1.57.3

func NewCompressor(err error) compressor.Compressor

NewCompressor for test.

func NewDebugConfig added in v1.112.0

func NewDebugConfig() *debug.Config

NewDebugConfig for test.

func NewDefaultTracerConfig added in v1.128.0

func NewDefaultTracerConfig() *tracer.Config

NewDefaultTracerConfig for test.

func NewGRPCClient added in v1.65.5

func NewGRPCClient(
	ctx context.Context, lc fx.Lifecycle, logger *zap.Logger,
	tcfg *transport.Config, ocfg *tracer.Config,
	cred credentials.PerRPCCredentials,
	meter metric.Meter,
) *grpc.ClientConn

NewGRPCClient for test.

func NewGRPCServer added in v1.65.5

func NewGRPCServer(
	lc fx.Lifecycle, logger *zap.Logger, cfg *tracer.Config, tcfg *transport.Config,
	verifyAuth bool, meter metric.Meter,
	unary []grpc.UnaryServerInterceptor, stream []grpc.StreamServerInterceptor,
) *tgrpc.Server

NewGRPCServer for test.

func NewHTTPClient added in v1.30.0

func NewHTTPClient(lc fx.Lifecycle, logger *zap.Logger, cfg *tracer.Config, tcfg *transport.Config, meter metric.Meter) *http.Client

NewHTTPClient for test.

func NewHTTPClientWithRoundTripper added in v1.30.0

func NewHTTPClientWithRoundTripper(lc fx.Lifecycle, logger *zap.Logger, cfg *tracer.Config, tcfg *transport.Config, rt http.RoundTripper, meter metric.Meter) *http.Client

NewHTTPClientWithRoundTripper for test.

func NewHTTPServer added in v1.65.5

func NewHTTPServer(lc fx.Lifecycle, logger *zap.Logger, cfg *tracer.Config, tcfg *transport.Config, meter metric.Meter, handlers []negroni.Handler) *shttp.Server

NewHTTPServer for test.

func NewHook added in v1.138.0

func NewHook() *hooks.Config

NewHook for test.

func NewInsecureTransportConfig added in v1.113.0

func NewInsecureTransportConfig() *transport.Config

NewInsecureTransportConfig for test.

func NewLogger added in v1.66.0

func NewLogger(lc fx.Lifecycle) *zap.Logger

NewLogger for test.

func NewMarshaller added in v1.57.3

func NewMarshaller(err error) marshaller.Marshaller

NewMarshaller for test.

func NewPGConfig added in v1.66.4

func NewPGConfig() *pg.Config

NewPGConfig for test.

func NewRedisCache added in v1.65.4

func NewRedisCache(lc fx.Lifecycle, host string, logger *zap.Logger, compressor compressor.Compressor, marshaller marshaller.Marshaller, meter metric.Meter) *cache.Cache

NewRedisCache for test.

func NewRedisClient added in v1.75.0

func NewRedisClient(lc fx.Lifecycle, host string, logger *zap.Logger) gr.Client

NewRedisClient for test.

func NewRedisConfig added in v1.76.0

func NewRedisConfig(host string) *redis.Config

NewRedisConfig for test.

func NewRetry added in v1.134.0

func NewRetry() *retry.Config

NewRetry for test.

func NewRistrettoCache added in v1.66.0

func NewRistrettoCache(lc fx.Lifecycle, meter metric.Meter) ristretto.Cache

NewRistrettoCache for test.

func NewSecureClientConfig added in v1.131.0

func NewSecureClientConfig() *security.Config

NewSecureClientConfig for test.

func NewSecureGRPCClient added in v1.113.0

func NewSecureGRPCClient(
	ctx context.Context, lc fx.Lifecycle, logger *zap.Logger,
	tcfg *transport.Config, ocfg *tracer.Config,
	meter metric.Meter,
) *grpc.ClientConn

NewSecureGRPCClient for test.

func NewSecureTransportConfig added in v1.113.0

func NewSecureTransportConfig() *transport.Config

NewSecureTransportConfig for test.

func Port added in v1.87.2

func Port() string

Port for test.

func RegisterTransport added in v1.70.0

func RegisterTransport(lc fx.Lifecycle, gs *tgrpc.Server, hs *shttp.Server)

RegisterTransport for test.

func Test added in v1.108.0

func Test(ctx context.Context) meta.Valuer

Test retrieves sample info.

func WithTest added in v1.108.0

func WithTest(ctx context.Context, value meta.Valuer) context.Context

WithTest stores sample info.

Types

type Config added in v1.71.0

type Config struct {
	Events        events.Config `yaml:"events,omitempty" json:"events,omitempty" toml:"events,omitempty"`
	config.Config `yaml:",inline" json:",inline" toml:",inline"`
}

Config for test.

type Generator added in v1.32.3

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

Generator for test.

func NewGenerator added in v1.4.0

func NewGenerator(token string, err error) *Generator

NewGenerator for test.

func (*Generator) Generate added in v1.32.3

func (g *Generator) Generate(ctx context.Context) (context.Context, []byte, error)

type Server

type Server struct {
	v1.UnimplementedGreeterServiceServer
	// contains filtered or unexported fields
}

Server ...

func NewServer

func NewServer(verifyAuth bool) *Server

NewServer ...

func (*Server) SayHello

func (s *Server) SayHello(ctx context.Context, req *v1.SayHelloRequest) (*v1.SayHelloResponse, error)

SayHello ...

func (*Server) SayStreamHello

func (s *Server) SayStreamHello(stream v1.GreeterService_SayStreamHelloServer) error

SayStreamHello ...

type Shutdowner

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

func NewShutdowner

func NewShutdowner() *Shutdowner

func (*Shutdowner) Called added in v1.66.4

func (s *Shutdowner) Called() bool

func (*Shutdowner) Shutdown

func (s *Shutdowner) Shutdown(...fx.ShutdownOption) error

type Verifier added in v1.32.3

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

Verifier for test.

func NewVerifier added in v1.4.0

func NewVerifier(token string) *Verifier

NewVerifier for test.

func (*Verifier) Verify added in v1.32.3

func (v *Verifier) Verify(ctx context.Context, token []byte) (context.Context, error)

Directories

Path Synopsis
greet
v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.

Jump to

Keyboard shortcuts

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