podman

Форк
0
64 строки · 3.0 Кб
1
# Configuration file for c-for-go, which go-libvirt uses to translate the const
2
# and type definitions from the C-language sources in the libvirt project into
3
# Go. This file is used by the c-for-go binary (github.com/xlab/c-for-go), which
4
# is called when 'go generate' is run. See libvirt.go for the command line used.
5
---
6
GENERATOR:
7
    PackageName: libvirt
8
    PackageLicense: |
9
        Copyright 2018 The go-libvirt Authors.
10

11
        Licensed under the Apache License, Version 2.0 (the "License");
12
        you may not use this file except in compliance with the License.
13
        You may obtain a copy of the License at
14

15
          http://www.apache.org/licenses/LICENSE-2.0
16

17
        Unless required by applicable law or agreed to in writing, software
18
        distributed under the License is distributed on an "AS IS" BASIS,
19
        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
        See the License for the specific language governing permissions and
21
        limitations under the License.
22
    Includes: []
23

24
PARSER:
25
    # We can't use environment variables here, but we don't want to process the
26
    # libvirt version installed in the system folders (if any). Instead we'll
27
    # rely on our caller to link the libvirt source directory to lv_source/, and
28
    # run on that code. This isn't ideal, but changes to c-for-go are needed to
29
    # fix it.
30
    IncludePaths: [./lv_source/include, ./lv_source/build/include]
31
    SourcesPaths:
32
        - libvirt/libvirt.h
33
        - libvirt/virterror.h
34

35
TRANSLATOR:
36
    ConstRules:
37
        defines: eval
38
    Rules:
39
        global:
40
            - {action: accept, from: "^vir"}
41
        post-global:
42
            - {action: replace, from: "^vir"}
43
            - {load: snakecase}
44
            # Follow golint's capitalization conventions.
45
            - {action: replace, from: "Api([A-Z]|$)", to: "API$1"}
46
            - {action: replace, from: "Cpu([A-Z]|$)", to: "CPU$1"}
47
            - {action: replace, from: "Dns([A-Z]|$)", to: "DNS$1"}
48
            - {action: replace, from: "Eof([A-Z]|$)", to: "EOF$1"}
49
            - {action: replace, from: "Id([A-Z]|$)", to: "ID$1"}
50
            - {action: replace, from: "Ip([A-Z]|$)", to: "IP$1"}
51
            - {action: replace, from: "Tls([A-Z]|$)", to: "TLS$1"}
52
            - {action: replace, from: "Uuid([A-Z]|$)", to: "UUID$1"}
53
            - {action: replace, from: "Uri([A-Z]|$)", to: "URI$1"}
54
            - {action: replace, from: "Vcpu([A-Z]|$)", to: "VCPU$1"}
55
            - {action: replace, from: "Xml([A-Z]|$)", to: "XML$1"}
56
            - {action: replace, from: "Rpc([A-Z]|$)", to: "RPC$1"}
57
            - {action: replace, from: "Ssh([A-Z]|$)", to: "SSH$1"}
58
            - {action: replace, from: "Http([A-Z]|$)", to: "HTTP$1"}
59
            - {transform: unexport, from: "^From"}
60
        const:
61
            - {action: accept, from: "^VIR_"}
62
            # Special case to prevent a collision with a type:
63
            - {action: replace, from: "^VIR_DOMAIN_JOB_OPERATION", to: "VIR_DOMAIN_JOB_OPERATION_STR"}
64
            - {transform: lower}
65

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.