Files
threshold/internal/server/state.go
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
489 B
Go
Raw Normal View History

2023-02-02 17:15:17 -08:00
// Copyright (c) HashiCorp, Inc.
2022-05-10 10:03:08 -04:00
// SPDX-License-Identifier: BUSL-1.1
2023-02-02 17:15:17 -08:00
2022-06-20 18:20:17 -07:00
package server
2022-05-10 10:03:08 -04:00
// 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
}
}