feeds

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JobTypeFluxMonitor       = "fluxmonitor"
	JobTypeOffchainReporting = "offchainreporting"
)

We only support OCR and FM for the feeds manager

Variables

This section is empty.

Functions

func NewORM

func NewORM(db *gorm.DB) *orm

Types

type FeedsManager

type FeedsManager struct {
	ID        int32
	Name      string
	URI       string
	PublicKey PublicKey
	JobTypes  pq.StringArray `gorm:"type:text[]"`
	Network   string
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (FeedsManager) TableName

func (FeedsManager) TableName() string

type ORM

type ORM interface {
	CountManagers() (int64, error)
	CreateManager(ctx context.Context, ms *FeedsManager) (int32, error)
	GetManager(ctx context.Context, id int32) (*FeedsManager, error)
	ListManagers(ctx context.Context) ([]FeedsManager, error)
}

type PublicKey added in v0.0.3

type PublicKey []byte

PublicKey defines a type which can be used for JSON and SQL.

func PublicKeyFromHex added in v0.0.3

func PublicKeyFromHex(hexStr string) (*PublicKey, error)

PublicKeyFromHex generates a public key from a hex string

func (PublicKey) MarshalJSON added in v0.0.3

func (k PublicKey) MarshalJSON() ([]byte, error)

func (*PublicKey) Scan added in v0.0.3

func (k *PublicKey) Scan(value interface{}) error

func (PublicKey) String added in v0.0.3

func (k PublicKey) String() string

func (*PublicKey) UnmarshalJSON added in v0.0.3

func (k *PublicKey) UnmarshalJSON(in []byte) error

func (PublicKey) Value added in v0.0.3

func (k PublicKey) Value() (driver.Value, error)

type Service

type Service interface {
	CountManagers() (int64, error)
	GetManager(id int32) (*FeedsManager, error)
	ListManagers() ([]FeedsManager, error)
	RegisterManager(ms *FeedsManager) (int32, error)
}

func NewService

func NewService(orm ORM) Service

NewService constructs a new feeds service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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