github.com/hashicorp/vault/sdk@v0.13.0/helper/consts/deprecation_status.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  package consts
     5  
     6  // EnvVaultAllowPendingRemovalMounts allows Pending Removal builtins to be
     7  // mounted as if they are Deprecated to facilitate migration to supported
     8  // builtin plugins.
     9  const EnvVaultAllowPendingRemovalMounts = "VAULT_ALLOW_PENDING_REMOVAL_MOUNTS"
    10  
    11  // DeprecationStatus represents the current deprecation state for builtins
    12  type DeprecationStatus uint32
    13  
    14  // These are the states of deprecation for builtin plugins
    15  const (
    16  	Supported = iota
    17  	Deprecated
    18  	PendingRemoval
    19  	Removed
    20  	Unknown
    21  )
    22  
    23  // String returns the string representation of a builtin deprecation status
    24  func (s DeprecationStatus) String() string {
    25  	switch s {
    26  	case Supported:
    27  		return "supported"
    28  	case Deprecated:
    29  		return "deprecated"
    30  	case PendingRemoval:
    31  		return "pending removal"
    32  	case Removed:
    33  		return "removed"
    34  	default:
    35  		return ""
    36  	}
    37  }