consul/internal/auth/exports.go
skpratt e5808d85f7
register traffic permission and workload identity types (#18704)
* add workload identity and traffic permission protos

* register new types

* add generated pb code

* fix exports.go path

* add proto newlines

* fix type name

Co-authored-by: Eric Haberkorn <erichaberkorn@gmail.com>

* address review

* fix protos and add tests

* fix validation constraints

* add tests

---------

Co-authored-by: Eric Haberkorn <erichaberkorn@gmail.com>
2023-09-14 12:40:54 -05:00

42 lines
1.2 KiB
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package auth
import (
"github.com/hashicorp/consul/internal/auth/internal/types"
"github.com/hashicorp/consul/internal/resource"
)
var (
// API Group Information
APIGroup = types.GroupName
VersionV1Alpha1 = types.VersionV1Alpha1
CurrentVersion = types.CurrentVersion
// Resource Kind Names.
WorkloadIdentity = types.WorkloadIdentityKind
TrafficPermissions = types.TrafficPermissionsKind
ComputedTrafficPermissions = types.ComputedTrafficPermissionsKind
// Resource Types for the v1alpha1 version.
WorkloadIdentityV1Alpha1Type = types.WorkloadIdentityV1Alpha1Type
TrafficPermissionsV1Alpha1Type = types.TrafficPermissionsV1Alpha1Type
ComputedTrafficPermissionsV1Alpha1Type = types.ComputedTrafficPermissionsV1Alpha1Type
// Resource Types for the latest version.
WorkloadIdentityType = types.WorkloadIdentityType
TrafficPermissionsType = types.TrafficPermissionsType
ComputedTrafficPermissionsType = types.ComputedTrafficPermissionsType
)
// RegisterTypes adds all resource types within the "catalog" API group
// to the given type registry
func RegisterTypes(r resource.Registry) {
types.Register(r)
}