Documentation ¶
Index ¶
- func Inline(t *testing.T, skip int, msgAndArgs ...interface{}) (string, bool)
- func InlineFloat64(t *testing.T, skip int) (float64, bool)
- func InlineInt(t *testing.T, skip int) (int, bool)
- func InlineJSON(t *testing.T, skip int, target interface{})
- type HTTPClient
- type HTTPClientOption
- type Option
- type Server
- func (s *Server) AddService(service Service)
- func (s *Server) AddServices(services ...Service)
- func (s *Server) Config() *viper.Viper
- func (s *Server) Context() context.Context
- func (s *Server) GetService(name string) Service
- func (s *Server) Logger() *zap.Logger
- func (s *Server) Meter() metric.Meter
- func (s *Server) Start()
- func (s *Server) Tracer() trace.Tracer
- type Service
- type ServiceHTTP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InlineJSON ¶
Types ¶
type HTTPClient ¶
func NewHTTPClient ¶
func NewHTTPClient(opts ...HTTPClientOption) *HTTPClient
type HTTPClientOption ¶
type HTTPClientOption func(c *HTTPClient)
func HTTPClientWithBaseURL ¶
func HTTPClientWithBaseURL(v string) HTTPClientOption
func HTTPClientWithCookieJar ¶
func HTTPClientWithCookieJar(v *cookiejar.Jar) HTTPClientOption
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AddService ¶
AddService add a single service
func (*Server) AddServices ¶
AddServices adds multiple service
func (*Server) GetService ¶
type Service ¶
type Service interface { URL() string Name() string Start(ctx context.Context) error Close(ctx context.Context) error }
Service interface
type ServiceHTTP ¶
type ServiceHTTP struct {
// contains filtered or unexported fields
}
ServiceHTTP struct
func NewServiceHTTP ¶
func NewServiceHTTP(l *zap.Logger, name string, handler http.Handler, middlewares ...middleware.Middleware) *ServiceHTTP
func (*ServiceHTTP) Logger ¶
func (s *ServiceHTTP) Logger() *zap.Logger
func (*ServiceHTTP) Name ¶
func (s *ServiceHTTP) Name() string
func (*ServiceHTTP) URL ¶
func (s *ServiceHTTP) URL() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.