Versions in this module Expand all Collapse all v2 v2.4.0 Nov 13, 2024 v2.3.0 Nov 13, 2024 v2.1.1 Nov 13, 2024 v2.1.0 Nov 11, 2024 Changes in this version + func AuthenticateBridgeType(bt *BridgeType, token string) (bool, error) + func AuthenticateExternalInitiator(eia *auth.Token, ea *ExternalInitiator) (bool, error) + func MarshalBridgeMetaData(latestAnswer *big.Int, updatedAt *big.Int) (map[string]interface{}, error) + func NewBridgeType(btr *BridgeTypeRequest) (*BridgeTypeAuthentication, *BridgeType, error) + type BridgeMetaData struct + LatestAnswer *big.Int + UpdatedAt *big.Int + type BridgeMetaDataJSON struct + Meta BridgeMetaData + type BridgeName string + func MustParseBridgeName(val string) BridgeName + func ParseBridgeName(val string) (BridgeName, error) + func (t *BridgeName) Scan(value interface{}) error + func (t *BridgeName) UnmarshalJSON(input []byte) error + func (t BridgeName) MarshalJSON() ([]byte, error) + func (t BridgeName) String() string + func (t BridgeName) Value() (driver.Value, error) + type BridgeType struct + Confirmations uint32 + CreatedAt time.Time + IncomingTokenHash string + MinimumContractPayment *assets.Link + Name BridgeName + OutgoingToken string + Salt string + URL models.WebURL + UpdatedAt time.Time + type BridgeTypeAuthentication struct + Confirmations uint32 + IncomingToken string + MinimumContractPayment *assets.Link + Name BridgeName + OutgoingToken string + URL models.WebURL + type BridgeTypeRequest struct + Confirmations uint32 + MinimumContractPayment *assets.Link + Name BridgeName + URL models.WebURL + func (bt *BridgeTypeRequest) SetID(value string) error + func (bt BridgeTypeRequest) GetID() string + func (bt BridgeTypeRequest) GetName() string + type ExternalInitiator struct + AccessKey string + CreatedAt time.Time + HashedSecret string + ID int64 + Name string + OutgoingSecret string + OutgoingToken string + Salt string + URL *models.WebURL + UpdatedAt time.Time + func NewExternalInitiator(eia *auth.Token, eir *ExternalInitiatorRequest) (*ExternalInitiator, error) + type ExternalInitiatorRequest struct + Name string + URL *models.WebURL + type ORM interface + BridgeTypes func(offset int, limit int) ([]BridgeType, int, error) + CreateBridgeType func(bt *BridgeType) error + CreateExternalInitiator func(externalInitiator *ExternalInitiator) error + DeleteBridgeType func(bt *BridgeType) error + DeleteExternalInitiator func(name string) error + ExternalInitiators func(offset int, limit int) ([]ExternalInitiator, int, error) + FindBridge func(name BridgeName) (bt BridgeType, err error) + FindBridges func(name []BridgeName) (bts []BridgeType, err error) + FindExternalInitiator func(eia *auth.Token) (*ExternalInitiator, error) + FindExternalInitiatorByName func(iname string) (exi ExternalInitiator, err error) + GetCachedResponse func(dotId string, specId int32, maxElapsed time.Duration) ([]byte, error) + UpdateBridgeType func(bt *BridgeType, btr *BridgeTypeRequest) error + UpsertBridgeResponse func(dotId string, specId int32, response []byte) error + func NewORM(db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig) ORM