mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 02:11:40 +00:00
* refactor: update import paths in gateway handlers * refactor: remove obsolete devtools Makefile and README * build: optimize build process for improved efficiency * refactor: remove obsolete pkl files related to Matrix and Sonr network configurations * refactor: move embed code to x/dwn/types
50 lines
1.1 KiB
Go
50 lines
1.1 KiB
Go
// Code generated from Pkl module `sonr.orm.UCAN`. DO NOT EDIT.
|
|
package capvault
|
|
|
|
import (
|
|
"encoding"
|
|
"fmt"
|
|
)
|
|
|
|
type CapVault string
|
|
|
|
const (
|
|
CrudAsset CapVault = "crud/asset"
|
|
CrudAuthzgrant CapVault = "crud/authzgrant"
|
|
CrudProfile CapVault = "crud/profile"
|
|
CrudRecord CapVault = "crud/record"
|
|
UseRecovery CapVault = "use/recovery"
|
|
UseSync CapVault = "use/sync"
|
|
UseSigner CapVault = "use/signer"
|
|
)
|
|
|
|
// String returns the string representation of CapVault
|
|
func (rcv CapVault) String() string {
|
|
return string(rcv)
|
|
}
|
|
|
|
var _ encoding.BinaryUnmarshaler = new(CapVault)
|
|
|
|
// UnmarshalBinary implements encoding.BinaryUnmarshaler for CapVault.
|
|
func (rcv *CapVault) UnmarshalBinary(data []byte) error {
|
|
switch str := string(data); str {
|
|
case "crud/asset":
|
|
*rcv = CrudAsset
|
|
case "crud/authzgrant":
|
|
*rcv = CrudAuthzgrant
|
|
case "crud/profile":
|
|
*rcv = CrudProfile
|
|
case "crud/record":
|
|
*rcv = CrudRecord
|
|
case "use/recovery":
|
|
*rcv = UseRecovery
|
|
case "use/sync":
|
|
*rcv = UseSync
|
|
case "use/signer":
|
|
*rcv = UseSigner
|
|
default:
|
|
return fmt.Errorf(`illegal: "%s" is not a valid CapVault`, str)
|
|
}
|
|
return nil
|
|
}
|