Documentation
¶
Index ¶
- Constants
- func Run(where Infobase, what Command, opts ...interface{}) error
- type Command
- type Infobase
- type Option
- func WithCommonValues(cv []string) Option
- func WithContext(ctx context.Context) Option
- func WithCredentials(user, password string) Option
- func WithDumpResult(file string) Option
- func WithOut(file string, noTruncate bool) Option
- func WithPath(path string) Option
- func WithTimeout(timeout int64) Option
- func WithUC(uc string) Option
- func WithUnlockCode(uc string) Option
- func WithVersion(version string) Option
- type Options
- func (ro *Options) NewDumpResultFile()
- func (ro *Options) NewOutFile()
- func (ro *Options) Option(fn Option)
- func (ro *Options) Options(opts ...Option)
- func (ro *Options) RemoveDumpResultFile()
- func (ro *Options) RemoveOutFile()
- func (ro *Options) RemoveTempFiles()
- func (ro Options) Values() []string
- type Param
- type Params
- type PlatformRunner
- type Process
- type RunFunc
- type Runner
- type ValueSep
- type Values
Constants ¶
View Source
const CreateInfobase = "CREATEINFOBASE"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Infobase ¶
type Infobase interface {
// Возвращает
// - /IBConnectionString <СтрокаПодключения>
// - /F<ПУтьКБазе>
// - /S<ПутьКСервернойБазе>
ConnectionString() string
}
type Option ¶
type Option func(options *Options)
func WithCommonValues ¶
func WithContext ¶
func WithCredentials ¶
func WithDumpResult ¶
func WithTimeout ¶
func WithUnlockCode ¶
func WithVersion ¶
type Options ¶
type Options struct {
Version string
Timeout int64
Out string
NoTruncate bool
DumpResult string
Context context.Context
// contains filtered or unexported fields
}
func (*Options) NewDumpResultFile ¶
func (ro *Options) NewDumpResultFile()
func (*Options) NewOutFile ¶
func (ro *Options) NewOutFile()
func (*Options) RemoveDumpResultFile ¶
func (ro *Options) RemoveDumpResultFile()
func (*Options) RemoveOutFile ¶
func (ro *Options) RemoveOutFile()
func (*Options) RemoveTempFiles ¶
func (ro *Options) RemoveTempFiles()
type PlatformRunner ¶ added in v0.3.0
type PlatformRunner interface {
//CreateInfobase()
Run(ctx context.Context) error
Background(ctx context.Context) (Process, error)
Check() error
Args() []string
Opts() Options
}
func NewPlatformRunner ¶ added in v0.3.0
func NewPlatformRunner(where Infobase, what Command, opts ...interface{}) PlatformRunner
type Process ¶
type Process interface {
// Ready returns a channel which will close once the runner is active
Ready() <-chan struct{}
// Wait returns a channel that will emit a single error once the Process exits.
Wait() <-chan error
// Signal sends a shutdown signal to the Process. It does not block.
Signal(os.Signal)
}
A Process represents a Runner that has been started. It is safe to call any method on a Process even after the Process has exited.
type RunFunc ¶
The RunFunc type is an adapter to allow the use of ordinary functions as Runners. If f is a function that matches the Run method signature, RunFunc(f) is a Runner object that calls f.
Click to show internal directories.
Click to hide internal directories.