jx/internal/resource/mock_foo_resource_test.go

21 lines
623 B
Go
Raw Normal View History

2024-03-20 19:23:31 +00:00
// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
2024-04-21 18:06:53 +00:00
package resource
2024-03-20 19:23:31 +00:00
import (
"context"
_ "gopkg.in/yaml.v3"
2024-05-06 00:48:54 +00:00
"gitea.rosskeen.house/rosskeen.house/machine"
2024-03-20 19:23:31 +00:00
)
func NewFooResource() *MockResource {
return &MockResource {
InjectType: func() string { return "foo" },
2024-03-22 04:35:17 +00:00
InjectResolveId: func(ctx context.Context) string { return "bar" },
2024-03-20 19:23:31 +00:00
InjectRead: func(ctx context.Context) ([]byte, error) { return nil,nil },
InjectLoadDecl: func(string) error { return nil },
InjectApply: func() error { return nil },
2024-05-06 00:48:54 +00:00
InjectStateMachine: func() machine.Stater { return nil },
2024-03-20 19:23:31 +00:00
}
}