Documentation
¶
Index ¶
- type PermissionsComponent
- func (f *PermissionsComponent) Close() error
- func (f *PermissionsComponent) DoGetHTTPServer(bindAddr string, router http.Handler) service.HTTPServer
- func (f *PermissionsComponent) DoGetHealthcheckOk(cfg *config.Config, buildTime string, gitCommit string, version string) (service.HealthChecker, error)
- func (f *PermissionsComponent) DoGetMongoDB(ctx context.Context, cfg *config.Config) (service.PermissionsStore, error)
- func (f *PermissionsComponent) InitialiseService() (http.Handler, error)
- func (f *PermissionsComponent) RegisterSteps(ctx *godog.ScenarioContext)
- func (f *PermissionsComponent) Reset() *PermissionsComponent
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
// contains filtered or unexported fields
}
PermissionsComponent holds the initialized http server, mongo client and configs required for running component tests.
func NewPermissionsComponent ¶
func NewPermissionsComponent(mongoFeature *componenttest.MongoFeature) (*PermissionsComponent, error)
NewPermissionsComponent initializes mock server and inmemory mongodb used for running component tests.
func (*PermissionsComponent) Close ¶
func (f *PermissionsComponent) Close() error
func (*PermissionsComponent) DoGetHTTPServer ¶
func (f *PermissionsComponent) DoGetHTTPServer(bindAddr string, router http.Handler) service.HTTPServer
func (*PermissionsComponent) DoGetHealthcheckOk ¶
func (f *PermissionsComponent) DoGetHealthcheckOk(cfg *config.Config, buildTime string, gitCommit string, version string) (service.HealthChecker, error)
func (*PermissionsComponent) DoGetMongoDB ¶
func (f *PermissionsComponent) DoGetMongoDB(ctx context.Context, cfg *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)
func (*PermissionsComponent) Reset ¶
func (f *PermissionsComponent) Reset() *PermissionsComponent
Click to show internal directories.
Click to hide internal directories.