Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadResourceFromYaml ¶
func LoadResourceFromYaml(fs FileSystem, filepath kubeserial.ResourceSpecPath, data interface{}) error
Types ¶
type File ¶
type File interface { io.Closer io.Reader io.ReaderAt io.Seeker io.Writer Stat() (os.FileInfo, error) }
File interface describes File structure.
type FileSystem ¶
type FileSystem interface { Open(name string) (File, error) Stat(name string) (os.FileInfo, error) }
FileSystem interface describes FS methods used inside KubeSerial implementation.
type InMemoryFS ¶
type InMemoryFS struct {
// contains filtered or unexported fields
}
InMemoryFS implements fileSystem using afero.
func NewInMemoryFS ¶
func NewInMemoryFS() *InMemoryFS
NewInMemoryFS returns new instance of InMemoryFS.
func (*InMemoryFS) AddFileFromHostPath ¶
func (f *InMemoryFS) AddFileFromHostPath(path string) error
AddFileFromHostPath takes file path of file inside test-assets and places it inside /config dir in mem fs.
func (*InMemoryFS) Create ¶
func (f *InMemoryFS) Create(name string) (File, error)
Create takes file name, creates File under this name and returns it for usage.
Click to show internal directories.
Click to hide internal directories.