Documentation
¶
Index ¶
- Variables
- type Config
- type GeneratorMode
- type InstrumentedInterface
- func (ii *InstrumentedInterface) Imports() []string
- func (ii *InstrumentedInterface) Methods() (methods []*Method)
- func (ii *InstrumentedInterface) MetricHelp() string
- func (ii *InstrumentedInterface) MetricHistHelp() string
- func (ii *InstrumentedInterface) MetricHistName() string
- func (ii *InstrumentedInterface) MetricName() string
- func (ii *InstrumentedInterface) Package() string
- func (ii *InstrumentedInterface) PackagePrefix() string
- func (ii *InstrumentedInterface) PrintType(t types.Type) string
- func (ii *InstrumentedInterface) PrintTypeName(t *types.TypeName) string
- type Method
- func (m *Method) IsHandler() bool
- func (m *Method) ParamsWithTypes() (str string)
- func (m *Method) ParamsWithoutTypes() (str string)
- func (m *Method) ResultTypes() (str string)
- func (m *Method) ResultsWithoutTypes() (str string)
- func (m *Method) ReturnsError() bool
- func (m *Method) ReturnsHTTPResponse() bool
Constants ¶
This section is empty.
Variables ¶
View Source
var SupportedModes = []GeneratorMode{Binary, Handler, OapiCodeGenClient}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type GeneratorMode ¶
type GeneratorMode string
const ( // Binary mode can generate instrumented code for an interface which methods return an error as the last argument. // With respect to the value of the error (nil or not nil), the corresponding counter in the counter vector will be increased. Binary GeneratorMode = "binary" // Handler can generate instrumented wrappers around a typical http server interface. // Each method is a http.HandlerFunc `func(w http.ResponseWriter, r *http.Request)`. // Extensions with more parameters after the `*http.Request` are also possible. // This way server code generated by https://github.com/deepmap/oapi-codegen can be instrumented. Handler GeneratorMode = "handler" // OapiCodeGenClient mode generates instrumented code from the client interface generated by https://github.com/deepmap/oapi-codegen. // See https://github.com/deepmap/oapi-codegen#generated-client-boilerplate. OapiCodeGenClient GeneratorMode = "oapi-codegen-client" )
type InstrumentedInterface ¶
type InstrumentedInterface struct { *pkg.Interface InstrumentedTypeName string // contains filtered or unexported fields }
func (*InstrumentedInterface) Imports ¶
func (ii *InstrumentedInterface) Imports() []string
func (*InstrumentedInterface) Methods ¶
func (ii *InstrumentedInterface) Methods() (methods []*Method)
func (*InstrumentedInterface) MetricHelp ¶
func (ii *InstrumentedInterface) MetricHelp() string
func (*InstrumentedInterface) MetricHistHelp ¶
func (ii *InstrumentedInterface) MetricHistHelp() string
func (*InstrumentedInterface) MetricHistName ¶
func (ii *InstrumentedInterface) MetricHistName() string
func (*InstrumentedInterface) MetricName ¶
func (ii *InstrumentedInterface) MetricName() string
func (*InstrumentedInterface) Package ¶
func (ii *InstrumentedInterface) Package() string
func (*InstrumentedInterface) PackagePrefix ¶
func (ii *InstrumentedInterface) PackagePrefix() string
func (*InstrumentedInterface) PrintType ¶
func (ii *InstrumentedInterface) PrintType(t types.Type) string
func (*InstrumentedInterface) PrintTypeName ¶
func (ii *InstrumentedInterface) PrintTypeName(t *types.TypeName) string
type Method ¶
func (*Method) ParamsWithTypes ¶
func (*Method) ParamsWithoutTypes ¶
func (*Method) ResultTypes ¶
func (*Method) ResultsWithoutTypes ¶
func (*Method) ReturnsError ¶
func (*Method) ReturnsHTTPResponse ¶
Click to show internal directories.
Click to hide internal directories.