Skip to content

Commit

Permalink
Finish v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
khorevaa committed Dec 19, 2020
2 parents f7c1aba + 242a8ef commit ca11cd8
Show file tree
Hide file tree
Showing 18 changed files with 1,165 additions and 31 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func main() {
infobase := v8.NewFileIB("./infobase")
//infobase := v8.NewServerIB("app", "demobase")

what := v8.LoadCfg("./1cv8.cf)
what := v8.LoadCfg("./1cv8.cf")
//what := v8.DumpCfg("./1cv8.cf)
//what := v8.DumpIB("./1cv8.dt)

Expand Down
1 change: 1 addition & 0 deletions agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/v8platform/designer"
)

// AgentMode получает команду запуска в режиме агента конфигуратора
func AgentMode(visible bool) designer.AgentModeOptions {

command := designer.AgentModeOptions{
Expand Down
19 changes: 19 additions & 0 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,29 @@ import (
"strings"
)

// Run выполняет запуск команды пакетного режима 1С.Предприятие
// where - место выполнения команды
// what - команда покетного режима
// opts - дополнительные опции запуска
func Run(where runner.Infobase, what runner.Command, opts ...interface{}) error {

return runner.Run(where, what, opts...)

}

// Background выполняет запуск команды пакетного режима 1С.Предприятие в контексте
// ctx - контекст выполнения команды
// where - место выполнения команды
// what - команда покетного режима
// opts - дополнительные опции запуска
// Подробные примеры см. v8.Run
func Background(ctx context.Context, where runner.Infobase, what runner.Command, opts ...interface{}) (runner.Process, error) {

return runner.Background(ctx, where, what, opts...)

}

// CreateInfobase выполняет создаение новой информационной базы по переданным параметрам
func CreateInfobase(create runner.Command, opts ...interface{}) (*Infobase, error) {

if create.Command() != runner.CreateInfobase {
Expand All @@ -35,3 +46,11 @@ func CreateInfobase(create runner.Command, opts ...interface{}) (*Infobase, erro
connectionString := strings.Join(connectionStringValues, ";")
return ParseConnectionString(connectionString)
}

// CreateTempInfobase выполняет создаение новой временной информационной базы
func CreateTempInfobase(opts ...interface{}) (*Infobase, error) {

create := CreateFileInfobase(NewTempDir("", "v8_temp_ib"))

return CreateInfobase(create, opts...)
}
Loading

0 comments on commit ca11cd8

Please sign in to comment.