service

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: Apache-2.0 Imports: 19 Imported by: 2

Documentation

Overview

Package service bridge the gap between the blockchain world and the conventional business application world, by mediating a complete lifecycle of off-chain services -- from their definition, binding (provider registration), invocation, to their governance (profiling and dispute resolution).

By enhancing the IBC processing logic to support service semantics, the SDK is intended to allow distributed business services to be available across the internet of blockchains. The Interface description language (IDL) we introduced is to work with the service standardized definitions to satisfy service invocations across different programming languages. The currently supported IDL language is protobuf

As a quick start:

	schemas := `{"input":{"type":"object"},"output":{"type":"object"},"error":{"type":"object"}}`
	pricing := `{"price":"1point"}`
 testResult := `{"code":200,"message":""}`

	baseTx := sdk.BaseTx{
		From: "test1",
		Gas:  20000,
		Memo: "test",
		Mode: sdk.Commit,
	}

	definition := rpc.ServiceDefinitionRequest{
		ServiceName:       generateServiceName(),
		Description:       "this is a test service",
		Event:              nil,
		AuthorDescription: "service provider",
		Schemas:           schemas,
	}

	result, err := sts.ServiceI.DefineService(definition, baseTx)
	require.NoError(sts.T(), err)
	require.NotEmpty(sts.T(), result.Hash)

	defi, err := sts.ServiceI.QueryServiceDefinition(definition.ServiceName)
	require.NoError(sts.T(), err)
	require.Equal(sts.T(), definition.ServiceName, defi.Name)
	require.Equal(sts.T(), definition.Description, defi.Description)
	require.EqualValues(sts.T(), definition.Event, defi.Event)
	require.Equal(sts.T(), definition.AuthorDescription, defi.AuthorDescription)
	require.Equal(sts.T(), definition.Schemas, defi.Schemas)
	require.Equal(sts.T(), sts.Sender(), defi.Author)

	deposit, _ := sdk.ParseCoins("20000000000000000000000point")
	binding := rpc.ServiceBindingRequest{
		ServiceName: definition.ServiceName,
		Deposit:     deposit,
		Pricing:     pricing,
	}
	result, err = sts.ServiceI.BindService(binding, baseTx)
	require.NoError(sts.T(), err)
	require.NotEmpty(sts.T(), result.Hash)

	bindResp, err := sts.ServiceI.QueryServiceBinding(definition.ServiceName, sts.Sender())
	require.NoError(sts.T(), err)
	require.Equal(sts.T(), binding.ServiceName, bindResp.ServiceName)
	require.Equal(sts.T(), sts.Sender(), bindResp.Provider)
	require.Equal(sts.T(), binding.Deposit.String(), bindResp.Deposit.String())
	require.Equal(sts.T(), binding.Pricing, bindResp.Pricing)

	input := `{"pair":"point-usdt"}`
	output := `{"last":"1:100"}`

	err = sts.ServiceI.SubscribeSingleServiceRequest(definition.ServiceName,
		func(reqCtxID, reqID, input string) (string, string) {
			sts.Info().
				Str("input", input).
				Str("output", output).
				Msg("provider received request")
			return output, testResult
		}, baseTx)
	require.NoError(sts.T(), err)

	serviceFeeCap, _ := sdk.ParseCoins("1000000000000000000point")
	invocation := rpc.ServiceInvocationRequest{
		ServiceName:       definition.ServiceName,
		Providers:         []string{sts.Sender().String()},
		Input:             input,
		ServiceFeeCap:     serviceFeeCap,
		Timeout:           3,
		SuperMode:         false,
		Repeated:          true,
		RepeatedFrequency: 5,
		RepeatedTotal:     -1,
	}
	var requestContextID string
	var exit = make(chan int, 0)
	requestContextID, err = sts.ServiceI.InvokeService(invocation, func(reqCtxID, reqID, responses string) {
		require.Equal(sts.T(), reqCtxID, requestContextID)
		require.Equal(sts.T(), output, response)
		sts.Info().
			Str("requestContextID", requestContextID).
			Str("response", response).
			Msg("consumer received response")
		exit <- 1
	}, baseTx)

	sts.Info().
		Str("requestContextID", requestContextID).
		Msg("ServiceRequest service success")
	require.NoError(sts.T(), err)

	request, err := sts.ServiceI.QueryRequestContext(requestContextID)
	require.NoError(sts.T(), err)
	require.Equal(sts.T(), request.ServiceName, invocation.ServiceName)
	require.Equal(sts.T(), request.Input, invocation.Input)

	<-exit

Index

Constants

View Source
const (
	// ModuleName define module name
	ModuleName = "service"
)

Variables

View Source
var (

	// ModuleCdc references the global service module codec. Note, the codec should
	// ONLY be used in certain instances of tests and for JSON encoding as Amino is
	// still used for that purpose.
	//
	// The actual codec used for serialization should be provided to service and
	// defined at the application level.
	ModuleCdc = codec.NewHybridCodec(amino, types.NewInterfaceRegistry())

	RequestContextStateToStringMap = map[RequestContextState]string{
		RUNNING:   "running",
		PAUSED:    "paused",
		COMPLETED: "completed",
	}
	StringToRequestContextStateMap = map[string]RequestContextState{
		"running":   RUNNING,
		"paused":    PAUSED,
		"completed": COMPLETED,
	}

	RequestContextBatchStateToStringMap = map[RequestContextBatchState]string{
		BATCHRUNNING:   "running",
		BATCHCOMPLETED: "completed",
	}
	StringToRequestContextBatchStateMap = map[string]RequestContextBatchState{
		"running":   BATCHRUNNING,
		"completed": BATCHCOMPLETED,
	}
)
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 RequestContextBatchState_name = map[int32]string{
	0: "BATCH_RUNNING",
	1: "BATCH_COMPLETED",
}
View Source
var RequestContextBatchState_value = map[string]int32{
	"BATCH_RUNNING":   0,
	"BATCH_COMPLETED": 1,
}
View Source
var RequestContextState_name = map[int32]string{
	0: "RUNNING",
	1: "PAUSED",
	2: "COMPLETED",
}
View Source
var RequestContextState_value = map[string]int32{
	"RUNNING":   0,
	"PAUSED":    1,
	"COMPLETED": 2,
}

Functions

This section is empty.

Types

type BindServiceRequest

type BindServiceRequest struct {
	ServiceName string       `json:"service_name"`
	Deposit     sdk.DecCoins `json:"deposit"`
	Pricing     string       `json:"pricing"`
	QoS         uint64       `json:"Qos"`
	Provider    string       `json:"provider"`
}

BindServiceRequest defines the request parameters of the service binding

type CompactRequest

type CompactRequest struct {
	RequestContextID           github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 199-byte string literal not displayed */
	RequestContextBatchCounter uint64                                               `` /* 181-byte string literal not displayed */
	Provider                   github_com_bianjieai_irita_sdk_go_types.AccAddress   `` /* 129-byte string literal not displayed */
	ServiceFee                 github_com_bianjieai_irita_sdk_go_types.Coins        `` /* 159-byte string literal not displayed */
	RequestHeight              int64                                                `protobuf:"varint,5,opt,name=request_height,json=requestHeight,proto3" json:"request_height,omitempty" yaml:"request_height"`
}

CompactRequest defines a standard for compact request.

func (*CompactRequest) Descriptor

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

func (*CompactRequest) Marshal

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

func (*CompactRequest) MarshalTo

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

func (*CompactRequest) MarshalToSizedBuffer

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

func (*CompactRequest) ProtoMessage

func (*CompactRequest) ProtoMessage()

func (*CompactRequest) Reset

func (m *CompactRequest) Reset()

func (*CompactRequest) Size

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

func (*CompactRequest) String

func (m *CompactRequest) String() string

func (*CompactRequest) Unmarshal

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

func (*CompactRequest) XXX_DiscardUnknown

func (m *CompactRequest) XXX_DiscardUnknown()

func (*CompactRequest) XXX_Marshal

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

func (*CompactRequest) XXX_Merge

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

func (*CompactRequest) XXX_Size

func (m *CompactRequest) XXX_Size() int

func (*CompactRequest) XXX_Unmarshal

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

type DefineServiceRequest

type DefineServiceRequest struct {
	ServiceName       string   `json:"service_name"`
	Description       string   `json:"description"`
	Tags              []string `json:"tags"`
	AuthorDescription string   `json:"author_description"`
	Schemas           string   `json:"schemas"`
}

DefineServiceRequest defines the request parameters of the service definition

type InvokeCallback

type InvokeCallback func(reqCtxID, reqID, responses string)

InvokeCallback defines the callback function for service calls

type InvokeServiceRequest

type InvokeServiceRequest struct {
	ServiceName       string       `json:"service_name"`
	Providers         []string     `json:"providers"`
	Input             string       `json:"input"`
	ServiceFeeCap     sdk.DecCoins `json:"service_fee_cap"`
	Timeout           int64        `json:"timeout"`
	SuperMode         bool         `json:"super_mode"`
	Repeated          bool         `json:"repeated"`
	RepeatedFrequency uint64       `json:"repeated_frequency"`
	RepeatedTotal     int64        `json:"repeated_total"`
	Callback          InvokeCallback
}

InvokeServiceRequest defines the request parameters of the service call

type MsgBindService

type MsgBindService struct {
	ServiceName string                                             `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty" yaml:"service_name"`
	Provider    github_com_bianjieai_irita_sdk_go_types.AccAddress `` /* 129-byte string literal not displayed */
	Deposit     github_com_bianjieai_irita_sdk_go_types.Coins      `protobuf:"bytes,3,rep,name=deposit,proto3,castrepeated=github.com/bianjieai/irita-sdk-go/types.Coins" json:"deposit"`
	Pricing     string                                             `protobuf:"bytes,4,opt,name=pricing,proto3" json:"pricing,omitempty"`
	QoS         uint64                                             `protobuf:"varint,5,opt,name=qos,proto3" json:"qos,omitempty"`
	Owner       github_com_bianjieai_irita_sdk_go_types.AccAddress `protobuf:"bytes,6,opt,name=owner,proto3,casttype=github.com/bianjieai/irita-sdk-go/types.AccAddress" json:"owner,omitempty"`
}

MsgBindService defines an SDK message for binding to an existing service.

func (*MsgBindService) Descriptor

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

func (MsgBindService) GetSignBytes

func (msg MsgBindService) GetSignBytes() []byte

func (MsgBindService) GetSigners

func (msg MsgBindService) GetSigners() []sdk.AccAddress

func (*MsgBindService) Marshal

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

func (*MsgBindService) MarshalTo

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

func (*MsgBindService) MarshalToSizedBuffer

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

func (*MsgBindService) ProtoMessage

func (*MsgBindService) ProtoMessage()

func (*MsgBindService) Reset

func (m *MsgBindService) Reset()

func (MsgBindService) Route

func (msg MsgBindService) Route() string

func (*MsgBindService) Size

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

func (*MsgBindService) String

func (m *MsgBindService) String() string

func (MsgBindService) Type

func (msg MsgBindService) Type() string

func (*MsgBindService) Unmarshal

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

func (MsgBindService) ValidateBasic

func (msg MsgBindService) ValidateBasic() error

func (*MsgBindService) XXX_DiscardUnknown

func (m *MsgBindService) XXX_DiscardUnknown()

func (*MsgBindService) XXX_Marshal

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

func (*MsgBindService) XXX_Merge

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

func (*MsgBindService) XXX_Size

func (m *MsgBindService) XXX_Size() int

func (*MsgBindService) XXX_Unmarshal

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

type MsgCallService

type MsgCallService struct {
	ServiceName       string                                               `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty" yaml:"service_name"`
	Providers         []github_com_bianjieai_irita_sdk_go_types.AccAddress `` /* 131-byte string literal not displayed */
	Consumer          github_com_bianjieai_irita_sdk_go_types.AccAddress   `` /* 129-byte string literal not displayed */
	Input             string                                               `protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"`
	ServiceFeeCap     github_com_bianjieai_irita_sdk_go_types.Coins        `` /* 174-byte string literal not displayed */
	Timeout           int64                                                `protobuf:"varint,6,opt,name=timeout,proto3" json:"timeout,omitempty"`
	SuperMode         bool                                                 `protobuf:"varint,7,opt,name=super_mode,json=superMode,proto3" json:"super_mode,omitempty" yaml:"super_mode"`
	Repeated          bool                                                 `protobuf:"varint,8,opt,name=repeated,proto3" json:"repeated,omitempty"`
	RepeatedFrequency uint64                                               `` /* 139-byte string literal not displayed */
	RepeatedTotal     int64                                                `protobuf:"varint,10,opt,name=repeated_total,json=repeatedTotal,proto3" json:"repeated_total,omitempty" yaml:"repeated_total"`
}

MsgCallService defines an SDK message to initiate a service request context.

func (*MsgCallService) Descriptor

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

func (MsgCallService) GetSignBytes

func (msg MsgCallService) GetSignBytes() []byte

func (MsgCallService) GetSigners

func (msg MsgCallService) GetSigners() []sdk.AccAddress

func (*MsgCallService) Marshal

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

func (*MsgCallService) MarshalTo

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

func (*MsgCallService) MarshalToSizedBuffer

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

func (*MsgCallService) ProtoMessage

func (*MsgCallService) ProtoMessage()

func (*MsgCallService) Reset

func (m *MsgCallService) Reset()

func (MsgCallService) Route

func (msg MsgCallService) Route() string

func (*MsgCallService) Size

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

func (*MsgCallService) String

func (m *MsgCallService) String() string

func (MsgCallService) Type

func (msg MsgCallService) Type() string

func (*MsgCallService) Unmarshal

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

func (MsgCallService) ValidateBasic

func (msg MsgCallService) ValidateBasic() error

func (*MsgCallService) XXX_DiscardUnknown

func (m *MsgCallService) XXX_DiscardUnknown()

func (*MsgCallService) XXX_Marshal

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

func (*MsgCallService) XXX_Merge

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

func (*MsgCallService) XXX_Size

func (m *MsgCallService) XXX_Size() int

func (*MsgCallService) XXX_Unmarshal

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

type MsgDefineService

type MsgDefineService struct {
	Name              string                                             `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description       string                                             `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Tags              []string                                           `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`
	Author            github_com_bianjieai_irita_sdk_go_types.AccAddress `protobuf:"bytes,4,opt,name=author,proto3,casttype=github.com/bianjieai/irita-sdk-go/types.AccAddress" json:"author,omitempty"`
	AuthorDescription string                                             `` /* 138-byte string literal not displayed */
	Schemas           string                                             `protobuf:"bytes,6,opt,name=schemas,proto3" json:"schemas,omitempty"`
}

MsgDefineService defines an SDK message for defining a new service.

func (*MsgDefineService) Descriptor

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

func (MsgDefineService) GetSignBytes

func (msg MsgDefineService) GetSignBytes() []byte

func (MsgDefineService) GetSigners

func (msg MsgDefineService) GetSigners() []sdk.AccAddress

func (*MsgDefineService) Marshal

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

func (*MsgDefineService) MarshalTo

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

func (*MsgDefineService) MarshalToSizedBuffer

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

func (*MsgDefineService) ProtoMessage

func (*MsgDefineService) ProtoMessage()

func (*MsgDefineService) Reset

func (m *MsgDefineService) Reset()

func (MsgDefineService) Route

func (msg MsgDefineService) Route() string

func (*MsgDefineService) Size

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

func (*MsgDefineService) String

func (m *MsgDefineService) String() string

func (MsgDefineService) Type

func (msg MsgDefineService) Type() string

func (*MsgDefineService) Unmarshal

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

func (MsgDefineService) ValidateBasic

func (msg MsgDefineService) ValidateBasic() error

func (*MsgDefineService) XXX_DiscardUnknown

func (m *MsgDefineService) XXX_DiscardUnknown()

func (*MsgDefineService) XXX_Marshal

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

func (*MsgDefineService) XXX_Merge

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

func (*MsgDefineService) XXX_Size

func (m *MsgDefineService) XXX_Size() int

func (*MsgDefineService) XXX_Unmarshal

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

type MsgDisableServiceBinding

type MsgDisableServiceBinding struct {
	ServiceName string                                             `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty" yaml:"service_name"`
	Provider    github_com_bianjieai_irita_sdk_go_types.AccAddress `` /* 129-byte string literal not displayed */
	Owner       github_com_bianjieai_irita_sdk_go_types.AccAddress `protobuf:"bytes,3,opt,name=owner,proto3,casttype=github.com/bianjieai/irita-sdk-go/types.AccAddress" json:"owner,omitempty"`
}

MsgDisableServiceBinding defines an SDK message to disable a service binding.

func (*MsgDisableServiceBinding) Descriptor

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

func (MsgDisableServiceBinding) GetSignBytes

func (msg MsgDisableServiceBinding) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgDisableServiceBinding) GetSigners

func (msg MsgDisableServiceBinding) GetSigners() []sdk.AccAddress

GetSigners implements Msg.

func (*MsgDisableServiceBinding) Marshal

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

func (*MsgDisableServiceBinding) MarshalTo

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

func (*MsgDisableServiceBinding) MarshalToSizedBuffer

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

func (*MsgDisableServiceBinding) ProtoMessage

func (*MsgDisableServiceBinding) ProtoMessage()

func (*MsgDisableServiceBinding) Reset

func (m *MsgDisableServiceBinding) Reset()

func (MsgDisableServiceBinding) Route

func (msg MsgDisableServiceBinding) Route() string

func (*MsgDisableServiceBinding) Size

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

func (*MsgDisableServiceBinding) String

func (m *MsgDisableServiceBinding) String() string

func (MsgDisableServiceBinding) Type

func (msg MsgDisableServiceBinding) Type() string

Type implements Msg.

func (*MsgDisableServiceBinding) Unmarshal

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

func (MsgDisableServiceBinding) ValidateBasic

func (msg MsgDisableServiceBinding) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgDisableServiceBinding) XXX_DiscardUnknown

func (m *MsgDisableServiceBinding) XXX_DiscardUnknown()

func (*MsgDisableServiceBinding) XXX_Marshal

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

func (*MsgDisableServiceBinding) XXX_Merge

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

func (*MsgDisableServiceBinding) XXX_Size

func (m *MsgDisableServiceBinding) XXX_Size() int

func (*MsgDisableServiceBinding) XXX_Unmarshal

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

type MsgEnableServiceBinding

type MsgEnableServiceBinding struct {
	ServiceName string                                             `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty" yaml:"service_name"`
	Provider    github_com_bianjieai_irita_sdk_go_types.AccAddress `` /* 129-byte string literal not displayed */
	Deposit     github_com_bianjieai_irita_sdk_go_types.Coins      `protobuf:"bytes,3,rep,name=deposit,proto3,castrepeated=github.com/bianjieai/irita-sdk-go/types.Coins" json:"deposit"`
	Owner       github_com_bianjieai_irita_sdk_go_types.AccAddress `protobuf:"bytes,4,opt,name=owner,proto3,casttype=github.com/bianjieai/irita-sdk-go/types.AccAddress" json:"owner,omitempty"`
}

MsgEnableServiceBinding defines an SDK message to enable a service binding.

func (*MsgEnableServiceBinding) Descriptor

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

func (MsgEnableServiceBinding) GetSignBytes

func (msg MsgEnableServiceBinding) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgEnableServiceBinding) GetSigners

func (msg MsgEnableServiceBinding) GetSigners() []sdk.AccAddress

GetSigners implements Msg.

func (*MsgEnableServiceBinding) Marshal

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

func (*MsgEnableServiceBinding) MarshalTo

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

func (*MsgEnableServiceBinding) MarshalToSizedBuffer

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

func (*MsgEnableServiceBinding) ProtoMessage

func (*MsgEnableServiceBinding) ProtoMessage()

func (*MsgEnableServiceBinding) Reset

func (m *MsgEnableServiceBinding) Reset()

func (MsgEnableServiceBinding) Route

func (msg MsgEnableServiceBinding) Route() string

func (*MsgEnableServiceBinding) Size

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

func (*MsgEnableServiceBinding) String

func (m *MsgEnableServiceBinding) String() string

func (MsgEnableServiceBinding) Type

func (msg MsgEnableServiceBinding) Type() string

Type implements Msg.

func (*MsgEnableServiceBinding) Unmarshal

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

func (MsgEnableServiceBinding) ValidateBasic

func (msg MsgEnableServiceBinding) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgEnableServiceBinding) XXX_DiscardUnknown

func (m *MsgEnableServiceBinding) XXX_DiscardUnknown()

func (*MsgEnableServiceBinding) XXX_Marshal

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

func (*MsgEnableServiceBinding) XXX_Merge

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

func (*MsgEnableServiceBinding) XXX_Size

func (m *MsgEnableServiceBinding) XXX_Size() int

func (*MsgEnableServiceBinding) XXX_Unmarshal

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

type MsgKillRequestContext

type MsgKillRequestContext struct {
	RequestContextID github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 199-byte string literal not displayed */
	Consumer         github_com_bianjieai_irita_sdk_go_types.AccAddress   `` /* 129-byte string literal not displayed */
}

MsgKillRequestContext defines an SDK message to terminate a service request.

func (*MsgKillRequestContext) Descriptor

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

func (MsgKillRequestContext) GetSignBytes

func (msg MsgKillRequestContext) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgKillRequestContext) GetSigners

func (msg MsgKillRequestContext) GetSigners() []sdk.AccAddress

GetSigners implements Msg.

func (*MsgKillRequestContext) Marshal

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

func (*MsgKillRequestContext) MarshalTo

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

func (*MsgKillRequestContext) MarshalToSizedBuffer

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

func (*MsgKillRequestContext) ProtoMessage

func (*MsgKillRequestContext) ProtoMessage()

func (*MsgKillRequestContext) Reset

func (m *MsgKillRequestContext) Reset()

func (MsgKillRequestContext) Route

func (msg MsgKillRequestContext) Route() string

func (*MsgKillRequestContext) Size

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

func (*MsgKillRequestContext) String

func (m *MsgKillRequestContext) String() string

func (MsgKillRequestContext) Type

func (msg MsgKillRequestContext) Type() string

Type implements Msg.

func (*MsgKillRequestContext) Unmarshal

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

func (MsgKillRequestContext) ValidateBasic

func (msg MsgKillRequestContext) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgKillRequestContext) XXX_DiscardUnknown

func (m *MsgKillRequestContext) XXX_DiscardUnknown()

func (*MsgKillRequestContext) XXX_Marshal

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

func (*MsgKillRequestContext) XXX_Merge

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

func (*MsgKillRequestContext) XXX_Size

func (m *MsgKillRequestContext) XXX_Size() int

func (*MsgKillRequestContext) XXX_Unmarshal

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

type MsgPauseRequestContext

type MsgPauseRequestContext struct {
	RequestContextID github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 199-byte string literal not displayed */
	Consumer         github_com_bianjieai_irita_sdk_go_types.AccAddress   `` /* 129-byte string literal not displayed */
}

MsgPauseRequestContext defines an SDK message to pause a service request.

func (*MsgPauseRequestContext) Descriptor

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

func (MsgPauseRequestContext) GetSignBytes

func (msg MsgPauseRequestContext) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgPauseRequestContext) GetSigners

func (msg MsgPauseRequestContext) GetSigners() []sdk.AccAddress

GetSigners implements Msg.

func (*MsgPauseRequestContext) Marshal

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

func (*MsgPauseRequestContext) MarshalTo

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

func (*MsgPauseRequestContext) MarshalToSizedBuffer

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

func (*MsgPauseRequestContext) ProtoMessage

func (*MsgPauseRequestContext) ProtoMessage()

func (*MsgPauseRequestContext) Reset

func (m *MsgPauseRequestContext) Reset()

func (MsgPauseRequestContext) Route

func (msg MsgPauseRequestContext) Route() string

func (*MsgPauseRequestContext) Size

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

func (*MsgPauseRequestContext) String

func (m *MsgPauseRequestContext) String() string

func (MsgPauseRequestContext) Type

func (msg MsgPauseRequestContext) Type() string

Type implements Msg.

func (*MsgPauseRequestContext) Unmarshal

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

func (MsgPauseRequestContext) ValidateBasic

func (msg MsgPauseRequestContext) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgPauseRequestContext) XXX_DiscardUnknown

func (m *MsgPauseRequestContext) XXX_DiscardUnknown()

func (*MsgPauseRequestContext) XXX_Marshal

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

func (*MsgPauseRequestContext) XXX_Merge

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

func (*MsgPauseRequestContext) XXX_Size

func (m *MsgPauseRequestContext) XXX_Size() int

func (*MsgPauseRequestContext) XXX_Unmarshal

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

type MsgRefundServiceDeposit

type MsgRefundServiceDeposit struct {
	ServiceName string                                             `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty" yaml:"service_name"`
	Provider    github_com_bianjieai_irita_sdk_go_types.AccAddress `` /* 129-byte string literal not displayed */
	Owner       github_com_bianjieai_irita_sdk_go_types.AccAddress `protobuf:"bytes,3,opt,name=owner,proto3,casttype=github.com/bianjieai/irita-sdk-go/types.AccAddress" json:"owner,omitempty"`
}

MsgRefundServiceDeposit defines an SDK message to refund deposit from a service binding.

func (*MsgRefundServiceDeposit) Descriptor

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

func (MsgRefundServiceDeposit) GetSignBytes

func (msg MsgRefundServiceDeposit) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgRefundServiceDeposit) GetSigners

func (msg MsgRefundServiceDeposit) GetSigners() []sdk.AccAddress

GetSigners implements Msg.

func (*MsgRefundServiceDeposit) Marshal

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

func (*MsgRefundServiceDeposit) MarshalTo

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

func (*MsgRefundServiceDeposit) MarshalToSizedBuffer

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

func (*MsgRefundServiceDeposit) ProtoMessage

func (*MsgRefundServiceDeposit) ProtoMessage()

func (*MsgRefundServiceDeposit) Reset

func (m *MsgRefundServiceDeposit) Reset()

func (MsgRefundServiceDeposit) Route

func (msg MsgRefundServiceDeposit) Route() string

func (*MsgRefundServiceDeposit) Size

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

func (*MsgRefundServiceDeposit) String

func (m *MsgRefundServiceDeposit) String() string

func (MsgRefundServiceDeposit) Type

func (msg MsgRefundServiceDeposit) Type() string

Type implements Msg.

func (*MsgRefundServiceDeposit) Unmarshal

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

func (MsgRefundServiceDeposit) ValidateBasic

func (msg MsgRefundServiceDeposit) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgRefundServiceDeposit) XXX_DiscardUnknown

func (m *MsgRefundServiceDeposit) XXX_DiscardUnknown()

func (*MsgRefundServiceDeposit) XXX_Marshal

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

func (*MsgRefundServiceDeposit) XXX_Merge

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

func (*MsgRefundServiceDeposit) XXX_Size

func (m *MsgRefundServiceDeposit) XXX_Size() int

func (*MsgRefundServiceDeposit) XXX_Unmarshal

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

type MsgRespondService

type MsgRespondService struct {
	RequestID github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 168-byte string literal not displayed */
	Provider  github_com_bianjieai_irita_sdk_go_types.AccAddress   `` /* 129-byte string literal not displayed */
	Result    string                                               `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
	Output    string                                               `protobuf:"bytes,4,opt,name=output,proto3" json:"output,omitempty"`
}

MsgRespondService defines an SDK message to respond a service request.

func (*MsgRespondService) Descriptor

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

func (MsgRespondService) GetSignBytes

func (msg MsgRespondService) GetSignBytes() []byte

func (MsgRespondService) GetSigners

func (msg MsgRespondService) GetSigners() []sdk.AccAddress

func (*MsgRespondService) Marshal

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

func (*MsgRespondService) MarshalTo

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

func (*MsgRespondService) MarshalToSizedBuffer

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

func (*MsgRespondService) ProtoMessage

func (*MsgRespondService) ProtoMessage()

func (*MsgRespondService) Reset

func (m *MsgRespondService) Reset()

func (MsgRespondService) Route

func (msg MsgRespondService) Route() string

func (*MsgRespondService) Size

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

func (*MsgRespondService) String

func (m *MsgRespondService) String() string

func (MsgRespondService) Type

func (msg MsgRespondService) Type() string

func (*MsgRespondService) Unmarshal

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

func (MsgRespondService) ValidateBasic

func (msg MsgRespondService) ValidateBasic() error

func (*MsgRespondService) XXX_DiscardUnknown

func (m *MsgRespondService) XXX_DiscardUnknown()

func (*MsgRespondService) XXX_Marshal

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

func (*MsgRespondService) XXX_Merge

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

func (*MsgRespondService) XXX_Size

func (m *MsgRespondService) XXX_Size() int

func (*MsgRespondService) XXX_Unmarshal

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

type MsgSetWithdrawAddress

type MsgSetWithdrawAddress struct {
	Owner           github_com_bianjieai_irita_sdk_go_types.AccAddress `protobuf:"bytes,1,opt,name=owner,proto3,casttype=github.com/bianjieai/irita-sdk-go/types.AccAddress" json:"owner,omitempty"`
	WithdrawAddress github_com_bianjieai_irita_sdk_go_types.AccAddress `` /* 190-byte string literal not displayed */
}

MsgSetWithdrawAddress defines an SDK message to set the withdrawal address for a provider.

func (*MsgSetWithdrawAddress) Descriptor

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

func (MsgSetWithdrawAddress) GetSignBytes

func (msg MsgSetWithdrawAddress) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgSetWithdrawAddress) GetSigners

func (msg MsgSetWithdrawAddress) GetSigners() []sdk.AccAddress

GetSigners implements Msg.

func (*MsgSetWithdrawAddress) Marshal

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

func (*MsgSetWithdrawAddress) MarshalTo

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

func (*MsgSetWithdrawAddress) MarshalToSizedBuffer

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

func (*MsgSetWithdrawAddress) ProtoMessage

func (*MsgSetWithdrawAddress) ProtoMessage()

func (*MsgSetWithdrawAddress) Reset

func (m *MsgSetWithdrawAddress) Reset()

func (MsgSetWithdrawAddress) Route

func (msg MsgSetWithdrawAddress) Route() string

func (*MsgSetWithdrawAddress) Size

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

func (*MsgSetWithdrawAddress) String

func (m *MsgSetWithdrawAddress) String() string

func (MsgSetWithdrawAddress) Type

func (msg MsgSetWithdrawAddress) Type() string

Type implements Msg.

func (*MsgSetWithdrawAddress) Unmarshal

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

func (MsgSetWithdrawAddress) ValidateBasic

func (msg MsgSetWithdrawAddress) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgSetWithdrawAddress) XXX_DiscardUnknown

func (m *MsgSetWithdrawAddress) XXX_DiscardUnknown()

func (*MsgSetWithdrawAddress) XXX_Marshal

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

func (*MsgSetWithdrawAddress) XXX_Merge

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

func (*MsgSetWithdrawAddress) XXX_Size

func (m *MsgSetWithdrawAddress) XXX_Size() int

func (*MsgSetWithdrawAddress) XXX_Unmarshal

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

type MsgStartRequestContext

type MsgStartRequestContext struct {
	RequestContextID github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 199-byte string literal not displayed */
	Consumer         github_com_bianjieai_irita_sdk_go_types.AccAddress   `` /* 129-byte string literal not displayed */
}

MsgStartRequestContext defines an SDK message to resume a service request.

func (*MsgStartRequestContext) Descriptor

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

func (MsgStartRequestContext) GetSignBytes

func (msg MsgStartRequestContext) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgStartRequestContext) GetSigners

func (msg MsgStartRequestContext) GetSigners() []sdk.AccAddress

GetSigners implements Msg.

func (*MsgStartRequestContext) Marshal

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

func (*MsgStartRequestContext) MarshalTo

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

func (*MsgStartRequestContext) MarshalToSizedBuffer

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

func (*MsgStartRequestContext) ProtoMessage

func (*MsgStartRequestContext) ProtoMessage()

func (*MsgStartRequestContext) Reset

func (m *MsgStartRequestContext) Reset()

func (MsgStartRequestContext) Route

func (msg MsgStartRequestContext) Route() string

func (*MsgStartRequestContext) Size

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

func (*MsgStartRequestContext) String

func (m *MsgStartRequestContext) String() string

func (MsgStartRequestContext) Type

func (msg MsgStartRequestContext) Type() string

Type implements Msg.

func (*MsgStartRequestContext) Unmarshal

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

func (MsgStartRequestContext) ValidateBasic

func (msg MsgStartRequestContext) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgStartRequestContext) XXX_DiscardUnknown

func (m *MsgStartRequestContext) XXX_DiscardUnknown()

func (*MsgStartRequestContext) XXX_Marshal

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

func (*MsgStartRequestContext) XXX_Merge

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

func (*MsgStartRequestContext) XXX_Size

func (m *MsgStartRequestContext) XXX_Size() int

func (*MsgStartRequestContext) XXX_Unmarshal

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

type MsgUpdateRequestContext

type MsgUpdateRequestContext struct {
	RequestContextID  github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 199-byte string literal not displayed */
	Providers         []github_com_bianjieai_irita_sdk_go_types.AccAddress `` /* 131-byte string literal not displayed */
	Consumer          github_com_bianjieai_irita_sdk_go_types.AccAddress   `` /* 129-byte string literal not displayed */
	ServiceFeeCap     github_com_bianjieai_irita_sdk_go_types.Coins        `` /* 174-byte string literal not displayed */
	Timeout           int64                                                `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout,omitempty"`
	RepeatedFrequency uint64                                               `` /* 139-byte string literal not displayed */
	RepeatedTotal     int64                                                `protobuf:"varint,7,opt,name=repeated_total,json=repeatedTotal,proto3" json:"repeated_total,omitempty" yaml:"repeated_total"`
}

MsgUpdateRequestContext defines an SDK message to update a service request context.

func (*MsgUpdateRequestContext) Descriptor

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

func (MsgUpdateRequestContext) GetSignBytes

func (msg MsgUpdateRequestContext) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgUpdateRequestContext) GetSigners

func (msg MsgUpdateRequestContext) GetSigners() []sdk.AccAddress

GetSigners implements Msg.

func (*MsgUpdateRequestContext) Marshal

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

func (*MsgUpdateRequestContext) MarshalTo

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

func (*MsgUpdateRequestContext) MarshalToSizedBuffer

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

func (*MsgUpdateRequestContext) ProtoMessage

func (*MsgUpdateRequestContext) ProtoMessage()

func (*MsgUpdateRequestContext) Reset

func (m *MsgUpdateRequestContext) Reset()

func (MsgUpdateRequestContext) Route

func (msg MsgUpdateRequestContext) Route() string

func (*MsgUpdateRequestContext) Size

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

func (*MsgUpdateRequestContext) String

func (m *MsgUpdateRequestContext) String() string

func (MsgUpdateRequestContext) Type

func (msg MsgUpdateRequestContext) Type() string

Type implements Msg.

func (*MsgUpdateRequestContext) Unmarshal

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

func (MsgUpdateRequestContext) ValidateBasic

func (msg MsgUpdateRequestContext) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgUpdateRequestContext) XXX_DiscardUnknown

func (m *MsgUpdateRequestContext) XXX_DiscardUnknown()

func (*MsgUpdateRequestContext) XXX_Marshal

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

func (*MsgUpdateRequestContext) XXX_Merge

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

func (*MsgUpdateRequestContext) XXX_Size

func (m *MsgUpdateRequestContext) XXX_Size() int

func (*MsgUpdateRequestContext) XXX_Unmarshal

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

type MsgUpdateServiceBinding

type MsgUpdateServiceBinding struct {
	ServiceName string                                             `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	Provider    github_com_bianjieai_irita_sdk_go_types.AccAddress `` /* 129-byte string literal not displayed */
	Deposit     github_com_bianjieai_irita_sdk_go_types.Coins      `protobuf:"bytes,3,rep,name=deposit,proto3,castrepeated=github.com/bianjieai/irita-sdk-go/types.Coins" json:"deposit"`
	Pricing     string                                             `protobuf:"bytes,4,opt,name=pricing,proto3" json:"pricing,omitempty"`
	QoS         uint64                                             `protobuf:"varint,5,opt,name=qos,proto3" json:"qos,omitempty"`
	Owner       github_com_bianjieai_irita_sdk_go_types.AccAddress `protobuf:"bytes,6,opt,name=owner,proto3,casttype=github.com/bianjieai/irita-sdk-go/types.AccAddress" json:"owner,omitempty"`
}

MsgUpdateServiceBinding defines an SDK message for updating an existing service binding.

func (*MsgUpdateServiceBinding) Descriptor

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

func (MsgUpdateServiceBinding) GetSignBytes

func (msg MsgUpdateServiceBinding) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgUpdateServiceBinding) GetSigners

func (msg MsgUpdateServiceBinding) GetSigners() []sdk.AccAddress

GetSigners implements Msg.

func (*MsgUpdateServiceBinding) Marshal

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

func (*MsgUpdateServiceBinding) MarshalTo

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

func (*MsgUpdateServiceBinding) MarshalToSizedBuffer

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

func (*MsgUpdateServiceBinding) ProtoMessage

func (*MsgUpdateServiceBinding) ProtoMessage()

func (*MsgUpdateServiceBinding) Reset

func (m *MsgUpdateServiceBinding) Reset()

func (MsgUpdateServiceBinding) Route

func (msg MsgUpdateServiceBinding) Route() string

func (*MsgUpdateServiceBinding) Size

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

func (*MsgUpdateServiceBinding) String

func (m *MsgUpdateServiceBinding) String() string

func (MsgUpdateServiceBinding) Type

func (msg MsgUpdateServiceBinding) Type() string

Type implements Msg.

func (*MsgUpdateServiceBinding) Unmarshal

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

func (MsgUpdateServiceBinding) ValidateBasic

func (msg MsgUpdateServiceBinding) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgUpdateServiceBinding) XXX_DiscardUnknown

func (m *MsgUpdateServiceBinding) XXX_DiscardUnknown()

func (*MsgUpdateServiceBinding) XXX_Marshal

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

func (*MsgUpdateServiceBinding) XXX_Merge

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

func (*MsgUpdateServiceBinding) XXX_Size

func (m *MsgUpdateServiceBinding) XXX_Size() int

func (*MsgUpdateServiceBinding) XXX_Unmarshal

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

type MsgWithdrawEarnedFees

type MsgWithdrawEarnedFees struct {
	Owner    github_com_bianjieai_irita_sdk_go_types.AccAddress `protobuf:"bytes,1,opt,name=owner,proto3,casttype=github.com/bianjieai/irita-sdk-go/types.AccAddress" json:"owner,omitempty"`
	Provider github_com_bianjieai_irita_sdk_go_types.AccAddress `` /* 129-byte string literal not displayed */
}

MsgWithdrawEarnedFees defines an SDK message to withdraw the fees earned by the provider or owner.

func (*MsgWithdrawEarnedFees) Descriptor

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

func (MsgWithdrawEarnedFees) GetSignBytes

func (msg MsgWithdrawEarnedFees) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgWithdrawEarnedFees) GetSigners

func (msg MsgWithdrawEarnedFees) GetSigners() []sdk.AccAddress

GetSigners implements Msg.

func (*MsgWithdrawEarnedFees) Marshal

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

func (*MsgWithdrawEarnedFees) MarshalTo

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

func (*MsgWithdrawEarnedFees) MarshalToSizedBuffer

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

func (*MsgWithdrawEarnedFees) ProtoMessage

func (*MsgWithdrawEarnedFees) ProtoMessage()

func (*MsgWithdrawEarnedFees) Reset

func (m *MsgWithdrawEarnedFees) Reset()

func (MsgWithdrawEarnedFees) Route

func (msg MsgWithdrawEarnedFees) Route() string

func (*MsgWithdrawEarnedFees) Size

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

func (*MsgWithdrawEarnedFees) String

func (m *MsgWithdrawEarnedFees) String() string

func (MsgWithdrawEarnedFees) Type

func (msg MsgWithdrawEarnedFees) Type() string

Type implements Msg.

func (*MsgWithdrawEarnedFees) Unmarshal

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

func (MsgWithdrawEarnedFees) ValidateBasic

func (msg MsgWithdrawEarnedFees) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgWithdrawEarnedFees) XXX_DiscardUnknown

func (m *MsgWithdrawEarnedFees) XXX_DiscardUnknown()

func (*MsgWithdrawEarnedFees) XXX_Marshal

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

func (*MsgWithdrawEarnedFees) XXX_Merge

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

func (*MsgWithdrawEarnedFees) XXX_Size

func (m *MsgWithdrawEarnedFees) XXX_Size() int

func (*MsgWithdrawEarnedFees) XXX_Unmarshal

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

type Params

type Params struct {
	MaxRequestTimeout    int64                                         `` /* 142-byte string literal not displayed */
	MinDepositMultiple   int64                                         `` /* 146-byte string literal not displayed */
	MinDeposit           github_com_bianjieai_irita_sdk_go_types.Coins `` /* 140-byte string literal not displayed */
	ServiceFeeTax        github_com_bianjieai_irita_sdk_go_types.Dec   `` /* 170-byte string literal not displayed */
	SlashFraction        github_com_bianjieai_irita_sdk_go_types.Dec   `` /* 167-byte string literal not displayed */
	ComplaintRetrospect  time.Duration                                 `` /* 148-byte string literal not displayed */
	ArbitrationTimeLimit time.Duration                                 `` /* 155-byte string literal not displayed */
	TxSizeLimit          uint64                                        `protobuf:"varint,8,opt,name=tx_size_limit,json=txSizeLimit,proto3" json:"tx_size_limit,omitempty" yaml:"tx_size_limit"`
	BaseDenom            string                                        `protobuf:"bytes,9,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty" yaml:"base_denom"`
}

service parameters

func (Params) Convert

func (p Params) Convert() interface{}

func (*Params) Descriptor

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

func (*Params) Equal

func (this *Params) Equal(that interface{}) bool

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type Pricing

type Pricing struct {
	Price              github_com_bianjieai_irita_sdk_go_types.Coins `protobuf:"bytes,6,rep,name=price,proto3,castrepeated=github.com/bianjieai/irita-sdk-go/types.Coins" json:"price"`
	PromotionsByTime   []PromotionByTime                             `` /* 127-byte string literal not displayed */
	PromotionsByVolume []PromotionByVolume                           `` /* 135-byte string literal not displayed */
}

Pricing defines a standard for service pricing.

func (*Pricing) Descriptor

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

func (*Pricing) Marshal

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

func (*Pricing) MarshalTo

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

func (*Pricing) MarshalToSizedBuffer

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

func (*Pricing) ProtoMessage

func (*Pricing) ProtoMessage()

func (*Pricing) Reset

func (m *Pricing) Reset()

func (*Pricing) Size

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

func (*Pricing) String

func (m *Pricing) String() string

func (*Pricing) Unmarshal

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

func (*Pricing) XXX_DiscardUnknown

func (m *Pricing) XXX_DiscardUnknown()

func (*Pricing) XXX_Marshal

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

func (*Pricing) XXX_Merge

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

func (*Pricing) XXX_Size

func (m *Pricing) XXX_Size() int

func (*Pricing) XXX_Unmarshal

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

type PromotionByTime

type PromotionByTime struct {
	StartTime time.Time                                   `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"`
	EndTime   time.Time                                   `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time" yaml:"end_time"`
	Discount  github_com_bianjieai_irita_sdk_go_types.Dec `protobuf:"bytes,3,opt,name=discount,proto3,customtype=github.com/bianjieai/irita-sdk-go/types.Dec" json:"discount"`
}

PromotionByTime defines a standard for service promotion by time.

func (*PromotionByTime) Descriptor

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

func (*PromotionByTime) Marshal

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

func (*PromotionByTime) MarshalTo

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

func (*PromotionByTime) MarshalToSizedBuffer

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

func (*PromotionByTime) ProtoMessage

func (*PromotionByTime) ProtoMessage()

func (*PromotionByTime) Reset

func (m *PromotionByTime) Reset()

func (*PromotionByTime) Size

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

func (*PromotionByTime) String

func (m *PromotionByTime) String() string

func (*PromotionByTime) Unmarshal

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

func (*PromotionByTime) XXX_DiscardUnknown

func (m *PromotionByTime) XXX_DiscardUnknown()

func (*PromotionByTime) XXX_Marshal

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

func (*PromotionByTime) XXX_Merge

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

func (*PromotionByTime) XXX_Size

func (m *PromotionByTime) XXX_Size() int

func (*PromotionByTime) XXX_Unmarshal

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

type PromotionByVolume

type PromotionByVolume struct {
	Volume   uint64                                      `protobuf:"varint,1,opt,name=volume,proto3" json:"volume,omitempty"`
	Discount github_com_bianjieai_irita_sdk_go_types.Dec `protobuf:"bytes,2,opt,name=discount,proto3,customtype=github.com/bianjieai/irita-sdk-go/types.Dec" json:"discount"`
}

PromotionByVolume defines a standard for service promotion by volume.

func (*PromotionByVolume) Descriptor

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

func (*PromotionByVolume) Marshal

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

func (*PromotionByVolume) MarshalTo

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

func (*PromotionByVolume) MarshalToSizedBuffer

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

func (*PromotionByVolume) ProtoMessage

func (*PromotionByVolume) ProtoMessage()

func (*PromotionByVolume) Reset

func (m *PromotionByVolume) Reset()

func (*PromotionByVolume) Size

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

func (*PromotionByVolume) String

func (m *PromotionByVolume) String() string

func (*PromotionByVolume) Unmarshal

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

func (*PromotionByVolume) XXX_DiscardUnknown

func (m *PromotionByVolume) XXX_DiscardUnknown()

func (*PromotionByVolume) XXX_Marshal

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

func (*PromotionByVolume) XXX_Merge

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

func (*PromotionByVolume) XXX_Size

func (m *PromotionByVolume) XXX_Size() int

func (*PromotionByVolume) XXX_Unmarshal

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

type Query

type Query interface {
	QueryServiceDefinition(serviceName string) (QueryServiceDefinitionResponse, sdk.Error)
	QueryServiceBinding(serviceName string, provider sdk.AccAddress) (QueryServiceBindingResponse, sdk.Error)
	QueryServiceBindings(serviceName string) ([]QueryServiceBindingResponse, sdk.Error)
	QueryServiceRequest(requestID string) (QueryServiceRequestResponse, sdk.Error)
	QueryServiceRequests(serviceName string, provider sdk.AccAddress) ([]QueryServiceRequestResponse, sdk.Error)
	QueryRequestsByReqCtx(requestContextID string, batchCounter uint64) ([]QueryServiceRequestResponse, sdk.Error)
	QueryServiceResponse(requestID string) (QueryServiceResponseResponse, sdk.Error)
	QueryServiceResponses(requestContextID string, batchCounter uint64) ([]QueryServiceResponseResponse, sdk.Error)
	QueryRequestContext(requestContextID string) (QueryRequestContextResponse, sdk.Error)
	QueryFees(provider string) (sdk.Coins, sdk.Error)
	QueryParams() (QueryParamsResponse, sdk.Error)
}

Query defines a set of query interfaces in the service module

type QueryParamsResponse

type QueryParamsResponse struct {
	MaxRequestTimeout    int64         `json:"max_request_timeout"`
	MinDepositMultiple   int64         `json:"min_deposit_multiple"`
	MinDeposit           string        `json:"min_deposit"`
	ServiceFeeTax        string        `json:"service_fee_tax"`
	SlashFraction        string        `json:"slash_fraction"`
	ComplaintRetrospect  time.Duration `json:"complaint_retrospect"`
	ArbitrationTimeLimit time.Duration `json:"arbitration_time_limit"`
	TxSizeLimit          uint64        `json:"tx_size_limit"`
	BaseDenom            string        `json:"base_denom"`
}

type QueryRequestContextResponse

type QueryRequestContextResponse struct {
	ServiceName        string           `json:"service_name"`
	Providers          []sdk.AccAddress `json:"providers"`
	Consumer           sdk.AccAddress   `json:"consumer"`
	Input              string           `json:"input"`
	ServiceFeeCap      sdk.Coins        `json:"service_fee_cap"`
	Timeout            int64            `json:"timeout"`
	SuperMode          bool             `json:"super_mode"`
	Repeated           bool             `json:"repeated"`
	RepeatedFrequency  uint64           `json:"repeated_frequency"`
	RepeatedTotal      int64            `json:"repeated_total"`
	BatchCounter       uint64           `json:"batch_counter"`
	BatchRequestCount  uint32           `json:"batch_request_count"`
	BatchResponseCount uint32           `json:"batch_response_count"`
	BatchState         string           `json:"batch_state"`
	State              string           `json:"state"`
	ResponseThreshold  uint32           `json:"response_threshold"`
	ModuleName         string           `json:"module_name"`
}

QueryRequestContextResponse defines a context which holds request-related data

type QueryServiceBindingResponse

type QueryServiceBindingResponse struct {
	ServiceName  string         `json:"service_name"`
	Provider     sdk.AccAddress `json:"provider"`
	Deposit      sdk.Coins      `json:"deposit"`
	Pricing      string         `json:"pricing"`
	QoS          uint64         `json:"Qos"`
	Owner        sdk.AccAddress `json:"owner"`
	Available    bool           `json:"available"`
	DisabledTime time.Time      `json:"disabled_time"`
}

QueryServiceBindingResponse defines a struct for service binding

type QueryServiceDefinitionResponse

type QueryServiceDefinitionResponse struct {
	Name              string         `json:"name"`
	Description       string         `json:"description"`
	Tags              []string       `json:"tags"`
	Author            sdk.AccAddress `json:"author"`
	AuthorDescription string         `json:"author_description"`
	Schemas           string         `json:"schemas"`
}

QueryServiceDefinitionResponse represents a service definition

type QueryServiceRequestResponse

type QueryServiceRequestResponse struct {
	ID                         string         `json:"id"`
	ServiceName                string         `json:"service_name"`
	Provider                   sdk.AccAddress `json:"provider"`
	Consumer                   sdk.AccAddress `json:"consumer"`
	Input                      string         `json:"input"`
	ServiceFee                 sdk.Coins      `json:"service_fee"`
	SuperMode                  bool           `json:"super_mode"`
	RequestHeight              int64          `json:"request_height"`
	ExpirationHeight           int64          `json:"expiration_height"`
	RequestContextID           string         `json:"request_context_id"`
	RequestContextBatchCounter uint64         `json:"request_context_batch_counter"`
}

Request defines a request which contains the detailed request data

type QueryServiceResponseResponse

type QueryServiceResponseResponse struct {
	Provider                   sdk.AccAddress `json:"provider"`
	Consumer                   sdk.AccAddress `json:"consumer"`
	Output                     string         `json:"output"`
	Result                     string         `json:"error"`
	RequestContextID           string         `json:"request_context_id"`
	RequestContextBatchCounter uint64         `json:"request_context_batch_counter"`
}

Response defines a response

type Registry

type Registry map[string]RespondCallback

Registry defines a set of service invocation interfaces

type Request

type Request struct {
	ID                         github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=id,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"id,omitempty"`
	ServiceName                string                                               `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty" yaml:"service_name"`
	Provider                   github_com_bianjieai_irita_sdk_go_types.AccAddress   `` /* 129-byte string literal not displayed */
	Consumer                   github_com_bianjieai_irita_sdk_go_types.AccAddress   `` /* 129-byte string literal not displayed */
	Input                      string                                               `protobuf:"bytes,5,opt,name=input,proto3" json:"input,omitempty"`
	ServiceFee                 github_com_bianjieai_irita_sdk_go_types.Coins        `` /* 159-byte string literal not displayed */
	SuperMode                  bool                                                 `protobuf:"varint,7,opt,name=super_mode,json=superMode,proto3" json:"super_mode,omitempty" yaml:"super_mode"`
	RequestHeight              int64                                                `protobuf:"varint,8,opt,name=request_height,json=requestHeight,proto3" json:"request_height,omitempty" yaml:"request_height"`
	ExpirationHeight           int64                                                `` /* 135-byte string literal not displayed */
	RequestContextID           github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 200-byte string literal not displayed */
	RequestContextBatchCounter uint64                                               `` /* 182-byte string literal not displayed */
}

Request defines a standard for request.

func (Request) Convert

func (r Request) Convert() interface{}

func (*Request) Descriptor

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

func (Request) Empty

func (r Request) Empty() bool

func (*Request) Marshal

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

func (*Request) MarshalTo

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

func (*Request) MarshalToSizedBuffer

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

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) Size

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

func (*Request) String

func (m *Request) String() string

func (*Request) Unmarshal

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

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

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

func (*Request) XXX_Merge

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

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

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

type RequestContext

type RequestContext struct {
	ServiceName            string                                               `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty" yaml:"service_name"`
	Providers              []github_com_bianjieai_irita_sdk_go_types.AccAddress `` /* 131-byte string literal not displayed */
	Consumer               github_com_bianjieai_irita_sdk_go_types.AccAddress   `` /* 129-byte string literal not displayed */
	Input                  string                                               `protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"`
	ServiceFeeCap          github_com_bianjieai_irita_sdk_go_types.Coins        `` /* 174-byte string literal not displayed */
	ModuleName             string                                               `protobuf:"bytes,6,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty" yaml:"module_name"`
	Timeout                int64                                                `protobuf:"varint,7,opt,name=timeout,proto3" json:"timeout,omitempty"`
	SuperMode              bool                                                 `protobuf:"varint,8,opt,name=super_mode,json=superMode,proto3" json:"super_mode,omitempty" yaml:"super_mode"`
	Repeated               bool                                                 `protobuf:"varint,9,opt,name=repeated,proto3" json:"repeated,omitempty"`
	RepeatedFrequency      uint64                                               `` /* 140-byte string literal not displayed */
	RepeatedTotal          int64                                                `protobuf:"varint,11,opt,name=repeated_total,json=repeatedTotal,proto3" json:"repeated_total,omitempty" yaml:"repeated_total"`
	BatchCounter           uint64                                               `protobuf:"varint,12,opt,name=batch_counter,json=batchCounter,proto3" json:"batch_counter,omitempty" yaml:"repeated_total"`
	BatchRequestCount      uint32                                               `` /* 143-byte string literal not displayed */
	BatchResponseCount     uint32                                               `` /* 147-byte string literal not displayed */
	BatchResponseThreshold uint32                                               `` /* 163-byte string literal not displayed */
	ResponseThreshold      uint32                                               `` /* 140-byte string literal not displayed */
	BatchState             RequestContextBatchState                             `` /* 164-byte string literal not displayed */
	State                  RequestContextState                                  `protobuf:"varint,18,opt,name=state,proto3,enum=irita.modules.service.RequestContextState" json:"state,omitempty"`
}

RequestContext defines a standard for request context.

func (RequestContext) Convert

func (r RequestContext) Convert() interface{}

func (*RequestContext) Descriptor

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

func (RequestContext) Empty

func (r RequestContext) Empty() bool

Empty returns true if empty

func (*RequestContext) Marshal

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

func (*RequestContext) MarshalTo

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

func (*RequestContext) MarshalToSizedBuffer

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

func (*RequestContext) ProtoMessage

func (*RequestContext) ProtoMessage()

func (*RequestContext) Reset

func (m *RequestContext) Reset()

func (*RequestContext) Size

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

func (*RequestContext) String

func (m *RequestContext) String() string

func (*RequestContext) Unmarshal

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

func (*RequestContext) XXX_DiscardUnknown

func (m *RequestContext) XXX_DiscardUnknown()

func (*RequestContext) XXX_Marshal

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

func (*RequestContext) XXX_Merge

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

func (*RequestContext) XXX_Size

func (m *RequestContext) XXX_Size() int

func (*RequestContext) XXX_Unmarshal

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

type RequestContextBatchState

type RequestContextBatchState int32

RequestContextBatchState is a type alias that represents a request batch status as a byte

const (
	// BATCH_RUNNING defines the running batch status.
	BATCHRUNNING RequestContextBatchState = 0
	// BATCH_COMPLETED defines the completed batch status.
	BATCHCOMPLETED RequestContextBatchState = 1
)

func RequestContextBatchStateFromString

func RequestContextBatchStateFromString(str string) (RequestContextBatchState, error)

func (RequestContextBatchState) EnumDescriptor

func (RequestContextBatchState) EnumDescriptor() ([]byte, []int)

func (RequestContextBatchState) MarshalJSON

func (state RequestContextBatchState) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON representation

func (RequestContextBatchState) String

func (state RequestContextBatchState) String() string

func (*RequestContextBatchState) UnmarshalJSON

func (state *RequestContextBatchState) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals raw JSON bytes into a RequestContextBatchState

type RequestContextState

type RequestContextState int32

RequestContextState is a type alias that represents a request status as a byte

const (
	// RUNNING defines the running request context status.
	RUNNING RequestContextState = 0
	// PAUSED defines the paused request context status.
	PAUSED RequestContextState = 1
	// COMPLETED defines the completed request context status.
	COMPLETED RequestContextState = 2
)

func RequestContextStateFromString

func RequestContextStateFromString(str string) (RequestContextState, error)

func (RequestContextState) EnumDescriptor

func (RequestContextState) EnumDescriptor() ([]byte, []int)

func (RequestContextState) MarshalJSON

func (state RequestContextState) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON representation

func (RequestContextState) String

func (state RequestContextState) String() string

func (*RequestContextState) UnmarshalJSON

func (state *RequestContextState) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals raw JSON bytes into a RequestContextState.

type RespondCallback

type RespondCallback func(reqCtxID, reqID, input string) (output string, result string)

RespondCallback defines the callback function of the service response

type Response

type Response struct {
	Provider                   github_com_bianjieai_irita_sdk_go_types.AccAddress   `` /* 129-byte string literal not displayed */
	Consumer                   github_com_bianjieai_irita_sdk_go_types.AccAddress   `` /* 129-byte string literal not displayed */
	Result                     string                                               `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
	Output                     string                                               `protobuf:"bytes,4,opt,name=output,proto3" json:"output,omitempty"`
	RequestContextID           github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 199-byte string literal not displayed */
	RequestContextBatchCounter uint64                                               `` /* 181-byte string literal not displayed */
}

Response defines a standard for response.

func (Response) Convert

func (r Response) Convert() interface{}

func (*Response) Descriptor

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

func (Response) Empty

func (r Response) Empty() bool

func (*Response) Marshal

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

func (*Response) MarshalTo

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

func (*Response) MarshalToSizedBuffer

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

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) Size

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

func (*Response) String

func (m *Response) String() string

func (*Response) Unmarshal

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

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

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

func (*Response) XXX_Merge

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

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

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

type ServiceBinding

type ServiceBinding struct {
	ServiceName  string                                             `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty" yaml:"service_name"`
	Provider     github_com_bianjieai_irita_sdk_go_types.AccAddress `` /* 129-byte string literal not displayed */
	Deposit      github_com_bianjieai_irita_sdk_go_types.Coins      `protobuf:"bytes,3,rep,name=deposit,proto3,castrepeated=github.com/bianjieai/irita-sdk-go/types.Coins" json:"deposit"`
	Pricing      string                                             `protobuf:"bytes,4,opt,name=pricing,proto3" json:"pricing,omitempty"`
	QoS          uint64                                             `protobuf:"varint,5,opt,name=qos,proto3" json:"qos,omitempty"`
	Available    bool                                               `protobuf:"varint,6,opt,name=available,proto3" json:"available,omitempty"`
	DisabledTime time.Time                                          `protobuf:"bytes,7,opt,name=disabled_time,json=disabledTime,proto3,stdtime" json:"disabled_time" yaml:"disabled_time"`
	Owner        github_com_bianjieai_irita_sdk_go_types.AccAddress `protobuf:"bytes,8,opt,name=owner,proto3,casttype=github.com/bianjieai/irita-sdk-go/types.AccAddress" json:"owner,omitempty"`
}

ServiceBinding defines a standard for service binding.

func (ServiceBinding) Convert

func (b ServiceBinding) Convert() interface{}

func (*ServiceBinding) Descriptor

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

func (*ServiceBinding) Marshal

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

func (*ServiceBinding) MarshalTo

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

func (*ServiceBinding) MarshalToSizedBuffer

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

func (*ServiceBinding) ProtoMessage

func (*ServiceBinding) ProtoMessage()

func (*ServiceBinding) Reset

func (m *ServiceBinding) Reset()

func (*ServiceBinding) Size

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

func (*ServiceBinding) String

func (m *ServiceBinding) String() string

func (*ServiceBinding) Unmarshal

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

func (*ServiceBinding) XXX_DiscardUnknown

func (m *ServiceBinding) XXX_DiscardUnknown()

func (*ServiceBinding) XXX_Marshal

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

func (*ServiceBinding) XXX_Merge

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

func (*ServiceBinding) XXX_Size

func (m *ServiceBinding) XXX_Size() int

func (*ServiceBinding) XXX_Unmarshal

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

type ServiceDefinition

type ServiceDefinition struct {
	Name              string                                             `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description       string                                             `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Tags              []string                                           `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`
	Author            github_com_bianjieai_irita_sdk_go_types.AccAddress `protobuf:"bytes,4,opt,name=author,proto3,casttype=github.com/bianjieai/irita-sdk-go/types.AccAddress" json:"author,omitempty"`
	AuthorDescription string                                             `` /* 138-byte string literal not displayed */
	Schemas           string                                             `protobuf:"bytes,6,opt,name=schemas,proto3" json:"schemas,omitempty"`
}

ServiceDefinition defines a standard for service definition.

func (ServiceDefinition) Convert

func (r ServiceDefinition) Convert() interface{}

func (*ServiceDefinition) Descriptor

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

func (*ServiceDefinition) Marshal

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

func (*ServiceDefinition) MarshalTo

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

func (*ServiceDefinition) MarshalToSizedBuffer

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

func (*ServiceDefinition) ProtoMessage

func (*ServiceDefinition) ProtoMessage()

func (*ServiceDefinition) Reset

func (m *ServiceDefinition) Reset()

func (*ServiceDefinition) Size

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

func (*ServiceDefinition) String

func (m *ServiceDefinition) String() string

func (*ServiceDefinition) Unmarshal

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

func (*ServiceDefinition) XXX_DiscardUnknown

func (m *ServiceDefinition) XXX_DiscardUnknown()

func (*ServiceDefinition) XXX_Marshal

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

func (*ServiceDefinition) XXX_Merge

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

func (*ServiceDefinition) XXX_Size

func (m *ServiceDefinition) XXX_Size() int

func (*ServiceDefinition) XXX_Unmarshal

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

type ServiceI

type ServiceI interface {
	sdk.Module
	Tx
	Query
}

ServiceI defines a set of interfaces in the service module

func NewClient

func NewClient(bc sdk.BaseClient, cdc codec.Marshaler) ServiceI

type Tx

type Tx interface {
	DefineService(request DefineServiceRequest, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error)
	BindService(request BindServiceRequest, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error)
	InvokeService(request InvokeServiceRequest, baseTx sdk.BaseTx) (requestContextID string, err sdk.Error)
	SetWithdrawAddress(withdrawAddress string, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error)
	UpdateServiceBinding(request UpdateServiceBindingRequest, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error)
	DisableServiceBinding(serviceName, provider string, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error)
	EnableServiceBinding(serviceName, provider string, deposit sdk.DecCoins, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error)
	RefundServiceDeposit(serviceName, provider string, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error)
	PauseRequestContext(requestContextID string, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error)
	StartRequestContext(requestContextID string, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error)
	KillRequestContext(requestContextID string, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error)
	UpdateRequestContext(request UpdateRequestContextRequest, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error)
	WithdrawEarnedFees(provider string, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error)
	SubscribeServiceRequest(serviceName string, callback RespondCallback, baseTx sdk.BaseTx) (sdk.Subscription, sdk.Error)
	SubscribeServiceResponse(reqCtxID string, callback InvokeCallback) (sdk.Subscription, sdk.Error)
}

Tx defines a set of transaction interfaces in the service module

type UpdateRequestContextRequest

type UpdateRequestContextRequest struct {
	RequestContextID  string       `json:"request_context_id"`
	Providers         []string     `json:"providers"`
	ServiceFeeCap     sdk.DecCoins `json:"service_fee_cap"`
	Timeout           int64        `json:"timeout"`
	RepeatedFrequency uint64       `json:"repeated_frequency"`
	RepeatedTotal     int64        `json:"repeated_total"`
}

UpdateRequestContextRequest defines a message to update a request context

type UpdateServiceBindingRequest

type UpdateServiceBindingRequest struct {
	ServiceName string       `json:"service_name"`
	Deposit     sdk.DecCoins `json:"deposit"`
	Pricing     string       `json:"pricing"`
	QoS         uint64       `json:"Qos"`
	Provider    string       `json:"provider"`
}

UpdateServiceBindingRequest defines a message to update a service binding

Jump to

Keyboard shortcuts

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