mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 18:01:39 +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
44 lines
1.0 KiB
Go
44 lines
1.0 KiB
Go
// Code generated from Pkl module `sonr.orm.UCAN`. DO NOT EDIT.
|
|
package resinterchain
|
|
|
|
import (
|
|
"encoding"
|
|
"fmt"
|
|
)
|
|
|
|
type ResInterchain string
|
|
|
|
const (
|
|
ChannnelPort ResInterchain = "channnel/port"
|
|
ChainId ResInterchain = "chain/id"
|
|
ChainName ResInterchain = "chain/name"
|
|
AccHost ResInterchain = "acc/host"
|
|
AccController ResInterchain = "acc/controller"
|
|
)
|
|
|
|
// String returns the string representation of ResInterchain
|
|
func (rcv ResInterchain) String() string {
|
|
return string(rcv)
|
|
}
|
|
|
|
var _ encoding.BinaryUnmarshaler = new(ResInterchain)
|
|
|
|
// UnmarshalBinary implements encoding.BinaryUnmarshaler for ResInterchain.
|
|
func (rcv *ResInterchain) UnmarshalBinary(data []byte) error {
|
|
switch str := string(data); str {
|
|
case "channnel/port":
|
|
*rcv = ChannnelPort
|
|
case "chain/id":
|
|
*rcv = ChainId
|
|
case "chain/name":
|
|
*rcv = ChainName
|
|
case "acc/host":
|
|
*rcv = AccHost
|
|
case "acc/controller":
|
|
*rcv = AccController
|
|
default:
|
|
return fmt.Errorf(`illegal: "%s" is not a valid ResInterchain`, str)
|
|
}
|
|
return nil
|
|
}
|