Documentation ¶
Index ¶
- func Edit(obj interface{}, marshalFn MarshalFn, unmarshalFn UnmarshalFn, ...) (res interface{}, err error)
- func EditWithRetry(obj interface{}, marshalFn MarshalFn, unmarshalFn UnmarshalFn, ...) (res interface{}, err error)
- func EditYaml(obj interface{}, configs ...Config) (res interface{}, err error)
- func EditYamlWithRetry(obj interface{}, checkFn func(interface{}) error, configs ...Config) (res interface{}, err error)
- func MustOpen(initialContent []byte, configs ...Config) []byte
- func Open(initialContent []byte, configs ...Config) ([]byte, error)
- func WithEditor(editor string) func(*config)
- func WithStderr(f *os.File) func(*config)
- func WithStdin(f *os.File) func(*config)
- func WithStdout(f *os.File) func(*config)
- type Config
- type Editor
- type MarshalFn
- type RetryEditor
- type UnmarshalFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Edit ¶
func Edit(obj interface{}, marshalFn MarshalFn, unmarshalFn UnmarshalFn, configs ...Config) (res interface{}, err error)
func EditWithRetry ¶
func EditWithRetry(obj interface{}, marshalFn MarshalFn, unmarshalFn UnmarshalFn, checkFn func(interface{}) error, configs ...Config) (res interface{}, err error)
func EditYamlWithRetry ¶
func WithEditor ¶
func WithEditor(editor string) func(*config)
func WithStderr ¶
func WithStdout ¶
Types ¶
type Editor ¶
type Editor interface {
Edit(interface{}) (interface{}, error)
}
func NewObjectEditor ¶
func NewObjectEditor(marshalFn MarshalFn, unmarshalFn UnmarshalFn, configs ...Config) Editor
type RetryEditor ¶
type RetryEditor interface {
EditWithRetry(interface{}, func(interface{}) error) (interface{}, error)
}
func NewObjEditorWithRetry ¶
func NewObjEditorWithRetry(marshalFn MarshalFn, unmarshalFn UnmarshalFn, configs ...Config) RetryEditor
func NewYamlObjEditorWithRetry ¶
func NewYamlObjEditorWithRetry(configs ...Config) RetryEditor
type UnmarshalFn ¶
Click to show internal directories.
Click to hide internal directories.