Debian Codegraph @

nft/table.go

raw symbols SCIP
1 /*
2 * This file is part of the go-nft project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * Copyright 2021 Red Hat, Inc.
17 *
18 */
19
20 package nftscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/
21
22 import "github.com/networkplumbing/go-nft/nft/schemascip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/"
23
24 type AddressFamilyscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/AddressFamily# string
25
26 // Address Families
27 const (
28 FamilyIPscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/FamilyIP. AddressFamilyscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/AddressFamily# = schemascip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/.FamilyIPscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/FamilyIP.
29 FamilyIP6scip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/FamilyIP6. AddressFamilyscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/AddressFamily# = schemascip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/.FamilyIP6scip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/FamilyIP6.
30 FamilyINETscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/FamilyINET. AddressFamilyscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/AddressFamily# = schemascip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/.FamilyINETscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/FamilyINET.
31 FamilyARPscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/FamilyARP. AddressFamilyscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/AddressFamily# = schemascip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/.FamilyARPscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/FamilyARP.
32 FamilyBridgescip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/FamilyBridge. AddressFamilyscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/AddressFamily# = schemascip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/.FamilyBridgescip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/FamilyBridge.
33 FamilyNETDEVscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/FamilyNETDEV. AddressFamilyscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/AddressFamily# = schemascip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/.FamilyNETDEVscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/FamilyNETDEV.
34 )
35
36 type TableActionscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/TableAction# string
37
38 // Table Actions
39 const (
40 TableADDscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/TableADD. TableActionscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/TableAction# = "add"
41 TableDELETEscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/TableDELETE. TableActionscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/TableAction# = "delete"
42 TableFLUSHscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/TableFLUSH. TableActionscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/TableAction# = "flush"
43 )
44
45 // NewTable returns a new schema table structure.
46 func NewTablescip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/NewTable().(name string, family AddressFamilyscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft`/AddressFamily#) *schemascip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/.Tablescip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/Table# {
47 return &schemascip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/.Tablescip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/Table#{
48 Namescip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/Table#Name.: name,
49 Familyscip-go gomod github.com/networkplumbing/go-nft . `github.com/networkplumbing/go-nft/nft/schema`/Table#Family.: string(family),
50 }
51 }