Documentation ¶
Index ¶
- Constants
- Variables
- func StartKeepalive(client *ssh.Client, interval time.Duration, countMax int, done <-chan struct{})
- func WithNullReader() execOption
- func WithReader(r RespondReader) execOption
- func WithRespondCheck(onSuccess OnSuccessRespond, onError OnErrorRespond, ...) execOption
- func WithTimeout(t time.Duration) execOption
- type Agent
- type AgentClient
- func (c *AgentClient) Connect(opts ...execOption) error
- func (c *AgentClient) CopyDirFrom(src, dest string) error
- func (c *AgentClient) CopyDirTo(src, dest string) error
- func (c *AgentClient) CopyDirToWithTreads(src, dest string, treadCount int) error
- func (c *AgentClient) CopyFileFrom(src, dest string) error
- func (c *AgentClient) CopyFileTo(src, dest string) error
- func (c *AgentClient) CreateExtension(name, prefix string, synonym string, purpose ExtensionPurposeType, ...) error
- func (c *AgentClient) DebugInfo(opts ...execOption) (info DebugInfo, err error)
- func (c *AgentClient) DeleteAllExtensions(opts ...execOption) error
- func (c *AgentClient) DeleteExtension(name string, opts ...execOption) error
- func (c *AgentClient) DisableCfgSupport(opts ...execOption) error
- func (c *AgentClient) Disconnect(opts ...execOption) error
- func (c *AgentClient) DumpAllExtensionsToFiles(dir string, force bool, opts ...execOption) error
- func (c *AgentClient) DumpCfg(file string, opts ...execOption) error
- func (c *AgentClient) DumpCfgToFiles(dir string, force bool, opts ...execOption) error
- func (c *AgentClient) DumpExtensionCfg(ext string, file string, opts ...execOption) error
- func (c *AgentClient) DumpExtensionToFiles(ext string, dir string, force bool, opts ...execOption) error
- func (c *AgentClient) DumpIB(file string, opts ...execOption) (err error)
- func (c *AgentClient) EraseData(opts ...execOption) (err error)
- func (c *AgentClient) Exec(cmd AgentCommand, opts ...execOption) (res []Respond, err error)
- func (c *AgentClient) FinishBackgroundUpdateDBCfg(opts ...execOption) error
- func (c *AgentClient) GetAllExtensionsProperties(opts ...execOption) (lsProps []ExtensionProperties, err error)
- func (c *AgentClient) GetExtensionProperties(name string, opts ...execOption) (props ExtensionProperties, err error)
- func (c *AgentClient) IBDataSeparationList(opts ...execOption) (ls DataSeparationList, err error)
- func (c *AgentClient) LoadAllExtensionsFromFiles(dir string, updateConfigDumpInfo bool, opts ...execOption) error
- func (c *AgentClient) LoadCfg(file string, opts ...execOption) error
- func (c *AgentClient) LoadCfgFromFiles(dir string, updateConfigDumpInfo bool, opts ...execOption) error
- func (c *AgentClient) LoadExtensionCfg(ext string, file string, opts ...execOption) error
- func (c *AgentClient) LoadExtensionFromFiles(ext string, dir string, updateConfigDumpInfo bool, opts ...execOption) error
- func (c *AgentClient) Options(opts ...execOption) (ConfigurationOptions, error)
- func (c *AgentClient) RestoreIB(file string, opts ...execOption) (err error)
- func (c *AgentClient) ResumeBackgroundUpdateDBCfg(opts ...execOption) error
- func (c *AgentClient) SetExtensionProperties(props ExtensionProperties, opts ...execOption) error
- func (c *AgentClient) SetOptions(configurationOptions ConfigurationOptions, opts ...execOption) error
- func (c *AgentClient) Shutdown(opts ...execOption) (err error)
- func (c *AgentClient) Start() error
- func (c *AgentClient) StartBackgroundUpdateDBCfg(opts ...execOption) error
- func (c *AgentClient) Stop()
- func (c *AgentClient) StopBackgroundUpdateDBCfg(opts ...execOption) error
- func (c *AgentClient) UpdateDbCfg(server bool, opts ...execOption) error
- func (c *AgentClient) UpdateDbExtension(extension string, server bool, opts ...execOption) error
- type AgentCommand
- type AgentTask
- type AgentTasks
- type ChannelDataReader
- type CommonConnectInfobase
- type CommonDisconnectInfobase
- type CommonShutdown
- type ConfigurationOptions
- type CreateExtension
- type DataSeparationList
- type DebigInfo
- type DebugInfo
- type DeleteExtension
- type DialContextFunc
- type DumpCfg
- type DumpCfgToFiles
- type DumpInfobase
- type DumpToFilesEpfOrErf
- type EraseInfobaseDate
- type ExtensionProperties
- type ExtensionPropertiesBoolType
- type ExtensionPropertiesScopeType
- type ExtensionPurposeType
- type GetExtensionProperties
- type LoadCfg
- type LoadCfgFromFiles
- type LoadFromFilesEpfOrErf
- type LoadingIssue
- type LoadingIssueLevel
- type ManageCfgSupport
- type OnErrorRespond
- type OnProgressRespond
- type OnSuccessRespond
- type Option
- type OptionsBoolType
- type OptionsList
- type OptionsOutputFormatType
- type ProgressInfo
- type Respond
- type RespondErrorType
- type RespondReader
- type RespondType
- type RestoreInfobase
- type Session
- func (this *Session) ClearChannel()
- func (this *Session) Close() error
- func (this *Session) RawReadChannel(ctx context.Context, fn ChannelDataReader, ticker *time.Ticker) error
- func (this *Session) ReadChannel(timeout time.Duration, fn func(string) bool) string
- func (this *Session) ReadChannelExpect(timeout time.Duration, expects ...string) string
- func (this *Session) ReadChannelRegExp(timeout time.Duration, re string) string
- func (this *Session) ReadChannelTiming(timeout time.Duration) string
- func (this *Session) WriteChannel(cmds ...string)
- type SetExtensionProperties
- type SetOptions
- type TaskHook
- type TransferTask
- type UpdateDbCfg
Constants ¶
const ( ExtensionPurposeCustomization ExtensionPurposeType = "customization" ExtensionPurposeAddOn = "add-on" ExtensionPurposePatch = "patch" )
const ( LogType RespondType = "log" // информационное сообщение. SuccessType = "success" // операция успешно завершена. ErrorType = "error" // операция завершена с ошибкой. CanceledType = "canceled" // операция отменена QuestionType = "question" // вопрос пользователю DbstruType = "dbstru" // информация о процессе реструктуризации LoadingIssueType = "loading-issue" // ошибки и предупреждения, накопленные за время загрузки конфигурации из файлов ProgressType = "progress" // информация о прогрессе выполнения команды ExtensionInfoType = "extension-info" // информация о расширении, которое находится в информационной базе UnknownType = "unknown" )
Variables ¶
var UnknownRespond = Respond{Type: UnknownType}
Functions ¶
func StartKeepalive ¶
func WithNullReader ¶
func WithNullReader() execOption
func WithReader ¶
func WithReader(r RespondReader) execOption
func WithRespondCheck ¶
func WithRespondCheck(onSuccess OnSuccessRespond, onError OnErrorRespond, onProgress OnProgressRespond) execOption
func WithTimeout ¶
Types ¶
type Agent ¶
type Agent interface { Exec(Cmd AgentCommand, opts ...execOption) (res []Respond, err error) CopyFileTo(src, dest string) error CopyFileFrom(src, dest string) error CopyDirTo(src, dest string) error CopyDirFrom(src, dest string) error //Команды группы common отвечают за общие операции. В состав группы входят следующие команды: //connect-ib ‑ выполнить подключение к информационной базе, параметры которой указаны при старте режима агента. Connect(opts ...execOption) (err error) //disconnect-ib ‑ выполнить отключение от информационной базы, подключение к которой ранее выполнялось с помощью команды connect-ib. Disconnect(opts ...execOption) (err error) //shutdown ‑ завершить работу конфигуратора в режиме агента. Shutdown(opts ...execOption) (err error) // options Options(opts ...execOption) (confOpts ConfigurationOptions, err error) SetOptions(confOpts ConfigurationOptions, opts ...execOption) error // Configuration support DisableCfgSupport(opts ...execOption) error // Configuration DumpCfgToFiles(dir string, force bool, opts ...execOption) error LoadCfgFromFiles(dir string, updateConfigDumpInfo bool, opts ...execOption) error DumpCfg(file string, opts ...execOption) error LoadCfg(file string, opts ...execOption) error DumpExtensionCfg(ext string, file string, opts ...execOption) error LoadExtensionCfg(ext string, file string, opts ...execOption) error DumpExtensionToFiles(ext string, dir string, force bool, opts ...execOption) error LoadExtensionFromFiles(ext string, dir string, updateConfigDumpInfo bool, opts ...execOption) error DumpAllExtensionsToFiles(dir string, force bool, opts ...execOption) error LoadAllExtensionsFromFiles(dir string, updateConfigDumpInfo bool, opts ...execOption) error // update UpdateDbCfg(server bool, opts ...execOption) error UpdateDbExtension(extension string, server bool, opts ...execOption) error StartBackgroundUpdateDBCfg(opts ...execOption) error StopBackgroundUpdateDBCfg(opts ...execOption) error FinishBackgroundUpdateDBCfg(opts ...execOption) error ResumeBackgroundUpdateDBCfg(opts ...execOption) error // Infobase IBDataSeparationList(opts ...execOption) (DataSeparationList, error) DebugInfo(opts ...execOption) (info DebugInfo, err error) DumpIB(file string, opts ...execOption) (err error) RestoreIB(file string, opts ...execOption) (err error) EraseData(opts ...execOption) (err error) //Extensions CreateExtension(name, prefix string, synonym string, purpose ExtensionPurposeType, opts ...execOption) error DeleteExtension(name string, opts ...execOption) error DeleteAllExtensions(opts ...execOption) error GetExtensionProperties(name string, opts ...execOption) (ExtensionProperties, error) GetAllExtensionsProperties(opts ...execOption) ([]ExtensionProperties, error) SetExtensionProperties(props ExtensionProperties, opts ...execOption) error }
type AgentClient ¶
type AgentClient struct {
// contains filtered or unexported fields
}
func (*AgentClient) Connect ¶
func (c *AgentClient) Connect(opts ...execOption) error
func (*AgentClient) CopyDirFrom ¶
func (c *AgentClient) CopyDirFrom(src, dest string) error
func (*AgentClient) CopyDirTo ¶
func (c *AgentClient) CopyDirTo(src, dest string) error
func (*AgentClient) CopyDirToWithTreads ¶
func (c *AgentClient) CopyDirToWithTreads(src, dest string, treadCount int) error
func (*AgentClient) CopyFileFrom ¶
func (c *AgentClient) CopyFileFrom(src, dest string) error
func (*AgentClient) CopyFileTo ¶
func (c *AgentClient) CopyFileTo(src, dest string) error
func (*AgentClient) CreateExtension ¶
func (c *AgentClient) CreateExtension(name, prefix string, synonym string, purpose ExtensionPurposeType, opts ...execOption) error
Extensions
func (*AgentClient) DebugInfo ¶
func (c *AgentClient) DebugInfo(opts ...execOption) (info DebugInfo, err error)
func (*AgentClient) DeleteAllExtensions ¶
func (c *AgentClient) DeleteAllExtensions(opts ...execOption) error
func (*AgentClient) DeleteExtension ¶
func (c *AgentClient) DeleteExtension(name string, opts ...execOption) error
func (*AgentClient) DisableCfgSupport ¶
func (c *AgentClient) DisableCfgSupport(opts ...execOption) error
Configuration support
func (*AgentClient) Disconnect ¶
func (c *AgentClient) Disconnect(opts ...execOption) error
func (*AgentClient) DumpAllExtensionsToFiles ¶
func (c *AgentClient) DumpAllExtensionsToFiles(dir string, force bool, opts ...execOption) error
func (*AgentClient) DumpCfg ¶
func (c *AgentClient) DumpCfg(file string, opts ...execOption) error
Configuration
func (*AgentClient) DumpCfgToFiles ¶
func (c *AgentClient) DumpCfgToFiles(dir string, force bool, opts ...execOption) error
func (*AgentClient) DumpExtensionCfg ¶
func (c *AgentClient) DumpExtensionCfg(ext string, file string, opts ...execOption) error
func (*AgentClient) DumpExtensionToFiles ¶
func (c *AgentClient) DumpExtensionToFiles(ext string, dir string, force bool, opts ...execOption) error
func (*AgentClient) DumpIB ¶
func (c *AgentClient) DumpIB(file string, opts ...execOption) (err error)
func (*AgentClient) EraseData ¶
func (c *AgentClient) EraseData(opts ...execOption) (err error)
func (*AgentClient) Exec ¶
func (c *AgentClient) Exec(cmd AgentCommand, opts ...execOption) (res []Respond, err error)
func (*AgentClient) FinishBackgroundUpdateDBCfg ¶
func (c *AgentClient) FinishBackgroundUpdateDBCfg(opts ...execOption) error
func (*AgentClient) GetAllExtensionsProperties ¶
func (c *AgentClient) GetAllExtensionsProperties(opts ...execOption) (lsProps []ExtensionProperties, err error)
func (*AgentClient) GetExtensionProperties ¶
func (c *AgentClient) GetExtensionProperties(name string, opts ...execOption) (props ExtensionProperties, err error)
func (*AgentClient) IBDataSeparationList ¶
func (c *AgentClient) IBDataSeparationList(opts ...execOption) (ls DataSeparationList, err error)
Infobase
func (*AgentClient) LoadAllExtensionsFromFiles ¶
func (c *AgentClient) LoadAllExtensionsFromFiles(dir string, updateConfigDumpInfo bool, opts ...execOption) error
func (*AgentClient) LoadCfg ¶
func (c *AgentClient) LoadCfg(file string, opts ...execOption) error
func (*AgentClient) LoadCfgFromFiles ¶
func (c *AgentClient) LoadCfgFromFiles(dir string, updateConfigDumpInfo bool, opts ...execOption) error
func (*AgentClient) LoadExtensionCfg ¶
func (c *AgentClient) LoadExtensionCfg(ext string, file string, opts ...execOption) error
func (*AgentClient) LoadExtensionFromFiles ¶
func (c *AgentClient) LoadExtensionFromFiles(ext string, dir string, updateConfigDumpInfo bool, opts ...execOption) error
func (*AgentClient) Options ¶
func (c *AgentClient) Options(opts ...execOption) (ConfigurationOptions, error)
options
func (*AgentClient) RestoreIB ¶
func (c *AgentClient) RestoreIB(file string, opts ...execOption) (err error)
func (*AgentClient) ResumeBackgroundUpdateDBCfg ¶
func (c *AgentClient) ResumeBackgroundUpdateDBCfg(opts ...execOption) error
func (*AgentClient) SetExtensionProperties ¶
func (c *AgentClient) SetExtensionProperties(props ExtensionProperties, opts ...execOption) error
func (*AgentClient) SetOptions ¶
func (c *AgentClient) SetOptions(configurationOptions ConfigurationOptions, opts ...execOption) error
func (*AgentClient) Shutdown ¶
func (c *AgentClient) Shutdown(opts ...execOption) (err error)
func (*AgentClient) Start ¶
func (c *AgentClient) Start() error
func (*AgentClient) StartBackgroundUpdateDBCfg ¶
func (c *AgentClient) StartBackgroundUpdateDBCfg(opts ...execOption) error
func (*AgentClient) Stop ¶
func (c *AgentClient) Stop()
func (*AgentClient) StopBackgroundUpdateDBCfg ¶
func (c *AgentClient) StopBackgroundUpdateDBCfg(opts ...execOption) error
func (*AgentClient) UpdateDbCfg ¶
func (c *AgentClient) UpdateDbCfg(server bool, opts ...execOption) error
update
func (*AgentClient) UpdateDbExtension ¶
func (c *AgentClient) UpdateDbExtension(extension string, server bool, opts ...execOption) error
type AgentCommand ¶
type AgentTask ¶
type AgentTask struct { OnError OnErrorRespond OnSuccess OnSuccessRespond OnProgress OnProgressRespond After *TaskHook Before *TaskHook // contains filtered or unexported fields }
func NewAgentTask ¶
func NewAgentTask(cmd AgentCommand) *AgentTask
type AgentTasks ¶
type AgentTasks struct {
// contains filtered or unexported fields
}
func (*AgentTasks) NewTask ¶
func (t *AgentTasks) NewTask(cmd AgentCommand) *AgentTask
type ChannelDataReader ¶
type CommonConnectInfobase ¶
type CommonConnectInfobase struct {
// contains filtered or unexported fields
}
func (CommonConnectInfobase) Command ¶
func (c CommonConnectInfobase) Command() string
type CommonDisconnectInfobase ¶
type CommonDisconnectInfobase struct {
// contains filtered or unexported fields
}
func (CommonDisconnectInfobase) Command ¶
func (c CommonDisconnectInfobase) Command() string
type CommonShutdown ¶
type CommonShutdown struct {
// contains filtered or unexported fields
}
func (CommonShutdown) Command ¶
func (c CommonShutdown) Command() string
type ConfigurationOptions ¶
type ConfigurationOptions struct { // --output-format ‑ позволяет указать формат вывода результата работы команд: // text ‑ команды возвращают результат в текстовом формате. // json ‑ команды возвращают результат в формате JSON-сообщений. OutputFormat OptionsOutputFormatType `json:"output-format"` // --show-prompt ‑ позволяет управлять наличием приглашения командной строки designer>: // yes ‑ в командной строке есть приглашение; // no ‑ в командной строке нет приглашения. ShowPrompt bool `json:"show-prompt"` // --notify-progress ‑ позволяет получить информацию об отображении прогресса выполнения команды. NotifyProgress bool `json:"notify-progress"` // --notify-progress-interval ‑ позволяет получить интервал времени, через который обновляется информация о прогрессе. NotifyProgressInterval int `json:"notify-progress-interval"` }
Данная команда позволяет получить значения параметров. Для команды доступны следующие параметры:
type CreateExtension ¶
type CreateExtension struct { //--extension <имя> ‑ задает имя расширения. Параметр является обязательным. Name string //--name-prefix <префикс> ‑ задает префикс имени для расширения. Параметр является обязательным. Prefix string //--synonym <синоним> ‑ синоним имени расширения. Многоязычная строка в формате функции Nstr(). Synonym string //--purpose <назначение> ‑ назначение расширения. <Назначение> может принимать следующие значения: // customization ‑ назначение Адаптация (значение по умолчанию); // add-on ‑ назначение Дополнение; // patch ‑ назначение Исправление. Purpose ExtensionPurposeType // contains filtered or unexported fields }
create Команда предназначена для создания расширения в информационной базе. Расширение создается пустым. Для загрузки расширения следует использовать команду config load-cfg или config load-config-from-files.
func (CreateExtension) Args ¶
func (c CreateExtension) Args() []string
func (CreateExtension) Command ¶
func (c CreateExtension) Command() string
type DataSeparationList ¶
type DataSeparationList struct {
// contains filtered or unexported fields
}
data-separation-common-attribute-list Данная команда позволяет получить список имен разделителей информационной базы.
func (DataSeparationList) Command ¶
func (c DataSeparationList) Command() string
type DebigInfo ¶
type DebigInfo struct {
// contains filtered or unexported fields
}
debug-info C помощью данной команды получить информацию о настройках отладчика для информационной базы.
type DeleteExtension ¶
type DeleteExtension struct { // --extension <имя> ‑ задает имя удаляемого расширения. Name string //--all-extensions ‑ указывает, что необходимо удалить все расширения. All bool // contains filtered or unexported fields }
create Команда предназначена для создания расширения в информационной базе. Расширение создается пустым. Для загрузки расширения следует использовать команду config load-cfg или config load-config-from-files.
func (DeleteExtension) Args ¶
func (c DeleteExtension) Args() []string
func (DeleteExtension) Command ¶
func (c DeleteExtension) Command() string
type DialContextFunc ¶
type DialContextFunc func(ctx context.Context, network, addr string, config *ssh.ClientConfig) (*ssh.Client, error)
DialContextFunc creates SSH connection to host with a given address.
func ContextDialer ¶
func ContextDialer(dialer *net.Dialer) DialContextFunc
ContextDialer returns DialContextFunc based on dialer to make net connections.
type DumpCfg ¶
type DumpCfg struct { //--file <путь> ‑ путь к файлу конфигурации (cf-файл) или расширению (cfe-файл). File string `json:"file"` //--extension <имя расширения> ‑ содержит имя расширения, которое будет выгружено в файл. Extension string `json:"extension"` // contains filtered or unexported fields }
dump-cfg Команда позволяет выполнить выгрузку конфигурации или расширения в файл.
type DumpCfgToFiles ¶
type DumpCfgToFiles struct { //--dir <путь> ‑ содержит путь к каталогу, в который будет выгружена конфигурация. Параметр является обязательным. Dir string `json:"dir"` //--extension <имя расширения> ‑ содержит имя расширения, которое будет выгружено в файл. Extension string `json:"extension"` //--all-extensions ‑ если параметр указан, то в файлы будут выгружены все расширения конфигурации. AllExtension bool `json:"all-extension"` //--format [hierarchical|plain] ‑ определяет формат выгрузки. По умолчанию используется иерархический формат выгрузки (hierarchical). Format string //--update ‑ обновить существующую выгрузку. В этом случае будут выгружены только те объекты, версии которых отличаются от версий, указанных в файле ConfigDumpInfo.xml. Update bool //--force ‑ выполнить полную выгрузку, если при попытке обновления выгрузки (параметр update) выяснилось, что текущая версия формата выгрузки не совпадает с версией формата выгрузки, которая указана в файле ConfigDumpInfo.xml. Force bool //--get-сhanges <путь> ‑ сформировать файл, который содержит изменения между текущей и указанной выгрузками конфигурации. GetChanges string //--config-dump-info-for-changes <путь> ‑ путь к файлу ConfigDumpInfo.xml, который используется для формирования файла изменений между двумя выгрузками конфигурации. ConfigDumpInfo string //--list-file <файл> ‑ выгрузить только объекты метаданных и/или внешние свойства, указанные в файле, вне зависимости от того были они изменены или нет. ListFile string // contains filtered or unexported fields }
dump-config-to-files Команда позволяет выполнить выгрузку конфигурации в xml-файлы.
func (DumpCfgToFiles) Args ¶
func (c DumpCfgToFiles) Args() []string
func (DumpCfgToFiles) Command ¶
func (c DumpCfgToFiles) Command() string
type DumpInfobase ¶
type DumpInfobase struct { // --file <имя файла> ‑ определяет имя dt-файла. File string // contains filtered or unexported fields }
dump-ib Команда предназначена для выполнения выгрузки информационной базы в dt-файл. Допустимо использование следующих параметров:
func (DumpInfobase) Args ¶
func (c DumpInfobase) Args() []string
func (DumpInfobase) Command ¶
func (c DumpInfobase) Command() string
type DumpToFilesEpfOrErf ¶
type DumpToFilesEpfOrErf struct { //--file <путь> ‑ одержит имя файла, который будет выступать в роли корневого файла выгрузки внешней обработки/отчета в формате XML. //Параметр является обязательным. File string `json:"file"` //--ext-file <файл> ‑ полное имя файла с выгружаемой внешней обработкой (*.epf) или отчетом (*.erf). Ext string `json:"ext-file"` //--format [hierarchical|plain] ‑ определяет формат выгрузки. По умолчанию используется иерархический формат выгрузки (hierarchical). Format string `json:"format"` // contains filtered or unexported fields }
dump-external-data-processor-or-report-to-files Команда позволяет выполнить выгрузку внешних обработок или отчетов в xml-файлы.
func (DumpToFilesEpfOrErf) Args ¶
func (c DumpToFilesEpfOrErf) Args() []string
func (DumpToFilesEpfOrErf) Command ¶
func (c DumpToFilesEpfOrErf) Command() string
type EraseInfobaseDate ¶
type EraseInfobaseDate struct {
// contains filtered or unexported fields
}
erase-data Команда выполняет удаление данных информационной базы.
func (EraseInfobaseDate) Command ¶
func (c EraseInfobaseDate) Command() string
type ExtensionProperties ¶
type ExtensionProperties struct { Extension string Active ExtensionPropertiesBoolType SafeMode ExtensionPropertiesBoolType SecurityProfileName string UnsafeActionProtection ExtensionPropertiesBoolType UsedInDistributedInfobase ExtensionPropertiesBoolType Scope ExtensionPropertiesScopeType }
type ExtensionPropertiesBoolType ¶
type ExtensionPropertiesBoolType string
const ( ExtensionPropertiesBoolYes ExtensionPropertiesBoolType = "yes" ExtensionPropertiesBoolNo ExtensionPropertiesBoolType = "no" ExtensionPropertiesBoolNotSet = "" )
func (ExtensionPropertiesBoolType) String ¶
func (t ExtensionPropertiesBoolType) String() string
type ExtensionPropertiesScopeType ¶
type ExtensionPropertiesScopeType string
const ( ExtensionPropertiesScopeInfobase ExtensionPropertiesScopeType = "infobase" ExtensionPropertiesScopeDataSeparation = "data-separation" )
func (ExtensionPropertiesScopeType) String ¶
func (t ExtensionPropertiesScopeType) String() string
type ExtensionPurposeType ¶
type ExtensionPurposeType string
type GetExtensionProperties ¶
type GetExtensionProperties struct { //--extension <имя> ‑ задает имя расширения, для которого необходимо получить свойства. Extension string //--all-extensions ‑ указывает, что необходимо получить свойства всех расширений, загруженных в информационную базу. All bool // contains filtered or unexported fields }
Группа команд properties Назначение группы команд Группа команд config extensions properties позволяет задавать и получать свойства расширения.
get Команда предназначена для получения свойств расширения, расположенного в информационной базе.
func (GetExtensionProperties) Args ¶
func (c GetExtensionProperties) Args() []string
func (GetExtensionProperties) Command ¶
func (c GetExtensionProperties) Command() string
type LoadCfg ¶
type LoadCfg struct { //--file <путь> ‑ путь к файлу конфигурации (cf-файл) или расширению (cfe-файл). File string `json:"file"` //--extension <имя расширения> ‑ содержит имя расширения, которое будет загружено из файла. Extension string `json:"extension"` // contains filtered or unexported fields }
load-cfg Команда позволяет выполни ть загрузку конфигурации или расширения из файла.
type LoadCfgFromFiles ¶
type LoadCfgFromFiles struct { //--dir <путь> ‑ содержит путь к каталогу, в который будет загружена конфигурация. Параметр является обязательным. Dir string `json:"dir"` //--extension <имя расширения> ‑ содержит имя расширения, которое будет выгружено в файл. Extension string `json:"extension"` //--all-extensions ‑ если параметр указан, то в файлы будут выгружены все расширения конфигурации. AllExtension bool `json:"all-extension"` //--format [hierarchical|plain] ‑ определяет формат выгрузки. По умолчанию используется иерархический формат выгрузки (hierarchical). Format string //--update-config-dump-info ‑ после окончания загрузки создать в директории файл ConfigDumpInfo.xml, соответствующий загруженной конфигурации. UpdateConfigDumpInfo bool //--files <файл[, файл]> ‑ список файлов, которые требуется загрузить. // Файла разделяются запятыми. // Пути к файлам указываются относительно каталога загрузки. // Абсолютные пути не поддерживаются. // При использовании параметра --list-file, данный параметр не используется. Files []string //--list-file <файл> ‑ путь к файлу, в котором перечислены загружаемые файлы. //Одна строка соответствует одному файлу. //Пути к файлам указываются относительно каталога загрузки. //Абсолютные пути не поддерживаются. При использовании параметра --files, данный параметр не используется. ListFile string // contains filtered or unexported fields }
load-config-from-files Команда позволяет выполнить загрузку конфигурации из xml-файлов. Для команды доступны следующие параметры:
func (LoadCfgFromFiles) Args ¶
func (c LoadCfgFromFiles) Args() []string
func (LoadCfgFromFiles) Command ¶
func (c LoadCfgFromFiles) Command() string
type LoadFromFilesEpfOrErf ¶
type LoadFromFilesEpfOrErf struct { //--file <путь> ‑ одержит имя файла, который будет выступать в роли корневого файла выгрузки внешней обработки/отчета в формате XML. //Параметр является обязательным. File string `json:"file"` //--ext-file <файл> ‑ полное имя файла с загружаемой внешней обработкой (*.epf) или отчетом (*.erf). Ext string `json:"ext-file"` // contains filtered or unexported fields }
load-external-data-processor-or-report-from-files Команда позволяет выполнить загрузку внешних обработок или отчетов из xml-файлов.
func (LoadFromFilesEpfOrErf) Args ¶
func (c LoadFromFilesEpfOrErf) Args() []string
func (LoadFromFilesEpfOrErf) Command ¶
func (c LoadFromFilesEpfOrErf) Command() string
type LoadingIssue ¶
type LoadingIssue struct { Message string `json:"message"` Level LoadingIssueLevel `json:"level"` }
type LoadingIssueLevel ¶
type LoadingIssueLevel string
const ( LoadingIssueLevelWarning LoadingIssueLevel = "warning" LoadingIssueLevelError = "error" )
type ManageCfgSupport ¶
type ManageCfgSupport struct { //--disable-support ‑ указывает на необходимость снятия конфигурации с поддержки. //При отсутствии параметра генерируется ошибка. DisableSupport bool //--force ‑ выполнить снятие конфигурации с поддержки даже в том случае, если в конфигурации запрещены изменения. //При отсутствии параметра будет сгенерирована ошибка, если попытка снятия с поддержки будет выполняться для конфигурации, //для которой в интерактивном режиме управления поддержкой запрещены изменения. Force bool // contains filtered or unexported fields }
manage-cfg-support Команда позволяет снимать конфигурация с поддержки
func (ManageCfgSupport) Args ¶
func (c ManageCfgSupport) Args() []string
func (ManageCfgSupport) Command ¶
func (c ManageCfgSupport) Command() string
type OnErrorRespond ¶
type OnErrorRespond func(err error, errType RespondErrorType, stop chan bool)
type OnProgressRespond ¶
type OnProgressRespond func(info ProgressInfo, stop chan bool)
type OnSuccessRespond ¶
type Option ¶
type Option func(c *AgentClient)
func WithDialer ¶
func WithDialer(dial DialContextFunc) Option
func WithOptions ¶
func WithOptions(opt ConfigurationOptions) Option
type OptionsBoolType ¶
type OptionsBoolType string
const ( OptionsBoolYes OptionsBoolType = "yes" OptionsBoolNo OptionsBoolType = "no" OptionsBoolNotSet = "" )
func (OptionsBoolType) String ¶
func (t OptionsBoolType) String() string
type OptionsList ¶
type OptionsList struct {
// contains filtered or unexported fields
}
func (OptionsList) Command ¶
func (c OptionsList) Command() string
type OptionsOutputFormatType ¶
type OptionsOutputFormatType string
const ( OptionsOutputFormatText OptionsOutputFormatType = "text" OptionsOutputFormatJson = "json" )
func (OptionsOutputFormatType) String ¶
func (t OptionsOutputFormatType) String() string
type ProgressInfo ¶
type Respond ¶
type Respond struct { Type RespondType `json:"type, not_null"` ErrorType RespondErrorType `json:"error-type"` Message string `json:"message"` Body json.RawMessage `json:"body"` }
func (Respond) IsProgress ¶
type RespondErrorType ¶
type RespondErrorType string
type RespondReader ¶
type RespondReader func(res *[]Respond, date string, doneChan chan bool, onSuccess OnSuccessRespond, onError OnErrorRespond, onProgress OnProgressRespond) error
type RespondType ¶
type RespondType string
type RestoreInfobase ¶
type RestoreInfobase struct { // --file <имя файла> ‑ определяет имя dt-файла. File string // contains filtered or unexported fields }
restore-ib Команда предназначена для выполнения загрузки информационной базы из dt-файл. Допустимо использование следующих параметров:
func (RestoreInfobase) Args ¶
func (c RestoreInfobase) Args() []string
func (RestoreInfobase) Command ¶
func (c RestoreInfobase) Command() string
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) ClearChannel ¶
func (this *Session) ClearChannel()
func (*Session) RawReadChannel ¶
func (*Session) ReadChannel ¶
func (*Session) ReadChannelExpect ¶
func (*Session) ReadChannelRegExp ¶
func (*Session) ReadChannelTiming ¶
func (*Session) WriteChannel ¶
type SetExtensionProperties ¶
type SetExtensionProperties struct { //--extension <имя> ‑ задает имя расширения, для которого необходимо получить свойства. Extension string //--active <режим> ‑ определяет активность расширения. <Режим> может принимать следующие значения: // yes ‑ расширение активно. // no ‑ расширение не активно. Active ExtensionPropertiesBoolType //--safe-mode <режим> ‑ определяет работу в безопасном режиме. <Режим> может принимать следующие значения: // yes ‑ расширение работает в безопасном режиме. // no ‑ расширение работает в небезопасном режиме. В этом случае имя профиля безопасности автоматически сбрасывается (имя профиля устанавливается равным пустой строке). SafeMode ExtensionPropertiesBoolType //--security-profile-name <профиль> ‑ определяет имя профиля безопасности, под управлением которого работает расширение. //Если задается имя профиля безопасности, то автоматически устанавливается и признак работы в безопасном режиме. SecurityProfileName string //--unsafe-action-protection <режим> ‑ определяет режим защиты от опасных действий. <Режим> может принимать следующие значения: // yes ‑ защита от опасных действий в расширении включена. // no ‑ защита от опасных действий в расширении отключена. UnsafeActionProtection ExtensionPropertiesBoolType //--used-in-distributed-infobase <режим> ‑ определяет возможность работы расширения в распределенной информационной базе. <Режим> может принимать следующие значения: // yes ‑ расширение используется в распределенной информационной базе. // no ‑ расширение не используется в распределенной информационной базе. UsedInDistributedInfobase ExtensionPropertiesBoolType //--scope <область действия> ‑ область действия расширения. <Область действия> может принимать следующие значения: // infobase ‑ расширение действительно для все информационной базы. // data-separation ‑ расширение действительно для области данных. Scope ExtensionPropertiesScopeType // contains filtered or unexported fields }
set Команда предназначена для установки свойств расширения, расположенного в информационной базе.
func (SetExtensionProperties) Args ¶
func (c SetExtensionProperties) Args() []string
func (SetExtensionProperties) Command ¶
func (c SetExtensionProperties) Command() string
type SetOptions ¶
type SetOptions struct { // --output-format ‑ позволяет указать формат вывода результата работы команд: // text ‑ команды возвращают результат в текстовом формате. // json ‑ команды возвращают результат в формате JSON-сообщений. OutputFormat OptionsOutputFormatType `json:"output-format"` // --show-prompt ‑ позволяет управлять наличием приглашения командной строки designer>: // yes ‑ в командной строке есть приглашение; // no ‑ в командной строке нет приглашения. ShowPrompt OptionsBoolType `json:"show-prompt"` // --notify-progress ‑ позволяет получить информацию об отображении прогресса выполнения команды. NotifyProgress OptionsBoolType `json:"notify-progress"` // --notify-progress-interval ‑ позволяет получить интервал времени, через который обновляется информация о прогрессе. NotifyProgressInterval int `json:"notify-progress-interval"` // contains filtered or unexported fields }
func (SetOptions) Args ¶
func (c SetOptions) Args() []string
func (SetOptions) Command ¶
func (c SetOptions) Command() string
type TaskHook ¶
type TaskHook struct { Upload []TransferTask Download []TransferTask ConnectIB bool DisconnectIB bool }
func (*TaskHook) DownloadDir ¶
func (*TaskHook) DownloadFile ¶
func (*TaskHook) UploadFile ¶
type TransferTask ¶
type UpdateDbCfg ¶
type UpdateDbCfg struct { //--prompt-confirmation ‑ определяет необходимость запроса у пользователя подтверждения о принятии изменений при реструктуризации информационной базы. PromptConfirmation bool //--dynamic-enable ‑ сначала выполняется попытка динамического обновления, если она завершена неудачно, будет запущено фоновое обновление. DynamicEnable bool //--dynamic-disable ‑ указание данного параметра запрещает динамическое обновление. DynamicDisable bool //--warnings-as-errors ‑ при указании данного параметра все предупреждения, //которые могут возникнуть при обновлении конфигурации базы данных, будут считаться ошибками. WarningsAsErrors bool //--background-start ‑ при указании данного параметра будет запущено фоновое обновление конфигурации, а текущий сеанс будет завершен. BackgroundStart bool //--background-cancel ‑ при указании данного параметра происходит отмена запущенного фонового обновления конфигурации базы данных. BackgroundCancel bool //--background-finish ‑ при указании данного параметра запущенное фоновое обновление конфигурации базы данных будет завершено. BackgroundFinish bool //При этом на базу данных будет наложена монопольная блокировка и проведена финальная фаза обновления. //--background-resume ‑ при указании данного параметра система продолжает фоновое обновление конфигурации базы данных, приостановленное ранее. BackgroundResume bool //--server ‑ данный параметр указывает, что обновление конфигурации базы данных необходимо выполнить на стороне сервер «1С:Предприятия». Server bool //--extension <имя расширения> ‑ имя расширения. Extension string // contains filtered or unexported fields }
update-db-cfg Команда позволяет выполнить обновление конфигурации базы данных. При выполнении команды update-db-cfg используется следующий алгоритм работы: В том случае, если невозможно монопольно заблокировать базу данных и динамическое обновление возможно (не указан параметр --dynamic-disable) ‑ будет выполнено динамическое обновление конфигурации базы данных. В том случае, если монопольно заблокировать базу данных возможно, но не требуется выполнять реструктуризацию базы данных ‑ будет выполнено обычное обновление конфигурации базы данных. В том случае, если монопольно заблокировать базу данных возможно и требуется выполнить реструктуризацию базы данных, то будет выполнена следующая последовательность действий:
выполняется определение списка измененных объектов; полученный список отображается в консоли;
если указана необходимость подтверждения пользователя на принятие изменений (параметр --prompt-confirmation) ‑ пользователю задается соответствующий вопрос; если ответ на вопрос отрицательный ‑ обновление отменяется с выдачей соответствующего уведомления; если ответ утвердительный или запрос не требовался ‑ обновление продолжается штатным образом.
func (UpdateDbCfg) Args ¶
func (c UpdateDbCfg) Args() []string
func (UpdateDbCfg) Command ¶
func (c UpdateDbCfg) Command() string