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
|
2019-10-25 15:06:16 +00:00
|
|
|
// +build !consulent
|
|
|
|
|
|
|
|
package consul
|
|
|
|
|
|
|
|
import (
|
2022-12-14 15:24:22 +00:00
|
|
|
"context"
|
2021-09-16 14:17:02 +00:00
|
|
|
"fmt"
|
|
|
|
|
2019-10-25 15:06:16 +00:00
|
|
|
"github.com/hashicorp/consul/acl"
|
|
|
|
"github.com/hashicorp/consul/agent/structs"
|
|
|
|
)
|
|
|
|
|
|
|
|
func testIdentityForTokenEnterprise(string) (bool, structs.ACLIdentity, error) {
|
|
|
|
return true, nil, acl.ErrNotFound
|
|
|
|
}
|
|
|
|
|
|
|
|
func testPolicyForIDEnterprise(string) (bool, *structs.ACLPolicy, error) {
|
|
|
|
return true, nil, acl.ErrNotFound
|
|
|
|
}
|
|
|
|
|
|
|
|
func testRoleForIDEnterprise(string) (bool, *structs.ACLRole, error) {
|
|
|
|
return true, nil, acl.ErrNotFound
|
|
|
|
}
|
|
|
|
|
|
|
|
// EnterpriseACLResolverTestDelegate stub
|
|
|
|
type EnterpriseACLResolverTestDelegate struct{}
|
|
|
|
|
|
|
|
// RPC stub for the EnterpriseACLResolverTestDelegate
|
2022-12-14 15:24:22 +00:00
|
|
|
func (d *EnterpriseACLResolverTestDelegate) RPC(context.Context, string, interface{}, interface{}) (bool, error) {
|
2019-10-25 15:06:16 +00:00
|
|
|
return false, nil
|
|
|
|
}
|
2021-09-16 14:17:02 +00:00
|
|
|
|
|
|
|
func (d *EnterpriseACLResolverTestDelegate) UseTestLocalData(data []interface{}) {
|
|
|
|
if len(data) > 0 {
|
|
|
|
panic(fmt.Sprintf("unexpected data type: %T", data[0]))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (d *EnterpriseACLResolverTestDelegate) UseDefaultData() {}
|
2021-09-16 20:53:10 +00:00
|
|
|
func (d *EnterpriseACLResolverTestDelegate) Reset() {}
|