Documentation ¶
Index ¶
- Constants
- func Init(logger *loggerpkg.Logger, server echoswagger.ApiRoot, waspVersion string, ...)
- type APIGroupModifier
- func (p *APIGroupModifier) Add(method, path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
- func (p *APIGroupModifier) CallOverrideHandler(api echoswagger.Api) echoswagger.Api
- func (p *APIGroupModifier) DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
- func (p *APIGroupModifier) EchoGroup() *echo.Group
- func (p *APIGroupModifier) GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
- func (p *APIGroupModifier) HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
- func (p *APIGroupModifier) OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
- func (p *APIGroupModifier) PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
- func (p *APIGroupModifier) POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
- func (p *APIGroupModifier) PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
- func (p *APIGroupModifier) SetDescription(desc string) echoswagger.ApiGroup
- func (p *APIGroupModifier) SetExternalDocs(desc, url string) echoswagger.ApiGroup
- func (p *APIGroupModifier) SetSecurity(names ...string) echoswagger.ApiGroup
- func (p *APIGroupModifier) SetSecurityWithScope(s map[string][]string) echoswagger.ApiGroup
- type Mocker
Constants ¶
const APIVersion = 1
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init( logger *loggerpkg.Logger, server echoswagger.ApiRoot, waspVersion string, config *configuration.Configuration, networkProvider peering.NetworkProvider, trustedNetworkManager peering.TrustedNetworkManager, userManager *userspkg.UserManager, chainRecordRegistryProvider registry.ChainRecordRegistryProvider, dkShareRegistryProvider registry.DKShareRegistryProvider, nodeIdentityProvider registry.NodeIdentityProvider, chainsProvider chains.Provider, dkgNodeProvider dkg.NodeProvider, shutdownHandler *shutdown.ShutdownHandler, chainMetricsProvider *metrics.ChainMetricsProvider, authConfig authentication.AuthConfiguration, nodeOwnerAddresses []string, requestCacheTTL time.Duration, websocketService *websocket.Service, pub *publisher.Publisher, debugRequestLoggerEnabled bool, )
Types ¶
type APIGroupModifier ¶ added in v1.0.3
type APIGroupModifier struct { OverrideHandler func(api echoswagger.Api) // contains filtered or unexported fields }
APIGroupModifier is required as it is impossible with echoSwagger to define a group with mixed authentication rules. Most of our routes are protected but very few are not.
While it is possible to create two different groups such as (chainAdm, chainPub), this will pollute the code generation and the documentation itself, as it will create empty groups for controllers that define no public routes, duplicate code files and increase the client lib size even further
Furthermore, it's forbidden to create two groups with the same name to support two different authentication rules. This wrapper adds modifiers to each route that it is assigned to. See: api.go -> loadControllers
func (*APIGroupModifier) Add ¶ added in v1.0.3
func (p *APIGroupModifier) Add(method, path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
func (*APIGroupModifier) CallOverrideHandler ¶ added in v1.0.3
func (p *APIGroupModifier) CallOverrideHandler(api echoswagger.Api) echoswagger.Api
func (*APIGroupModifier) DELETE ¶ added in v1.0.3
func (p *APIGroupModifier) DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
func (*APIGroupModifier) EchoGroup ¶ added in v1.0.3
func (p *APIGroupModifier) EchoGroup() *echo.Group
func (*APIGroupModifier) GET ¶ added in v1.0.3
func (p *APIGroupModifier) GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
func (*APIGroupModifier) HEAD ¶ added in v1.0.3
func (p *APIGroupModifier) HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
func (*APIGroupModifier) OPTIONS ¶ added in v1.0.3
func (p *APIGroupModifier) OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
func (*APIGroupModifier) PATCH ¶ added in v1.0.3
func (p *APIGroupModifier) PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
func (*APIGroupModifier) POST ¶ added in v1.0.3
func (p *APIGroupModifier) POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
func (*APIGroupModifier) PUT ¶ added in v1.0.3
func (p *APIGroupModifier) PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echoswagger.Api
func (*APIGroupModifier) SetDescription ¶ added in v1.0.3
func (p *APIGroupModifier) SetDescription(desc string) echoswagger.ApiGroup
func (*APIGroupModifier) SetExternalDocs ¶ added in v1.0.3
func (p *APIGroupModifier) SetExternalDocs(desc, url string) echoswagger.ApiGroup
func (*APIGroupModifier) SetSecurity ¶ added in v1.0.3
func (p *APIGroupModifier) SetSecurity(names ...string) echoswagger.ApiGroup
func (*APIGroupModifier) SetSecurityWithScope ¶ added in v1.0.3
func (p *APIGroupModifier) SetSecurityWithScope(s map[string][]string) echoswagger.ApiGroup
type Mocker ¶ added in v1.0.3
type Mocker struct {
// contains filtered or unexported fields
}
func (*Mocker) LoadMockFiles ¶ added in v1.0.3
func (m *Mocker) LoadMockFiles()