sonr/pkg/orm/keysharerole/KeyShareRole.pkl.go
Prad Nukala 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

35 lines
732 B
Go

// Code generated from Pkl module `models`. DO NOT EDIT.
package keysharerole
import (
"encoding"
"fmt"
)
type KeyShareRole string
const (
User KeyShareRole = "user"
Validator KeyShareRole = "validator"
)
// String returns the string representation of KeyShareRole
func (rcv KeyShareRole) String() string {
return string(rcv)
}
var _ encoding.BinaryUnmarshaler = new(KeyShareRole)
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyShareRole.
func (rcv *KeyShareRole) UnmarshalBinary(data []byte) error {
switch str := string(data); str {
case "user":
*rcv = User
case "validator":
*rcv = Validator
default:
return fmt.Errorf(`illegal: "%s" is not a valid KeyShareRole`, str)
}
return nil
}