Documentation ¶
Index ¶
- Constants
- func CopyFromSourceToDestSpec(ctx context.Context, source, dest *Spec, config *Config) (Err error)
- func CreateWebClientMapContext(ctx context.Context) context.Context
- func Main(ctx context.Context, config MainConfig) error
- func OpenFilenameCreate(filename string, overwrite bool) (f *os.File, err error)
- func OpenFilenameRead(filename string) (io.ReadCloser, error)
- func ReadIntoSpecFrom(ctx context.Context, r io.Reader, sp *Spec, config *Config) error
- func WriteSpecTo(ctx context.Context, sp *Spec, w io.Writer) error
- type Config
- type MainConfig
- type Spec
- type SpecKind
- type WebSessionPoolLimit
Constants ¶
View Source
const ( // FieldNameListKey can be specified in Index Spec's Fields to // define the field sequence in the index file. Field names // should be separated by FieldNameListSep. FieldNameListKey = "fieldlist" // FieldNameListSep is the separator between field names in // the field list FieldNameListSep = "," // ArchiveNameKey can be specified in Index Spec's Fields to // allow the columns' field names to be looked up from the // archive fields. ArchiveNameKey = "archive" )
Variables ¶
This section is empty.
Functions ¶
func Main ¶
func Main(ctx context.Context, config MainConfig) error
Main is the main entry point for the program after the command line is parsed.
func OpenFilenameCreate ¶
OpenFilenameCreate calls os.Create but first checks
func OpenFilenameRead ¶
func OpenFilenameRead(filename string) (io.ReadCloser, error)
OpenFilenameRead calls os.Open but wraps the error with more context if opening fails.
func ReadIntoSpecFrom ¶
Types ¶
type Config ¶
type Config struct { // IndexOnly will not export documents when the destination is // an index file; it will only export the CSV. IndexOnly bool // AllowOverwrite allows the destination to be overwritten // if it already exists. AllowOverwrite bool // Unsecure will use HTTP instead of HTTPS. Its purpose is // just for temporary development environments that don't have // SSL configured. Do not use this for test or production // systems. Unsecure bool // WebSessionPoolLimit defines the number of sessions to limit // the pool to. WebSessionPoolLimit int }
type MainConfig ¶
type Spec ¶
type Spec struct { // Kind of the specification Kind SpecKind // Username is the GlobalSearch username Username string // Password for the GlobalSearch username Password string // Hostname that the GlobalSearch API server is running on Hostname string // APIPath is the GlobalSearch "square9api" API path. APIPath string // Database is the name of the GlobalSearch database. Database string // ArchivePath is a the name of the archive (or, in the case // of "subarchives," a slash-separated path to the subarchive). // // For Local Specs, ArchivePath holds the local path. ArchivePath string // Search is an optional search specification. It is only // populated in source specifications. Search string // Fields holds a collection of GlobalSearch fields for // destination specifications or search prompts for source // specifications. Fields map[string]string }
Spec is a specification for a gscp source or destination. Either of which could be a local file or a gscp "pseudo-URI."
func (*Spec) StringWithPassword ¶
type SpecKind ¶
type SpecKind uint8
SpecKind defines the kind of item a Spec refers to.
const ( // LocalSpec is set when the specification refers to a local // path. When it is set, the Spec's ArchivePath holds the // local path. LocalSpec SpecKind = 1 << iota // IndexSpec is set when the specification refers to an index // of other specifications. IndexSpec // UnsecureSpec allows connecting to the non-local spec // with HTTP instead of HTTPS. UnsecureSpec )
type WebSessionPoolLimit ¶
type WebSessionPoolLimit struct{}
Click to show internal directories.
Click to hide internal directories.