Skip to content

Commit ca11cd8

Browse files
committed
Finish v0.2.0
2 parents f7c1aba + 242a8ef commit ca11cd8

18 files changed

+1165
-31
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func main() {
1616
infobase := v8.NewFileIB("./infobase")
1717
//infobase := v8.NewServerIB("app", "demobase")
1818

19-
what := v8.LoadCfg("./1cv8.cf)
19+
what := v8.LoadCfg("./1cv8.cf")
2020
//what := v8.DumpCfg("./1cv8.cf)
2121
//what := v8.DumpIB("./1cv8.dt)
2222

agent.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"github.com/v8platform/designer"
55
)
66

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

910
command := designer.AgentModeOptions{

api.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,29 @@ import (
77
"strings"
88
)
99

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

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

1418
}
1519

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

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

2030
}
2131

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

2435
if create.Command() != runner.CreateInfobase {
@@ -35,3 +46,11 @@ func CreateInfobase(create runner.Command, opts ...interface{}) (*Infobase, erro
3546
connectionString := strings.Join(connectionStringValues, ";")
3647
return ParseConnectionString(connectionString)
3748
}
49+
50+
// CreateTempInfobase выполняет создаение новой временной информационной базы
51+
func CreateTempInfobase(opts ...interface{}) (*Infobase, error) {
52+
53+
create := CreateFileInfobase(NewTempDir("", "v8_temp_ib"))
54+
55+
return CreateInfobase(create, opts...)
56+
}

0 commit comments

Comments
 (0)