client

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("unexpected response code, got 404")
View Source
var ErrUnprocessableEntity = errors.New("unexpected response code, got 422")

Functions

This section is empty.

Types

type BridgeType

type BridgeType struct {
	Data BridgeTypeData `json:"data"`
}

type BridgeTypeAttributes

type BridgeTypeAttributes struct {
	Name string `json:"name"`
	URL  string `json:"url"`
}

type BridgeTypeData

type BridgeTypeData struct {
	Attributes BridgeTypeAttributes `json:"attributes"`
}
type Chainlink struct {
	Client
	Config  *Config
	Cookies []*http.Cookie
}
func NewChainlink(c *Config) (*Chainlink, error)

func (*Chainlink) CreateBridge

func (c *Chainlink) CreateBridge(name, url string) error

func (*Chainlink) CreateOCRKey

func (c *Chainlink) CreateOCRKey() (*OCRKey, error)

func (*Chainlink) CreateP2PKey

func (c *Chainlink) CreateP2PKey() (*P2PKey, error)

func (*Chainlink) CreateSpec

func (c *Chainlink) CreateSpec(spec string) (string, error)

func (*Chainlink) CreateSpecV2

func (c *Chainlink) CreateSpecV2(spec string) (*SpecV2, error)

func (*Chainlink) DeleteBridge

func (c *Chainlink) DeleteBridge(name string) error

func (*Chainlink) DeleteOCRKey

func (c *Chainlink) DeleteOCRKey(id string) error

func (*Chainlink) DeleteP2PKey

func (c *Chainlink) DeleteP2PKey(id int) error

func (*Chainlink) DeleteSpec

func (c *Chainlink) DeleteSpec(id string) error

func (*Chainlink) DeleteSpecV2

func (c *Chainlink) DeleteSpecV2(id string) error

func (*Chainlink) ReadBridge

func (c *Chainlink) ReadBridge(name string) (*BridgeType, error)

func (*Chainlink) ReadETHKeys

func (c *Chainlink) ReadETHKeys() (*ETHKeys, error)

func (*Chainlink) ReadOCRKeys

func (c *Chainlink) ReadOCRKeys() (*OCRKeys, error)

func (*Chainlink) ReadP2PKeys

func (c *Chainlink) ReadP2PKeys() (*P2PKeys, error)

func (*Chainlink) ReadSpec

func (c *Chainlink) ReadSpec(id string) (*Response, error)

func (*Chainlink) ReadSpecV2

func (c *Chainlink) ReadSpecV2(id string) error

type Client

type Client interface {
	CreateBridge(addr, name, url string) error
	ReadBridge(id string) (*BridgeType, error)
	DeleteBridge(id string) error
}

type Config

type Config struct {
	URL      string
	Email    string
	Password string
}

type DataIdentifier

type DataIdentifier interface {
	Id() string
}

type ETHKey

type ETHKey struct {
	Data ETHKeyData `json:"data"`
}

type ETHKeyAttributes

type ETHKeyAttributes struct {
	Address string `json:"address"`
}

type ETHKeyData

type ETHKeyData struct {
	Attributes ETHKeyAttributes `json:"attributes"`
}

type ETHKeys

type ETHKeys struct {
	Data []ETHKeyData `json:"data"`
}

type OCRKey

type OCRKey struct {
	Data OCRKeyData `json:"data"`
}

type OCRKeyAttributes

type OCRKeyAttributes struct {
	ConfigPublicKey       string `json:"configPublicKey"`
	OffChainPublicKey     string `json:"offChainPublicKey"`
	OnChainSigningAddress string `json:"onChainSigningAddress"`
}

type OCRKeyData

type OCRKeyData struct {
	ID         string           `json:"id"`
	Attributes OCRKeyAttributes `json:"attributes"`
}

type OCRKeys

type OCRKeys struct {
	Data []OCRKeyData `json:"data"`
}

type P2PKey

type P2PKey struct {
	Data P2PKeyData `json:"data"`
}

type P2PKeyAttributes

type P2PKeyAttributes struct {
	ID        int    `json:"id"`
	PeerID    string `json:"peerId"`
	PublicKey string `json:"publicKey"`
}

type P2PKeyData

type P2PKeyData struct {
	Attributes P2PKeyAttributes `json:"attributes"`
}

type P2PKeys

type P2PKeys struct {
	Data []P2PKeyData `json:"data"`
}

type Response

type Response struct {
	Data map[string]interface{}
}

func NewResponse

func NewResponse() Response

type ResponseArray

type ResponseArray struct {
	Data []map[string]interface{}
}

type Session

type Session struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type SpecV2

type SpecV2 struct {
	Data SpecV2Data `json:"data"`
}

type SpecV2Data

type SpecV2Data struct {
	ID string `json:"id"`
}

type SpecV2Form

type SpecV2Form struct {
	TOML string `json:"toml"`
}

Jump to

Keyboard shortcuts

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