Documentation ¶
Index ¶
- type PermissionsComponent
- func (f *PermissionsComponent) Close() error
- func (f *PermissionsComponent) DoGetAuthorisationMiddleware(ctx context.Context, cfg *authorisation.Config) (authorisation.Middleware, error)
- func (f *PermissionsComponent) DoGetHTTPServer(bindAddr string, router http.Handler) service.HTTPServer
- func (f *PermissionsComponent) DoGetHealthcheckOk(_ *config.Config, _, _, _ string) (service.HealthChecker, error)
- func (f *PermissionsComponent) DoGetMongoDB(_ context.Context, _ *config.Config) (service.PermissionsStore, error)
- func (f *PermissionsComponent) InitialiseService() (http.Handler, error)
- func (f *PermissionsComponent) RegisterSteps(ctx *godog.ScenarioContext)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PermissionsComponent ¶
type PermissionsComponent struct { ErrorFeature componenttest.ErrorFeature MongoClient *mongo.Mongo Config *config.Config HTTPServer *http.Server ServiceRunning bool APIFeature *componenttest.APIFeature AuthorisationMiddleware authorisation.Middleware // contains filtered or unexported fields }
PermissionsComponent holds the initialized http server, mongo client and configs required for running component tests.
func NewPermissionsComponent ¶
func NewPermissionsComponent(mongoURI string) (*PermissionsComponent, error)
NewPermissionsComponent initializes mock server and in-memory mongodb used for running component tests.
func (*PermissionsComponent) Close ¶
func (f *PermissionsComponent) Close() error
func (*PermissionsComponent) DoGetAuthorisationMiddleware ¶ added in v0.6.0
func (f *PermissionsComponent) DoGetAuthorisationMiddleware(ctx context.Context, cfg *authorisation.Config) (authorisation.Middleware, error)
DoGetAuthorisationMiddleware returns an authorisationMock.Middleware object
func (*PermissionsComponent) DoGetHTTPServer ¶
func (f *PermissionsComponent) DoGetHTTPServer(bindAddr string, router http.Handler) service.HTTPServer
func (*PermissionsComponent) DoGetHealthcheckOk ¶
func (f *PermissionsComponent) DoGetHealthcheckOk(_ *config.Config, _, _, _ string) (service.HealthChecker, error)
func (*PermissionsComponent) DoGetMongoDB ¶
func (f *PermissionsComponent) DoGetMongoDB(_ context.Context, _ *config.Config) (service.PermissionsStore, error)
DoGetMongoDB returns a MongoDB
func (*PermissionsComponent) InitialiseService ¶
func (f *PermissionsComponent) InitialiseService() (http.Handler, error)
func (*PermissionsComponent) RegisterSteps ¶
func (f *PermissionsComponent) RegisterSteps(ctx *godog.ScenarioContext)
Click to show internal directories.
Click to hide internal directories.