zrepl/endpoint/placeholdercreationencryptionproperty_enumer.go
Christian Schwarz def510abfd chore: require go 1.22/1.23, upgrade protobuf, upgrade all deps
Go upgrade:
- Go 1.23 is current => use that for release builds
- Go 1.22 is less than one year old, it's desirable to support it.
- The [`Go Toolchains`](https://go.dev/doc/toolchain) stuff is available
  in both of these (would also be in Go 1.21). That is quite nice stuff,
  but required some changes to how we versions we use in CircleCI and
  the `release-docker` Makefile target.

Protobuf upgrade:
- Go to protobuf GH release website
- Download latest locally
- run `sha256sum`
- replace existing pinned hashes
- `make generate`

Deps upgrade:
- `go get -t -u all`
- repository moves aren't handled well automatically, fix manually
- repeat until no changes
2024-09-08 20:49:09 +00:00

62 lines
2.3 KiB
Go

// Code generated by "enumer -type=PlaceholderCreationEncryptionProperty -transform=kebab -trimprefix=PlaceholderCreationEncryptionProperty"; DO NOT EDIT.
package endpoint
import (
"fmt"
)
const (
_PlaceholderCreationEncryptionPropertyName_0 = "unspecifiedinherit"
_PlaceholderCreationEncryptionPropertyName_1 = "off"
)
var (
_PlaceholderCreationEncryptionPropertyIndex_0 = [...]uint8{0, 11, 18}
_PlaceholderCreationEncryptionPropertyIndex_1 = [...]uint8{0, 3}
)
func (i PlaceholderCreationEncryptionProperty) String() string {
switch {
case 1 <= i && i <= 2:
i -= 1
return _PlaceholderCreationEncryptionPropertyName_0[_PlaceholderCreationEncryptionPropertyIndex_0[i]:_PlaceholderCreationEncryptionPropertyIndex_0[i+1]]
case i == 4:
return _PlaceholderCreationEncryptionPropertyName_1
default:
return fmt.Sprintf("PlaceholderCreationEncryptionProperty(%d)", i)
}
}
var _PlaceholderCreationEncryptionPropertyValues = []PlaceholderCreationEncryptionProperty{1, 2, 4}
var _PlaceholderCreationEncryptionPropertyNameToValueMap = map[string]PlaceholderCreationEncryptionProperty{
_PlaceholderCreationEncryptionPropertyName_0[0:11]: 1,
_PlaceholderCreationEncryptionPropertyName_0[11:18]: 2,
_PlaceholderCreationEncryptionPropertyName_1[0:3]: 4,
}
// PlaceholderCreationEncryptionPropertyString retrieves an enum value from the enum constants string name.
// Throws an error if the param is not part of the enum.
func PlaceholderCreationEncryptionPropertyString(s string) (PlaceholderCreationEncryptionProperty, error) {
if val, ok := _PlaceholderCreationEncryptionPropertyNameToValueMap[s]; ok {
return val, nil
}
return 0, fmt.Errorf("%s does not belong to PlaceholderCreationEncryptionProperty values", s)
}
// PlaceholderCreationEncryptionPropertyValues returns all values of the enum
func PlaceholderCreationEncryptionPropertyValues() []PlaceholderCreationEncryptionProperty {
return _PlaceholderCreationEncryptionPropertyValues
}
// IsAPlaceholderCreationEncryptionProperty returns "true" if the value is listed in the enum definition. "false" otherwise
func (i PlaceholderCreationEncryptionProperty) IsAPlaceholderCreationEncryptionProperty() bool {
for _, v := range _PlaceholderCreationEncryptionPropertyValues {
if i == v {
return true
}
}
return false
}