zrepl/zfs/filesystemplaceholdercreateencryptionvalue_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

51 lines
2.2 KiB
Go

// Code generated by "enumer -type=FilesystemPlaceholderCreateEncryptionValue -trimprefix=FilesystemPlaceholderCreateEncryption"; DO NOT EDIT.
package zfs
import (
"fmt"
)
const _FilesystemPlaceholderCreateEncryptionValueName = "InheritOff"
var _FilesystemPlaceholderCreateEncryptionValueIndex = [...]uint8{0, 7, 10}
func (i FilesystemPlaceholderCreateEncryptionValue) String() string {
i -= 1
if i < 0 || i >= FilesystemPlaceholderCreateEncryptionValue(len(_FilesystemPlaceholderCreateEncryptionValueIndex)-1) {
return fmt.Sprintf("FilesystemPlaceholderCreateEncryptionValue(%d)", i+1)
}
return _FilesystemPlaceholderCreateEncryptionValueName[_FilesystemPlaceholderCreateEncryptionValueIndex[i]:_FilesystemPlaceholderCreateEncryptionValueIndex[i+1]]
}
var _FilesystemPlaceholderCreateEncryptionValueValues = []FilesystemPlaceholderCreateEncryptionValue{1, 2}
var _FilesystemPlaceholderCreateEncryptionValueNameToValueMap = map[string]FilesystemPlaceholderCreateEncryptionValue{
_FilesystemPlaceholderCreateEncryptionValueName[0:7]: 1,
_FilesystemPlaceholderCreateEncryptionValueName[7:10]: 2,
}
// FilesystemPlaceholderCreateEncryptionValueString retrieves an enum value from the enum constants string name.
// Throws an error if the param is not part of the enum.
func FilesystemPlaceholderCreateEncryptionValueString(s string) (FilesystemPlaceholderCreateEncryptionValue, error) {
if val, ok := _FilesystemPlaceholderCreateEncryptionValueNameToValueMap[s]; ok {
return val, nil
}
return 0, fmt.Errorf("%s does not belong to FilesystemPlaceholderCreateEncryptionValue values", s)
}
// FilesystemPlaceholderCreateEncryptionValueValues returns all values of the enum
func FilesystemPlaceholderCreateEncryptionValueValues() []FilesystemPlaceholderCreateEncryptionValue {
return _FilesystemPlaceholderCreateEncryptionValueValues
}
// IsAFilesystemPlaceholderCreateEncryptionValue returns "true" if the value is listed in the enum definition. "false" otherwise
func (i FilesystemPlaceholderCreateEncryptionValue) IsAFilesystemPlaceholderCreateEncryptionValue() bool {
for _, v := range _FilesystemPlaceholderCreateEncryptionValueValues {
if i == v {
return true
}
}
return false
}