Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions pkg/types/core/gateway_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package core
import (
"context"
"encoding/json"
"fmt"

jsonrpc "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2"
)
Expand Down Expand Up @@ -30,3 +31,31 @@ type GatewayConnectorHandler interface {
// HandleGatewayMessage is called when a message is received from a gateway
HandleGatewayMessage(ctx context.Context, gatewayID string, req *jsonrpc.Request[json.RawMessage]) error
}

var _ GatewayConnector = (*UnimplementedGatewayConnector)(nil)

type UnimplementedGatewayConnector struct{}

func (u *UnimplementedGatewayConnector) AddHandler(ctx context.Context, methods []string, handler GatewayConnectorHandler) error {
return fmt.Errorf("not implemented")
}

func (u *UnimplementedGatewayConnector) SendToGateway(ctx context.Context, gatewayID string, resp *jsonrpc.Response[json.RawMessage]) error {
return fmt.Errorf("not implemented")
}

func (u *UnimplementedGatewayConnector) SignMessage(ctx context.Context, msg []byte) ([]byte, error) {
return nil, fmt.Errorf("not implemented")
}

func (u *UnimplementedGatewayConnector) GatewayIDs(ctx context.Context) ([]string, error) {
return nil, fmt.Errorf("not implemented")
}

func (u *UnimplementedGatewayConnector) DonID(ctx context.Context) (string, error) {
return "", fmt.Errorf("not implemented")
}

func (u *UnimplementedGatewayConnector) AwaitConnection(ctx context.Context, gatewayID string) error {
return fmt.Errorf("not implemented")
}
Loading