mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-11 13:29:12 +00:00
- **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**
41 lines
880 B
Go
41 lines
880 B
Go
// Code generated from Pkl module `models`. DO NOT EDIT.
|
|
package keyrole
|
|
|
|
import (
|
|
"encoding"
|
|
"fmt"
|
|
)
|
|
|
|
type KeyRole string
|
|
|
|
const (
|
|
Authentication KeyRole = "authentication"
|
|
Assertion KeyRole = "assertion"
|
|
Delegation KeyRole = "delegation"
|
|
Invocation KeyRole = "invocation"
|
|
)
|
|
|
|
// String returns the string representation of KeyRole
|
|
func (rcv KeyRole) String() string {
|
|
return string(rcv)
|
|
}
|
|
|
|
var _ encoding.BinaryUnmarshaler = new(KeyRole)
|
|
|
|
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyRole.
|
|
func (rcv *KeyRole) UnmarshalBinary(data []byte) error {
|
|
switch str := string(data); str {
|
|
case "authentication":
|
|
*rcv = Authentication
|
|
case "assertion":
|
|
*rcv = Assertion
|
|
case "delegation":
|
|
*rcv = Delegation
|
|
case "invocation":
|
|
*rcv = Invocation
|
|
default:
|
|
return fmt.Errorf(`illegal: "%s" is not a valid KeyRole`, str)
|
|
}
|
|
return nil
|
|
}
|