types

package
v0.0.0-...-78eb55b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "ibcdns"

	// Version defines the current version the DNS module supports
	Version = "ibcdns-1"

	// PortID that DNS module binds to
	PortID = "ibcdns"

	// RouterKey is the msg router key for the IBC module
	RouterKey = ModuleName

	// QuerierRoute is the querier route for Cross
	QuerierRoute = ModuleName
)

Variables

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ErrUnknownRequest = errors.New("unknown request error")

Functions

func ComposeHandlers

func ComposeHandlers(hs ...sdk.Handler) sdk.Handler

func ComposeQuerier

func ComposeQuerier(qs ...sdk.Querier) sdk.Querier

func MarshalJSONAny

func MarshalJSONAny(m codec.JSONMarshaler, x interface{}) ([]byte, error)

MarshalAny is a convenience function for packing the provided value in an Any and then proto marshaling it to bytes

func MustSerializeJSONPacketAck

func MustSerializeJSONPacketAck(cdc codec.JSONMarshaler, msg proto.Message) []byte

func MustSerializeJSONPacketData

func MustSerializeJSONPacketData(cdc codec.JSONMarshaler, msg proto.Message) []byte

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers the client interfaces to protobuf Any.

func SerializeJSONPacketAck

func SerializeJSONPacketAck(cdc codec.JSONMarshaler, msg proto.Message) ([]byte, error)

func SerializeJSONPacketData

func SerializeJSONPacketData(cdc codec.JSONMarshaler, msg proto.Message) ([]byte, error)

func UnmarshalJSONAny

func UnmarshalJSONAny(m codec.Marshaler, iface interface{}, bz []byte) error

UnmarshalAny is a convenience function for proto unmarshaling an Any from bz and then unpacking it to the interface pointer passed in as iface using the provided AnyUnpacker or returning an error

Ex:

var x MyInterface
err := UnmarshalAny(unpacker, &x, bz)

Types

type ChannelKeeper

type ChannelKeeper interface {
	GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool)
	GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool)
	SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error
	ChanCloseInit(ctx sdk.Context, portID, channelID string, chanCap *capabilitytypes.Capability) error
}

ChannelKeeper defines the expected IBC channel keeper

type ClientDomain

type ClientDomain struct {
	DomainName string `protobuf:"bytes,1,opt,name=domain_name,json=domainName,proto3" json:"domain_name,omitempty"`
	ClientId   string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
}

func NewClientDomain

func NewClientDomain(domainName, clientID string) ClientDomain

func (*ClientDomain) Descriptor

func (*ClientDomain) Descriptor() ([]byte, []int)

func (*ClientDomain) GetClientId

func (m *ClientDomain) GetClientId() string

func (*ClientDomain) GetDomainName

func (m *ClientDomain) GetDomainName() string

func (*ClientDomain) Marshal

func (m *ClientDomain) Marshal() (dAtA []byte, err error)

func (*ClientDomain) MarshalTo

func (m *ClientDomain) MarshalTo(dAtA []byte) (int, error)

func (*ClientDomain) MarshalToSizedBuffer

func (m *ClientDomain) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClientDomain) ProtoMessage

func (*ClientDomain) ProtoMessage()

func (*ClientDomain) Reset

func (m *ClientDomain) Reset()

func (*ClientDomain) Size

func (m *ClientDomain) Size() (n int)

func (*ClientDomain) String

func (m *ClientDomain) String() string

func (*ClientDomain) Unmarshal

func (m *ClientDomain) Unmarshal(dAtA []byte) error

func (*ClientDomain) XXX_DiscardUnknown

func (m *ClientDomain) XXX_DiscardUnknown()

func (*ClientDomain) XXX_Marshal

func (m *ClientDomain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClientDomain) XXX_Merge

func (m *ClientDomain) XXX_Merge(src proto.Message)

func (*ClientDomain) XXX_Size

func (m *ClientDomain) XXX_Size() int

func (*ClientDomain) XXX_Unmarshal

func (m *ClientDomain) XXX_Unmarshal(b []byte) error

type ClientKeeper

type ClientKeeper interface {
	GetClientState(ctx sdk.Context, clientID string) (ibcexported.ClientState, bool)
}

ClientKeeper expected account IBC client keeper

type ConnectionKeeper

type ConnectionKeeper interface {
	GetConnection(ctx sdk.Context, connectionID string) (connectiontypes.ConnectionEnd, bool)
}

ConnectionKeeper expected account IBC connection keeper

type DomainAssociation

type DomainAssociation struct {
	Status    uint32       `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	SrcClient ClientDomain `protobuf:"bytes,2,opt,name=src_client,json=srcClient,proto3" json:"src_client"`
	DstClient ClientDomain `protobuf:"bytes,3,opt,name=dst_client,json=dstClient,proto3" json:"dst_client"`
}

func (*DomainAssociation) Descriptor

func (*DomainAssociation) Descriptor() ([]byte, []int)

func (*DomainAssociation) GetDstClient

func (m *DomainAssociation) GetDstClient() ClientDomain

func (*DomainAssociation) GetSrcClient

func (m *DomainAssociation) GetSrcClient() ClientDomain

func (*DomainAssociation) GetStatus

func (m *DomainAssociation) GetStatus() uint32

func (*DomainAssociation) Marshal

func (m *DomainAssociation) Marshal() (dAtA []byte, err error)

func (*DomainAssociation) MarshalTo

func (m *DomainAssociation) MarshalTo(dAtA []byte) (int, error)

func (*DomainAssociation) MarshalToSizedBuffer

func (m *DomainAssociation) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DomainAssociation) ProtoMessage

func (*DomainAssociation) ProtoMessage()

func (*DomainAssociation) Reset

func (m *DomainAssociation) Reset()

func (*DomainAssociation) Size

func (m *DomainAssociation) Size() (n int)

func (*DomainAssociation) String

func (m *DomainAssociation) String() string

func (*DomainAssociation) Unmarshal

func (m *DomainAssociation) Unmarshal(dAtA []byte) error

func (*DomainAssociation) XXX_DiscardUnknown

func (m *DomainAssociation) XXX_DiscardUnknown()

func (*DomainAssociation) XXX_Marshal

func (m *DomainAssociation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DomainAssociation) XXX_Merge

func (m *DomainAssociation) XXX_Merge(src proto.Message)

func (*DomainAssociation) XXX_Size

func (m *DomainAssociation) XXX_Size() int

func (*DomainAssociation) XXX_Unmarshal

func (m *DomainAssociation) XXX_Unmarshal(b []byte) error

type GenesisState

type GenesisState struct {
}

GenesisState defines the ibc-dns genesis state

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns default genesis state

func NewGenesisState

func NewGenesisState(master string) *GenesisState

NewGenesisState is a constructor of GenesisState

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (*GenesisState) Validate

func (gs *GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type LocalChannel

type LocalChannel struct {
	// the port on which the packet will be sent
	SourcePort string `protobuf:"bytes,1,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty" yaml:"source_port"`
	// the channel by which the packet will be sent
	SourceChannel string `protobuf:"bytes,2,opt,name=source_channel,json=sourceChannel,proto3" json:"source_channel,omitempty" yaml:"source_channel"`
	// identifies the port on the receiving chain.
	DestinationPort string `` /* 130-byte string literal not displayed */
	// identifies the channel end on the receiving chain.
	DestinationChannel string `` /* 142-byte string literal not displayed */
}

func NewChannel

func NewChannel(srcPort, srcChannel, dstPort, dstChannel string) LocalChannel

func (*LocalChannel) Descriptor

func (*LocalChannel) Descriptor() ([]byte, []int)

func (*LocalChannel) Marshal

func (m *LocalChannel) Marshal() (dAtA []byte, err error)

func (*LocalChannel) MarshalTo

func (m *LocalChannel) MarshalTo(dAtA []byte) (int, error)

func (*LocalChannel) MarshalToSizedBuffer

func (m *LocalChannel) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LocalChannel) ProtoMessage

func (*LocalChannel) ProtoMessage()

func (*LocalChannel) Reset

func (m *LocalChannel) Reset()

func (*LocalChannel) Size

func (m *LocalChannel) Size() (n int)

func (*LocalChannel) String

func (m *LocalChannel) String() string

func (*LocalChannel) Unmarshal

func (m *LocalChannel) Unmarshal(dAtA []byte) error

func (*LocalChannel) XXX_DiscardUnknown

func (m *LocalChannel) XXX_DiscardUnknown()

func (*LocalChannel) XXX_Marshal

func (m *LocalChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LocalChannel) XXX_Merge

func (m *LocalChannel) XXX_Merge(src proto.Message)

func (*LocalChannel) XXX_Size

func (m *LocalChannel) XXX_Size() int

func (*LocalChannel) XXX_Unmarshal

func (m *LocalChannel) XXX_Unmarshal(b []byte) error

type LocalDNSID

type LocalDNSID struct {
	// the port on which the packet will be sent
	SourcePort string `protobuf:"bytes,1,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty" yaml:"source_port"`
	// the channel by which the packet will be sent
	SourceChannel string `protobuf:"bytes,2,opt,name=source_channel,json=sourceChannel,proto3" json:"source_channel,omitempty" yaml:"source_channel"`
}

func NewLocalDNSID

func NewLocalDNSID(srcPort, srcChannel string) LocalDNSID

func (*LocalDNSID) Descriptor

func (*LocalDNSID) Descriptor() ([]byte, []int)

func (*LocalDNSID) Marshal

func (m *LocalDNSID) Marshal() (dAtA []byte, err error)

func (*LocalDNSID) MarshalTo

func (m *LocalDNSID) MarshalTo(dAtA []byte) (int, error)

func (*LocalDNSID) MarshalToSizedBuffer

func (m *LocalDNSID) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LocalDNSID) ProtoMessage

func (*LocalDNSID) ProtoMessage()

func (*LocalDNSID) Reset

func (m *LocalDNSID) Reset()

func (*LocalDNSID) Size

func (m *LocalDNSID) Size() (n int)

func (*LocalDNSID) String

func (m *LocalDNSID) String() string

func (*LocalDNSID) Unmarshal

func (m *LocalDNSID) Unmarshal(dAtA []byte) error

func (*LocalDNSID) XXX_DiscardUnknown

func (m *LocalDNSID) XXX_DiscardUnknown()

func (*LocalDNSID) XXX_Marshal

func (m *LocalDNSID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LocalDNSID) XXX_Merge

func (m *LocalDNSID) XXX_Merge(src proto.Message)

func (*LocalDNSID) XXX_Size

func (m *LocalDNSID) XXX_Size() int

func (*LocalDNSID) XXX_Unmarshal

func (m *LocalDNSID) XXX_Unmarshal(b []byte) error

type LocalDomain

type LocalDomain struct {
	Name  string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	DNSID LocalDNSID `protobuf:"bytes,2,opt,name=dns_id,json=dnsId,proto3" json:"dns_id"`
}

func NewLocalDomain

func NewLocalDomain(dnsID LocalDNSID, name string) LocalDomain

NewLocalDomain returns a new LocalDomain

func (*LocalDomain) Descriptor

func (*LocalDomain) Descriptor() ([]byte, []int)

func (*LocalDomain) Marshal

func (m *LocalDomain) Marshal() (dAtA []byte, err error)

func (*LocalDomain) MarshalTo

func (m *LocalDomain) MarshalTo(dAtA []byte) (int, error)

func (*LocalDomain) MarshalToSizedBuffer

func (m *LocalDomain) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LocalDomain) ProtoMessage

func (*LocalDomain) ProtoMessage()

func (*LocalDomain) Reset

func (m *LocalDomain) Reset()

func (*LocalDomain) Size

func (m *LocalDomain) Size() (n int)

func (*LocalDomain) String

func (m *LocalDomain) String() string

func (*LocalDomain) Unmarshal

func (m *LocalDomain) Unmarshal(dAtA []byte) error

func (*LocalDomain) XXX_DiscardUnknown

func (m *LocalDomain) XXX_DiscardUnknown()

func (*LocalDomain) XXX_Marshal

func (m *LocalDomain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LocalDomain) XXX_Merge

func (m *LocalDomain) XXX_Merge(src proto.Message)

func (*LocalDomain) XXX_Size

func (m *LocalDomain) XXX_Size() int

func (*LocalDomain) XXX_Unmarshal

func (m *LocalDomain) XXX_Unmarshal(b []byte) error

type PacketAcknowledgementI

type PacketAcknowledgementI interface {
	proto.Message
	ValidateBasic() error
	GetBytes() []byte
	Type() string
}

func DeserializeJSONPacketAck

func DeserializeJSONPacketAck(cdc codec.Marshaler, data []byte) (PacketAcknowledgementI, error)

func MustDeserializeJSONPacketAck

func MustDeserializeJSONPacketAck(cdc codec.Marshaler, data []byte) PacketAcknowledgementI

type PacketAcknowledgementReceiver

type PacketAcknowledgementReceiver func(ctx sdk.Context, packet channeltypes.Packet, ack []byte) (*sdk.Result, error)

type PacketDataI

type PacketDataI interface {
	proto.Message
	ValidateBasic() error
	GetBytes() []byte
	Type() string
}

func DeserializeJSONPacketData

func DeserializeJSONPacketData(cdc codec.Marshaler, data []byte) (PacketDataI, error)

func MustDeserializeJSONPacketData

func MustDeserializeJSONPacketData(cdc codec.Marshaler, data []byte) PacketDataI

type PacketReceiver

type PacketReceiver func(ctx sdk.Context, packet channeltypes.Packet) (*sdk.Result, []byte, error)

func ComposePacketReceivers

func ComposePacketReceivers(rs ...PacketReceiver) PacketReceiver

type PortKeeper

type PortKeeper interface {
	BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability
}

PortKeeper defines the expected IBC port keeper

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL