Documentation ¶
Index ¶
- Variables
- func NewAES() *aes.Config
- func NewCompressor(err error) compress.Compressor
- func NewEd25519() *ed25519.Config
- func NewHMAC() *hmac.Config
- func NewHook() *hooks.Config
- func NewInputConfig(flag string) *cmd.InputConfig
- func NewInsecureConfig() *tls.Config
- func NewInsecureDebugConfig() *debug.Config
- func NewInsecureTransportConfig() *transport.Config
- func NewLimiterConfig(kind, interval string, tokens uint64) *limiter.Config
- func NewLogger(lc fx.Lifecycle) *zap.Logger
- func NewMarshaller(err error) encoding.Marshaller
- func NewMeter(lc fx.Lifecycle, c *metrics.Config) metric.Meter
- func NewOTLPMeter(lc fx.Lifecycle) metric.Meter
- func NewOTLPMetricsConfig() *metrics.Config
- func NewOTLPTracerConfig() *tracer.Config
- func NewOutputConfig(flag string) *cmd.OutputConfig
- func NewPGConfig() *pg.Config
- func NewPrometheusMeter(lc fx.Lifecycle) metric.Meter
- func NewPrometheusMetricsConfig() *metrics.Config
- func NewRSA() *rsa.Config
- func NewRedisConfig(secret, compressor, marshaller string) *redis.Config
- func NewRetry() *retry.Config
- func NewSSH() *ssh.Config
- func NewSecureDebugConfig() *debug.Config
- func NewSecureTransportConfig() *transport.Config
- func NewTLSClientConfig() *tls.Config
- func NewTLSConfig(c, k string) *tls.Config
- func NewTLSServerConfig() *tls.Config
- func NewToken() *token.Config
- func Path(p string) string
- func Port() string
- func ProtobufSayHello(_ context.Context, r *v1.SayHelloRequest) (*v1.SayHelloResponse, error)
- func Test(ctx context.Context) meta.Valuer
- func WithTest(ctx context.Context, value meta.Valuer) context.Context
- type Cache
- type Client
- type Generator
- type InvalidMeter
- func (InvalidMeter) Float64Counter(string, ...metric.Float64CounterOption) (metric.Float64Counter, error)
- func (InvalidMeter) Float64Gauge(string, ...metric.Float64GaugeOption) (metric.Float64Gauge, error)
- func (InvalidMeter) Float64Histogram(string, ...metric.Float64HistogramOption) (metric.Float64Histogram, error)
- func (InvalidMeter) Float64ObservableCounter(string, ...metric.Float64ObservableCounterOption) (metric.Float64ObservableCounter, error)
- func (InvalidMeter) Float64ObservableGauge(string, ...metric.Float64ObservableGaugeOption) (metric.Float64ObservableGauge, error)
- func (InvalidMeter) Float64ObservableUpDownCounter(string, ...metric.Float64ObservableUpDownCounterOption) (metric.Float64ObservableUpDownCounter, error)
- func (InvalidMeter) Float64UpDownCounter(string, ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error)
- func (InvalidMeter) Int64Counter(string, ...metric.Int64CounterOption) (metric.Int64Counter, error)
- func (InvalidMeter) Int64Gauge(string, ...metric.Int64GaugeOption) (metric.Int64Gauge, error)
- func (InvalidMeter) Int64Histogram(string, ...metric.Int64HistogramOption) (metric.Int64Histogram, error)
- func (InvalidMeter) Int64ObservableCounter(string, ...metric.Int64ObservableCounterOption) (metric.Int64ObservableCounter, error)
- func (InvalidMeter) Int64ObservableGauge(string, ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error)
- func (InvalidMeter) Int64ObservableUpDownCounter(string, ...metric.Int64ObservableUpDownCounterOption) (metric.Int64ObservableUpDownCounter, error)
- func (InvalidMeter) Int64UpDownCounter(string, ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error)
- func (InvalidMeter) RegisterCallback(metric.Callback, ...metric.Observable) (metric.Registration, error)
- type PageData
- type Request
- type Response
- type Server
- type Service
- type Shutdowner
- type Todo
- type Verifier
Constants ¶
This section is empty.
Variables ¶
var ( // Environment for test. Environment = env.Environment("dev") // Version for test. Version = env.Version("1.0.0") // Name for test. Name = env.Name("test") // UserAgent for test. UserAgent = env.UserAgent(string(Name) + "/" + string(Version)) )
var ( //go:embed views/hello.tmpl.html //go:embed views/error.tmpl.html Views embed.FS // Model for test. Model = PageData{ Title: "My TODO list", Todos: []Todo{ {Title: "Task 1", Done: false}, {Title: "Task 2", Done: true}, {Title: "Task 3", Done: true}, }, } )
var Compressor = compress.NewMap()
Compressor for tests.
var ErrInvalidToken = errors.New("invalid token")
ErrInvalidToken ...
var Marshaller = encoding.NewMap()
Marshaller for tests.
Functions ¶
func NewCompressor ¶ added in v1.57.3
func NewCompressor(err error) compress.Compressor
NewCompressor for test.
func NewInputConfig ¶ added in v1.186.0
func NewInputConfig(flag string) *cmd.InputConfig
NewInputConfig for test.
func NewInsecureConfig ¶ added in v1.174.0
NewSecureClientConfig for test.
func NewInsecureDebugConfig ¶ added in v1.154.7
NewInsecureDebugConfig for test.
func NewInsecureTransportConfig ¶ added in v1.113.0
NewInsecureTransportConfig for test.
func NewLimiterConfig ¶ added in v1.166.0
NewLimiterConfig for test.
func NewMarshaller ¶ added in v1.57.3
func NewMarshaller(err error) encoding.Marshaller
NewMarshaller for test.
func NewOTLPMeter ¶ added in v1.172.0
NewOTLPMeter for test.
func NewOTLPMetricsConfig ¶ added in v1.152.0
NewOTLPMetricsConfig for test.
func NewOTLPTracerConfig ¶ added in v1.152.0
NewOTLPTracerConfig for test.
func NewOutputConfig ¶ added in v1.186.0
func NewOutputConfig(flag string) *cmd.OutputConfig
NewOutputConfig for test.
func NewPrometheusMeter ¶ added in v1.172.0
NewPrometheusMeter for test.
func NewPrometheusMetricsConfig ¶ added in v1.152.0
NewPrometheusMetricsConfig for test.
func NewRedisConfig ¶ added in v1.76.0
NewRedisConfig for test.
func NewSecureDebugConfig ¶ added in v1.154.7
NewInsecureDebugConfig for test.
func NewSecureTransportConfig ¶ added in v1.113.0
NewSecureTransportConfig for test.
func NewTLSClientConfig ¶ added in v1.180.0
NewTLSClientConfig for test.
func NewTLSConfig ¶ added in v1.180.0
NewTLSConfig for test.
func NewTLSServerConfig ¶ added in v1.180.0
NewTLSServerConfig for test.
func ProtobufSayHello ¶ added in v1.245.0
func ProtobufSayHello(_ context.Context, r *v1.SayHelloRequest) (*v1.SayHelloResponse, error)
Types ¶
type Cache ¶ added in v1.172.2
type Cache struct { Lifecycle fx.Lifecycle Redis *redis.Config Logger *zap.Logger Tracer *tracer.Config Meter metric.Meter }
Cache for test.
func (*Cache) NewRedisCache ¶ added in v1.172.2
NewRedisCache for test.
func (*Cache) NewRedisClient ¶ added in v1.172.2
NewRedisClient for test.
func (*Cache) NewRistrettoCache ¶ added in v1.172.2
NewRistrettoCache for test.
type Client ¶ added in v1.172.2
type Client struct { Lifecycle fx.Lifecycle Logger *zap.Logger Tracer *tracer.Config Transport *transport.Config TLS *tls.Config RoundTripper http.RoundTripper Meter metric.Meter Generator token.Generator Compression bool H2C bool }
Client for test.
func (*Client) NewGRPC ¶ added in v1.172.2
func (c *Client) NewGRPC() *grpc.ClientConn
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
NewGenerator for test.
type InvalidMeter ¶ added in v1.161.0
InvalidMeter for test.
func (InvalidMeter) Float64Counter ¶ added in v1.161.0
func (InvalidMeter) Float64Counter(string, ...metric.Float64CounterOption) (metric.Float64Counter, error)
func (InvalidMeter) Float64Gauge ¶ added in v1.200.0
func (InvalidMeter) Float64Gauge(string, ...metric.Float64GaugeOption) (metric.Float64Gauge, error)
func (InvalidMeter) Float64Histogram ¶ added in v1.161.0
func (InvalidMeter) Float64Histogram(string, ...metric.Float64HistogramOption) (metric.Float64Histogram, error)
func (InvalidMeter) Float64ObservableCounter ¶ added in v1.161.0
func (InvalidMeter) Float64ObservableCounter(string, ...metric.Float64ObservableCounterOption) (metric.Float64ObservableCounter, error)
func (InvalidMeter) Float64ObservableGauge ¶ added in v1.161.0
func (InvalidMeter) Float64ObservableGauge(string, ...metric.Float64ObservableGaugeOption) (metric.Float64ObservableGauge, error)
func (InvalidMeter) Float64ObservableUpDownCounter ¶ added in v1.161.0
func (InvalidMeter) Float64ObservableUpDownCounter(string, ...metric.Float64ObservableUpDownCounterOption) (metric.Float64ObservableUpDownCounter, error)
func (InvalidMeter) Float64UpDownCounter ¶ added in v1.161.0
func (InvalidMeter) Float64UpDownCounter(string, ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error)
func (InvalidMeter) Int64Counter ¶ added in v1.161.0
func (InvalidMeter) Int64Counter(string, ...metric.Int64CounterOption) (metric.Int64Counter, error)
func (InvalidMeter) Int64Gauge ¶ added in v1.200.0
func (InvalidMeter) Int64Gauge(string, ...metric.Int64GaugeOption) (metric.Int64Gauge, error)
func (InvalidMeter) Int64Histogram ¶ added in v1.161.0
func (InvalidMeter) Int64Histogram(string, ...metric.Int64HistogramOption) (metric.Int64Histogram, error)
func (InvalidMeter) Int64ObservableCounter ¶ added in v1.161.0
func (InvalidMeter) Int64ObservableCounter(string, ...metric.Int64ObservableCounterOption) (metric.Int64ObservableCounter, error)
func (InvalidMeter) Int64ObservableGauge ¶ added in v1.161.0
func (InvalidMeter) Int64ObservableGauge(string, ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error)
func (InvalidMeter) Int64ObservableUpDownCounter ¶ added in v1.161.0
func (InvalidMeter) Int64ObservableUpDownCounter(string, ...metric.Int64ObservableUpDownCounterOption) (metric.Int64ObservableUpDownCounter, error)
func (InvalidMeter) Int64UpDownCounter ¶ added in v1.161.0
func (InvalidMeter) Int64UpDownCounter(string, ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error)
func (InvalidMeter) RegisterCallback ¶ added in v1.161.0
func (InvalidMeter) RegisterCallback(metric.Callback, ...metric.Observable) (metric.Registration, error)
type Response ¶ added in v1.241.0
func ErrorSayHello ¶ added in v1.245.0
type Server ¶
type Server struct { Lifecycle fx.Lifecycle Meter metric.Meter Verifier token.Verifier Mux *http.ServeMux HTTP *th.Server GRPC *tg.Server Transport *transport.Config Tracer *tracer.Config Limiter limiter.Store Key lm.KeyFunc Logger *zap.Logger VerifyAuth bool }
Server for test.
type Service ¶ added in v1.172.2
type Service struct { v1.UnimplementedGreeterServiceServer // contains filtered or unexported fields }
Service ...
func (*Service) SayHello ¶ added in v1.172.2
func (s *Service) SayHello(ctx context.Context, req *v1.SayHelloRequest) (*v1.SayHelloResponse, error)
SayHello ...
func (*Service) SayStreamHello ¶ added in v1.172.2
func (s *Service) 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