You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boundary/internal/server/state.go

24 lines
489 B

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package server
// CertificateState defines the possible states for a workerauth certificate
type CertificateState string
const (
UnknownState CertificateState = "unknown"
CurrentState CertificateState = "current"
NextState CertificateState = "next"
)
func validState(s CertificateState) bool {
st := CertificateState(s)
switch st {
case CurrentState, NextState:
return true
default:
return false
}
}