mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-11 13:29:12 +00:00
* feat: add new supported attestation formats to genesis * feat: refactor keyType to keytype enum * refactor: remove unused imports and code * refactor: update main.go to use src package * refactor: move web-related structs from to * refactor: move client middleware package to root * refactor: remove unused IndexedDB dependency * feat: update worker implementation to use * feat: add Caddyfile and Caddy configuration for vault service * refactor(config): move keyshare and address to Motr config * fix: validate service origin in AllocateVault * chore: remove IndexedDB configuration * feat: add support for IPNS-based vault access
53 lines
1.0 KiB
Go
53 lines
1.0 KiB
Go
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
|
package didmethod
|
|
|
|
import (
|
|
"encoding"
|
|
"fmt"
|
|
)
|
|
|
|
type DIDMethod string
|
|
|
|
const (
|
|
Ipfs DIDMethod = "ipfs"
|
|
Sonr DIDMethod = "sonr"
|
|
Bitcoin DIDMethod = "bitcoin"
|
|
Ethereum DIDMethod = "ethereum"
|
|
Ibc DIDMethod = "ibc"
|
|
Webauthn DIDMethod = "webauthn"
|
|
Dwn DIDMethod = "dwn"
|
|
Service DIDMethod = "service"
|
|
)
|
|
|
|
// String returns the string representation of DIDMethod
|
|
func (rcv DIDMethod) String() string {
|
|
return string(rcv)
|
|
}
|
|
|
|
var _ encoding.BinaryUnmarshaler = new(DIDMethod)
|
|
|
|
// UnmarshalBinary implements encoding.BinaryUnmarshaler for DIDMethod.
|
|
func (rcv *DIDMethod) UnmarshalBinary(data []byte) error {
|
|
switch str := string(data); str {
|
|
case "ipfs":
|
|
*rcv = Ipfs
|
|
case "sonr":
|
|
*rcv = Sonr
|
|
case "bitcoin":
|
|
*rcv = Bitcoin
|
|
case "ethereum":
|
|
*rcv = Ethereum
|
|
case "ibc":
|
|
*rcv = Ibc
|
|
case "webauthn":
|
|
*rcv = Webauthn
|
|
case "dwn":
|
|
*rcv = Dwn
|
|
case "service":
|
|
*rcv = Service
|
|
default:
|
|
return fmt.Errorf(`illegal: "%s" is not a valid DIDMethod`, str)
|
|
}
|
|
return nil
|
|
}
|