// MockView is only used for plan related tests.
487199
func MockView() *model.TableInfo {
	selectStmt := "select b,c,d from t"
	col0 := &model.ColumnInfo{
		State:  model.StatePublic,
		Offset: 0,
		Name:   model.NewCIStr("b"),
		ID:     1,
	}
	col1 := &model.ColumnInfo{
		State:  model.StatePublic,
		Offset: 1,
		Name:   model.NewCIStr("c"),
		ID:     2,
	}
	col2 := &model.ColumnInfo{
		State:  model.StatePublic,
		Offset: 2,
		Name:   model.NewCIStr("d"),
		ID:     3,
	}
	view := &model.ViewInfo{SelectStmt: selectStmt, Security: model.SecurityDefiner, Definer: &auth.UserIdentity{Username: "root", Hostname: ""}, Cols: []model.CIStr{col0.Name, col1.Name, col2.Name}}
	table := &model.TableInfo{
		Name:    model.NewCIStr("v"),
		Columns: []*model.ColumnInfo{col0, col1, col2},
		View:    view,
	}
	return table
}
654223
func (m *MockCommonAPIClient) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) {
	ret := m.ctrl.Call(m, "ContainerList", ctx, options)
	ret0, _ := ret[0].([]types.Container)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
977936
func (s *Service) PutView(ctx context.Context, c *platform.View) error {
	if c.Properties == nil {
		c.Properties = platform.EmptyViewProperties{}
	}
	s.viewKV.Store(c.ID.String(), c)
	return nil
}
317926
func (m *MockAccessResponder) SetScopes(arg0 fosite.Arguments) {
	m.ctrl.Call(m, "SetScopes", arg0)
}
1149400
func (m *MockIndex) StructChan(arg0 chan struct{}) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "StructChan", arg0)
}
996073
func (m *MockImageAPIClient) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error) {
	ret := m.ctrl.Call(m, "ImageList", ctx, options)
	ret0, _ := ret[0].([]types.ImageSummary)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
748000
func (m *MockServiceAccountInterface) Watch(arg0 v11.ListOptions) (watch.Interface, error) {
	ret := m.ctrl.Call(m, "Watch", arg0)
	ret0, _ := ret[0].(watch.Interface)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
491159
func buildView(name string, mt *design.MediaTypeDefinition, at *design.AttributeDefinition) (*design.ViewDefinition, error) {
	if at.Type == nil || !at.Type.IsObject() {
		return nil, fmt.Errorf("invalid view DSL")
	}
	o := at.Type.ToObject()
	if o != nil {
		mto := mt.Type.ToObject()
		if mto == nil {
			mto = mt.Type.ToArray().ElemType.Type.ToObject()
		}
		for n, cat := range o {
			if existing, ok := mto[n]; ok {
				dup := design.DupAtt(existing)
				dup.View = cat.View
				o[n] = dup
			} else if n != "links" {
				return nil, fmt.Errorf("unknown attribute %#v", n)
			}
		}
	}
	return &design.ViewDefinition{
		AttributeDefinition: at,
		Name:                name,
		Parent:              mt,
	}, nil
}
842562
func (m *MockContainerAPIClient) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (types.ContainersPruneReport, error) {
	ret := m.ctrl.Call(m, "ContainersPrune", ctx, pruneFilters)
	ret0, _ := ret[0].(types.ContainersPruneReport)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
462680
func (m *MockRequester) AppendRequestedScope(arg0 string) {
	m.ctrl.Call(m, "AppendRequestedScope", arg0)
}
365769
func (m *MockContainerAPIClient) ContainerInspect(ctx context.Context, container string) (types.ContainerJSON, error) {
	ret := m.ctrl.Call(m, "ContainerInspect", ctx, container)
	ret0, _ := ret[0].(types.ContainerJSON)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
1125582
func (m *MockAccessRequester) AppendRequestedScope(arg0 string) {
	m.ctrl.Call(m, "AppendRequestedScope", arg0)
}
1311346
func (m *MockScope) SubScope(name string) metrics.Scope {
	ret := m.ctrl.Call(m, "SubScope", name)
	ret0, _ := ret[0].(metrics.Scope)
	return ret0
}
1151892
func (m *MockQuery) LogReplay() mongo.Query {
	ret := m.ctrl.Call(m, "LogReplay")
	ret0, _ := ret[0].(mongo.Query)
	return ret0
}
823815
func (m *MockCommonAPIClient) ImageInspectWithRaw(ctx context.Context, image string) (types.ImageInspect, []byte, error) {
	ret := m.ctrl.Call(m, "ImageInspectWithRaw", ctx, image)
	ret0, _ := ret[0].(types.ImageInspect)
	ret1, _ := ret[1].([]byte)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}
572437
func (m *MockContainerAPIClient) ContainerExecAttach(ctx context.Context, execID string, config types.ExecConfig) (types.HijackedResponse, error) {
	ret := m.ctrl.Call(m, "ContainerExecAttach", ctx, execID, config)
	ret0, _ := ret[0].(types.HijackedResponse)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
605622
func (m *MockSummary) Observe(arg0 float64) {
	m.ctrl.Call(m, "Observe", arg0)
}