2023-03-28 18:39:22 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2021-11-16 18:04:01 +00:00
|
|
|
//go:build !consulent
|
2020-06-26 21:59:15 +00:00
|
|
|
// +build !consulent
|
|
|
|
|
|
|
|
package state
|
|
|
|
|
|
|
|
import (
|
|
|
|
memdb "github.com/hashicorp/go-memdb"
|
2021-01-30 00:17:40 +00:00
|
|
|
|
2022-04-05 21:10:06 +00:00
|
|
|
"github.com/hashicorp/consul/acl"
|
2023-04-20 16:16:04 +00:00
|
|
|
"github.com/hashicorp/consul/agent/structs"
|
2020-06-26 21:59:15 +00:00
|
|
|
)
|
|
|
|
|
2022-04-05 21:10:06 +00:00
|
|
|
func intentionListTxn(tx ReadTxn, _ *acl.EnterpriseMeta) (memdb.ResultIterator, error) {
|
2020-06-26 21:59:15 +00:00
|
|
|
// Get all intentions
|
2021-01-30 00:17:40 +00:00
|
|
|
return tx.Get(tableConnectIntentions, "id")
|
2020-06-26 21:59:15 +00:00
|
|
|
}
|
2023-04-20 16:16:04 +00:00
|
|
|
|
|
|
|
func getSimplifiedIntentions(
|
|
|
|
tx ReadTxn,
|
|
|
|
ws memdb.WatchSet,
|
|
|
|
ixns structs.Intentions,
|
|
|
|
entMeta acl.EnterpriseMeta,
|
|
|
|
) (uint64, structs.Intentions, error) {
|
|
|
|
return 0, ixns, nil
|
|
|
|
}
|