Documentation ¶
Overview ¶
The datasource package is responsible for the specification and identification of datasources.
Index ¶
- Variables
- func Add(spec specification, overwriteExisting bool) error
- func Find(alias string) (found bool, path string, err error)
- type FilenameSpec
- type Specification
- func (cfg Specification) Alias() string
- func (cfg Specification) FileType() string
- func (cfg Specification) FilenameSpecs() []FilenameSpec
- func (cfg Specification) IncludeProgramDirectory() bool
- func (cfg Specification) Paths() []string
- func (cfg Specification) RequireAllValueSpecs() bool
- func (cfg *Specification) SetAlias(a string)
- func (cfg *Specification) SetFileType(t string)
- func (cfg *Specification) SetFilenameSpecs(f []FilenameSpec)
- func (cfg *Specification) SetIncludeProgramDirectory(include bool)
- func (cfg *Specification) SetPaths(p []string)
- func (cfg *Specification) SetRequireAllValueSpecs(b bool)
- func (cfg *Specification) SetValueSpecs(v []ValueSpec)
- func (cfg Specification) ValueSpecs() []ValueSpec
- type ValueSpec
Constants ¶
This section is empty.
Variables ¶
var ( ErrInUse = errInUse() ErrInvalidExt = errInvalidExt() ErrNotExist = errNotExist() )
Functions ¶
Types ¶
type FilenameSpec ¶
FilenameSpec identifies a file based on its name.
type Specification ¶
type Specification struct {
// contains filtered or unexported fields
}
Specification represents a datasource specification.
func (Specification) Alias ¶
func (cfg Specification) Alias() string
Alias returns the value of alias.
func (Specification) FileType ¶
func (cfg Specification) FileType() string
FileType returns the value of fileType.
func (Specification) FilenameSpecs ¶
func (cfg Specification) FilenameSpecs() []FilenameSpec
FilenameSpecs returns the value of filenameSpecs.
func (Specification) IncludeProgramDirectory ¶
func (cfg Specification) IncludeProgramDirectory() bool
IncludeProgramDirectory returns the value of includeProgramDirectory.
func (Specification) Paths ¶
func (cfg Specification) Paths() []string
Paths returns the value of paths.
func (Specification) RequireAllValueSpecs ¶
func (cfg Specification) RequireAllValueSpecs() bool
RequireAllValueSpecs returns the value of requireAllValueSpecs.
func (*Specification) SetAlias ¶
func (cfg *Specification) SetAlias(a string)
SetAlias assigns the value of alias.
func (*Specification) SetFileType ¶
func (cfg *Specification) SetFileType(t string)
SetFileType assigns the value of fileType.
func (*Specification) SetFilenameSpecs ¶
func (cfg *Specification) SetFilenameSpecs(f []FilenameSpec)
SetFilenameSpecs assigns the value of filenameSpecs.
func (*Specification) SetIncludeProgramDirectory ¶
func (cfg *Specification) SetIncludeProgramDirectory(include bool)
SetIncludeProgramDirectory assigns the value of includeProgramDirectory.
func (*Specification) SetPaths ¶
func (cfg *Specification) SetPaths(p []string)
SetPaths assigns the value of paths.
func (*Specification) SetRequireAllValueSpecs ¶
func (cfg *Specification) SetRequireAllValueSpecs(b bool)
SetRequireAllValueSpecs assigns the value of requireAllValueSpecs.
func (*Specification) SetValueSpecs ¶
func (cfg *Specification) SetValueSpecs(v []ValueSpec)
SetValueSpecs assigns the value of valueSpecs.
func (Specification) ValueSpecs ¶
func (cfg Specification) ValueSpecs() []ValueSpec
ValueSpecs returns the value of valueSpecs.
type ValueSpec ¶
type ValueSpec struct { Value string // The full or partial value expected to be found. IsSubstring bool // Indicates that the value is partial. InRow int // The 1-based row the value should be in. InColumn int // The 1-based column the value should be in. AnyPage bool // Indicates that the value may be on any page within the file. Page int // The 1-based page the value should be within. }
ValueSpec specifies a value and location within a datasource.
A ValueSpec can be considered qualifying or disqualifying. If a ValueSpec is disqualifying, it is ignored.
See the qualifies method for more information on disqualifying attributes.