test

package
v1.86.37 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Unlicense Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

ErrInvalidToken ...

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

Version for test.

Functions

func GenerateRandomPort added in v1.26.0

func GenerateRandomPort() string

GenerateRandomPort 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 NewGRPCClient added in v1.65.5

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

NewGRPCClient for test.

func NewGRPCServer added in v1.65.5

func NewGRPCServer(
	lc fx.Lifecycle, logger *zap.Logger, cfg *otel.Config, tcfg *transport.Config,
	verifyAuth bool, 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 *otel.Config, tcfg *transport.Config) *http.Client

NewHTTPClient for test.

func NewHTTPClientWithRoundTripper added in v1.30.0

func NewHTTPClientWithRoundTripper(lc fx.Lifecycle, logger *zap.Logger, cfg *otel.Config, tcfg *transport.Config, roundTripper http.RoundTripper) *http.Client

NewHTTPClientWithRoundTripper for test.

func NewHTTPServer added in v1.65.5

func NewHTTPServer(lc fx.Lifecycle, logger *zap.Logger, cfg *otel.Config, tcfg *transport.Config) *shttp.Server

NewHTTPServer 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 NewOTELConfig added in v1.86.0

func NewOTELConfig() *otel.Config

NewOTELConfig 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) *cache.Cache

NewRedisCache for test.

func NewRedisClient added in v1.75.0

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

NewRedisClient for test.

func NewRedisConfig added in v1.76.0

func NewRedisConfig(host string) *redis.Config

NewRedisConfig for test.

func NewRistrettoCache added in v1.66.0

func NewRistrettoCache(lc fx.Lifecycle) *ristretto.Cache

NewRistrettoCache for test.

func NewTransportConfig added in v1.70.0

func NewTransportConfig() *transport.Config

NewTransportConfig for test.

func RegisterTransport added in v1.70.0

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

RegisterTransport for test.

Types

type Config added in v1.71.0

type Config struct{}

Config for test.

func (*Config) Auth0Config added in v1.71.0

func (cfg *Config) Auth0Config() *auth0.Config

func (*Config) GRPCConfig added in v1.71.0

func (cfg *Config) GRPCConfig() *grpc.Config

func (*Config) HTTPConfig added in v1.71.0

func (cfg *Config) HTTPConfig() *http.Config

func (*Config) NSQConfig added in v1.71.0

func (cfg *Config) NSQConfig() *nsq.Config

func (*Config) PGConfig added in v1.71.0

func (cfg *Config) PGConfig() *pg.Config

func (*Config) RedisConfig added in v1.71.0

func (cfg *Config) RedisConfig() *redis.Config

func (*Config) RistrettoConfig added in v1.71.0

func (cfg *Config) RistrettoConfig() *ristretto.Config

func (*Config) TransportConfig added in v1.71.0

func (cfg *Config) TransportConfig() *transport.Config

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(_ context.Context) ([]byte, error)

type Handler added in v1.14.0

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

Handler for test.

func NewHandler added in v1.14.0

func NewHandler(err error) *Handler

NewHandler for test.

func (*Handler) Handle added in v1.14.0

func (h *Handler) Handle(ctx context.Context, m *message.Message) error

func (*Handler) Message added in v1.14.0

func (h *Handler) Message() *message.Message

type Migrator added in v1.66.4

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

Migrator for test.

func NewMigrator added in v1.66.4

func NewMigrator() *Migrator

NewMigrator for test.

func (*Migrator) Drop added in v1.66.4

func (m *Migrator) Drop() error

Drop the DB.

func (*Migrator) Up added in v1.66.4

func (m *Migrator) Up() error

Up to latest version.

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(_ context.Context, token []byte) (*jwt.Token, *jwt.RegisteredClaims, 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