Documentation ¶
Overview ¶
Package file GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE
Index ¶
- type CanTruncate
- type Ensure
- type Exists
- type File
- type Info
- type ReadAsString
- type ReadAsTable
- type ReadAsTableOption
- type ReadFromJSON
- type ReadFromTOML
- type ReadFromTOMLOption
- type ReadFromYAML
- type ReadFromYAMLOption
- type Rel
- type StringOrFile
- func (s StringOrFile) MarshalJSON() ([]byte, error)
- func (StringOrFile) OneOf() []any
- func (s *StringOrFile) Open(ctx context.Context) (io.ReadCloser, error)
- func (v StringOrFile) RuntimeDoc(names ...string) ([]string, bool)
- func (s *StringOrFile) Size(ctx context.Context) (int64, error)
- func (s *StringOrFile) UnmarshalJSON(data []byte) error
- type Sync
- type SyncOption
- type Write
- type WriteAsJSON
- type WriteAsTOML
- type WriteAsYAML
- type WriteAsYAMLOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CanTruncate ¶
type Ensure ¶
type Ensure struct { task.Task // current workdir Cwd wd.WorkDir `json:"cwd"` // path to file Path string `json:"path"` // the existed file File File `json:"-" output:"file"` }
Ensure to check path exists
type Exists ¶
type Exists struct { task.Task // current workdir Cwd wd.WorkDir `json:"cwd"` // path Path string `json:"path"` Info Info `json:"-" output:"info"` }
Exists to check path exists
type File ¶
type File struct { // current work dir WorkDir wd.WorkDir `json:"wd"` // filename related from current work dir Filename string `json:"filename"` }
type Info ¶
type ReadAsString ¶
type ReadAsString struct { task.Task // file File File `json:"file"` // text contents Contents string `json:"-" output:"contents"` }
ReadAsString read file as string
func (ReadAsString) RuntimeDoc ¶
func (v ReadAsString) RuntimeDoc(names ...string) ([]string, bool)
type ReadAsTable ¶
type ReadAsTable struct { task.Task // file File File `json:"file"` // options With ReadAsTableOption `json:"with,omitempty"` // file contents Data [][]string `json:"-" output:"data"` }
ReadAsTable file read as table
func (ReadAsTable) RuntimeDoc ¶
func (v ReadAsTable) RuntimeDoc(names ...string) ([]string, bool)
type ReadAsTableOption ¶
type ReadAsTableOption struct { // strict column num StrictColNum int `json:"strictColNum,omitempty"` }
func (ReadAsTableOption) RuntimeDoc ¶
func (v ReadAsTableOption) RuntimeDoc(names ...string) ([]string, bool)
type ReadFromJSON ¶
type ReadFromJSON struct { task.Task // file File File `json:"file"` // data Data client.Any `json:"-" output:"data"` }
ReadFromJSON read and parse json
func (ReadFromJSON) RuntimeDoc ¶
func (v ReadFromJSON) RuntimeDoc(names ...string) ([]string, bool)
type ReadFromTOML ¶
type ReadFromTOML struct { task.Task // file File File `json:"file"` // options With ReadFromTOMLOption `json:"with"` // data Data client.Any `json:"-" output:"data"` }
ReadFromTOML read and parse yaml
func (ReadFromTOML) RuntimeDoc ¶
func (v ReadFromTOML) RuntimeDoc(names ...string) ([]string, bool)
type ReadFromTOMLOption ¶
type ReadFromTOMLOption struct { // read as list AsList bool `json:"asList,omitempty"` }
func (ReadFromTOMLOption) RuntimeDoc ¶
func (v ReadFromTOMLOption) RuntimeDoc(names ...string) ([]string, bool)
type ReadFromYAML ¶
type ReadFromYAML struct { task.Task // file File File `json:"file"` // options With ReadFromYAMLOption `json:"with,omitempty"` // data Data client.Any `json:"-" output:"data"` }
ReadFromYAML read and parse yaml
func (ReadFromYAML) RuntimeDoc ¶
func (v ReadFromYAML) RuntimeDoc(names ...string) ([]string, bool)
type ReadFromYAMLOption ¶
type ReadFromYAMLOption struct { // read as list AsList bool `json:"asList,omitempty"` }
func (ReadFromYAMLOption) RuntimeDoc ¶
func (v ReadFromYAMLOption) RuntimeDoc(names ...string) ([]string, bool)
type Rel ¶
type Rel struct { task.Task // current workdir BaseDir wd.WorkDir `json:"baseDir"` // src file TargetFile File `json:"targetFile"` // the converted file File File `json:"-" output:"file"` }
Rel to check path exists
type StringOrFile ¶
func (StringOrFile) MarshalJSON ¶
func (s StringOrFile) MarshalJSON() ([]byte, error)
func (StringOrFile) OneOf ¶
func (StringOrFile) OneOf() []any
func (*StringOrFile) Open ¶
func (s *StringOrFile) Open(ctx context.Context) (io.ReadCloser, error)
func (StringOrFile) RuntimeDoc ¶
func (v StringOrFile) RuntimeDoc(names ...string) ([]string, bool)
func (*StringOrFile) UnmarshalJSON ¶
func (s *StringOrFile) UnmarshalJSON(data []byte) error
type Sync ¶
type Sync struct { task.Task // source file SrcFile File `json:"srcFile"` // sync option With SyncOption `json:"with,omitempty"` // dest fie OutFile File `json:"outFile"` // synced file same as dest File File `json:"-" output:"file"` }
Sync file to contents
type SyncOption ¶
type SyncOption struct { // once maxConcurrent larger than 1, // file will split to chunk for partially read and write when syncing MaxConcurrent int `json:"maxConcurrent" default:"16"` }
func (SyncOption) RuntimeDoc ¶
func (v SyncOption) RuntimeDoc(names ...string) ([]string, bool)
type Write ¶
type Write struct { task.Task // output file OutFile File `json:"outFile"` // file contents Contents client.StringOrBytes `json:"contents"` // writen file File File `json:"-" output:"file"` }
Write file with contents
type WriteAsJSON ¶
type WriteAsJSON struct { task.Task // output file OutFile File `json:"outFile"` // data could convert to json Data client.Any `json:"data"` // writen file File File `json:"-" output:"file"` }
WriteAsJSON read and parse json
func (WriteAsJSON) RuntimeDoc ¶
func (v WriteAsJSON) RuntimeDoc(names ...string) ([]string, bool)
type WriteAsTOML ¶
type WriteAsTOML struct { task.Task // filename OutFile File `json:"outFile"` // data could convert to yaml Data client.Any `json:"data"` // writen file File File `json:"-" output:"file"` }
WriteAsYAML read and parse yaml
func (WriteAsTOML) RuntimeDoc ¶
func (v WriteAsTOML) RuntimeDoc(names ...string) ([]string, bool)
type WriteAsYAML ¶
type WriteAsYAML struct { task.Task // output file OutFile File `json:"outFile"` // options With WriteAsYAMLOption `json:"with,omitempty"` // data could convert to yaml Data client.Any `json:"data"` // writen file File File `json:"-" output:"file"` }
WriteAsYAML read and parse yaml
func (WriteAsYAML) RuntimeDoc ¶
func (v WriteAsYAML) RuntimeDoc(names ...string) ([]string, bool)
type WriteAsYAMLOption ¶
type WriteAsYAMLOption struct { // write as stream AsStream bool `json:"asStream,omitempty"` }
func (WriteAsYAMLOption) RuntimeDoc ¶
func (v WriteAsYAMLOption) RuntimeDoc(names ...string) ([]string, bool)
Click to show internal directories.
Click to hide internal directories.