// NewMockClientFacade creates a new mock instance
703
func NewMockClientFacade(ctrl *gomock.Controller) *MockClientFacade {
	mock := &MockClientFacade{ctrl: ctrl}
	mock.recorder = &MockClientFacadeMockRecorder{mock}
	return mock
}
540873
func NewFacade(apiCaller base.APICaller) (Facade, error) {
	facade := migrationflag.NewFacade(apiCaller, watcher.NewNotifyWatcher)
	return facade, nil
}
594008
func NewMockNodeAPIClient(ctrl *gomock.Controller) *MockNodeAPIClient {
	mock := &MockNodeAPIClient{ctrl: ctrl}
	mock.recorder = &MockNodeAPIClientMockRecorder{mock}
	return mock
}
1222416
func NewMockInstanceConnector(ctrl *gomock.Controller) *MockInstanceConnector {
	mock := &MockInstanceConnector{ctrl: ctrl}
	mock.recorder = &MockInstanceConnectorMockRecorder{mock}
	return mock
}
1041721
func NewMockModelCache(ctrl *gomock.Controller) *MockModelCache {
	mock := &MockModelCache{ctrl: ctrl}
	mock.recorder = &MockModelCacheMockRecorder{mock}
	return mock
}
148402
func NewFacade(ctx facade.Context) (*API, error) {
	authorizer := ctx.Auth()
	if !authorizer.AuthClient() {
		return nil, common.ErrPerm
	}

	st := ctx.State()
	m, err := st.Model()
	if err != nil {
		return nil, errors.Trace(err)
	}

	return &API{
		authorizer: authorizer,
		backend:    getState(st, m),
	}, nil
}
472632
func NewMockAccessTokenStrategy(ctrl *gomock.Controller) *MockAccessTokenStrategy {
	mock := &MockAccessTokenStrategy{ctrl: ctrl}
	mock.recorder = &MockAccessTokenStrategyMockRecorder{mock}
	return mock
}
803554
func NewMockCAClient(orgName string, cryptoProvider core.CryptoSuite) (api.CAClient, error) {
	mcm := MockCAClient{}
	return &mcm, nil
}
1145164
func NewFacade(apiCaller base.APICaller) (Facade, error) {
	facade, err := undertaker.NewClient(apiCaller, watcher.NewNotifyWatcher)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return facade, nil
}
373042
func NewFacade(apiCaller base.APICaller) (Facade, error) {
	facade := credentialvalidator.NewFacade(apiCaller)
	return facade, nil
}
261671
func NewMockRbacV1Interface(ctrl *gomock.Controller) *MockRbacV1Interface {
	mock := &MockRbacV1Interface{ctrl: ctrl}
	mock.recorder = &MockRbacV1InterfaceMockRecorder{mock}
	return mock
}
543145
func NewFacadeV2(ctx facade.Context) (*APIv2, error) {
	api, err := newFacade(ctx)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return &APIv2{api}, nil
}
833121
func NewMockBuildsClient(ctrl *gomock.Controller) *MockBuildsClient {
	mock := &MockBuildsClient{ctrl: ctrl}
	mock.recorder = &MockBuildsClientMockRecorder{mock}
	return mock
}
713248
func NewHookContextFacade(st *state.State, unit *state.Unit) (interface{}, error) {
	up, err := st.UnitPayloads(unit)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return NewUnitFacade(up), nil
}
1251953
func NewMockConnector(ctrl *gomock.Controller) *MockConnector {
	mock := &MockConnector{ctrl: ctrl}
	mock.recorder = &MockConnectorMockRecorder{mock}
	return mock
}
113376
func NewMockSecretAPIClient(ctrl *gomock.Controller) *MockSecretAPIClient {
	mock := &MockSecretAPIClient{ctrl: ctrl}
	mock.recorder = &MockSecretAPIClientMockRecorder{mock}
	return mock
}
955125
func NewMockChannelConfig(ctx context.Client, channelID string) (*MockChannelConfig, error) {
	return &MockChannelConfig{channelID: channelID, ctx: ctx}, nil
}