Files
sonr/pkg/orm/keyalgorithm/KeyAlgorithm.pkl.go
T
Prad NukalaandGitHub d04c87de43 feature/refactor types (#1101)
- **docs: remove discord badge from README**
- **fix: ensure go version is up-to-date**
- **<no value>**
- **refactor: update import paths for blocks to components**
- **feat: add Hero component template**
- **fix: update footer logo to svg**
- **feat: add Query/Sign and Query/Verify RPC methods**
- **refactor: rename Keyshares to KsVal in did/v1/state.proto**
2024-09-29 14:40:36 -04:00

47 lines
964 B
Go

// Code generated from Pkl module `models`. DO NOT EDIT.
package keyalgorithm
import (
"encoding"
"fmt"
)
type KeyAlgorithm string
const (
Es256 KeyAlgorithm = "es256"
Es384 KeyAlgorithm = "es384"
Es512 KeyAlgorithm = "es512"
Eddsa KeyAlgorithm = "eddsa"
Es256k KeyAlgorithm = "es256k"
Ecdsa KeyAlgorithm = "ecdsa"
)
// String returns the string representation of KeyAlgorithm
func (rcv KeyAlgorithm) String() string {
return string(rcv)
}
var _ encoding.BinaryUnmarshaler = new(KeyAlgorithm)
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyAlgorithm.
func (rcv *KeyAlgorithm) UnmarshalBinary(data []byte) error {
switch str := string(data); str {
case "es256":
*rcv = Es256
case "es384":
*rcv = Es384
case "es512":
*rcv = Es512
case "eddsa":
*rcv = Eddsa
case "es256k":
*rcv = Es256k
case "ecdsa":
*rcv = Ecdsa
default:
return fmt.Errorf(`illegal: "%s" is not a valid KeyAlgorithm`, str)
}
return nil
}