Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
func ParseConfig ¶
type Configurator ¶
Configurator represents a function allowing to configure the Gin engine and the HTTP server. NOTE: Use this method only to configure either the router or the server, and NOT to register routes. Those will be registered using the various registrars set inside the module.
type Context ¶
type Context struct { registrar.Context GRPCConnection *grpc.ClientConn }
Context contains all the useful data that might be used when registering an API handler
func NewContext ¶
func NewContext(ctx registrar.Context, grpcConnection *grpc.ClientConn) Context
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module represents the module allowing to register custom API endpoints
func (*Module) Logger ¶
func (m *Module) Logger() gin.HandlerFunc
Logger returns a Gin Handler function that logs endpoint calls using ZeroLog
func (*Module) RunAdditionalOperations ¶
RunAdditionalOperations implements modules.AdditionalOperationsModule
func (*Module) WithConfigurator ¶
func (m *Module) WithConfigurator(configurator Configurator) *Module
WithConfigurator allows setting the configurator to be used
func (*Module) WithRegistrar ¶
WithRegistrar allows setting the APIs registrar to be used
type Registrar ¶
Registrar represents a function that allows registering API endpoints
func CombinedRegistrar ¶
CombinedRegistrar returns a new Registrar combining the given API registrars together