migration0

package
v0.0.0-...-5cb58b4 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const SignatureLength = 65

Variables

This section is empty.

Functions

This section is empty.

Types

type BridgeType

type BridgeType struct {
	Name                 TaskType `json:"name" storm:"id,unique"`
	URL                  WebURL   `json:"url"`
	DefaultConfirmations uint64   `json:"defaultConfirmations"`
	IncomingToken        string   `json:"incomingToken"`
	OutgoingToken        string   `json:"outgoingToken"`
}

type Cron

type Cron string

type EIP55Address

type EIP55Address string

type Encumbrance

type Encumbrance struct {
	Payment    *Link          `json:"payment"`
	Expiration uint64         `json:"expiration"`
	Oracles    []EIP55Address `json:"oracles"`
}

type IndexableBlockNumber

type IndexableBlockNumber struct {
	Number hexutil.Big `json:"number" storm:"id,unique"`
	Digits int         `json:"digits" storm:"index"`
	Hash   common.Hash `json:"hash"`
}

type Initiator

type Initiator struct {
	ID       int            `json:"id" storm:"id,increment"`
	JobID    string         `json:"jobId" storm:"index"`
	Type     string         `json:"type" storm:"index"`
	Schedule Cron           `json:"schedule,omitempty"`
	Time     Time           `json:"time,omitempty"`
	Ran      bool           `json:"ran,omitempty"`
	Address  common.Address `json:"address,omitempty" storm:"index"`
}

func (*Initiator) UnmarshalJSON

func (i *Initiator) UnmarshalJSON(input []byte) error

type JSON

type JSON struct {
	gjson.Result
}

func (JSON) Bytes

func (j JSON) Bytes() []byte

func (JSON) MarshalJSON

func (j JSON) MarshalJSON() ([]byte, error)

func (JSON) Merge

func (j JSON) Merge(j2 JSON) (JSON, error)

func (*JSON) UnmarshalJSON

func (j *JSON) UnmarshalJSON(b []byte) error

type JobRun

type JobRun struct {
	ID             string       `json:"id" storm:"id,unique"`
	JobID          string       `json:"jobId" storm:"index"`
	Result         RunResult    `json:"result" storm:"inline"`
	Status         RunStatus    `json:"status" storm:"index"`
	TaskRuns       []TaskRun    `json:"taskRuns" storm:"inline"`
	CreatedAt      time.Time    `json:"createdAt" storm:"index"`
	CompletedAt    null.Time    `json:"completedAt"`
	Initiator      Initiator    `json:"initiator"`
	CreationHeight *hexutil.Big `json:"creationHeight"`
	Overrides      RunResult    `json:"overrides"`
}

type JobSpec

type JobSpec struct {
	ID         string      `json:"id" storm:"id,unique"`
	CreatedAt  Time        `json:"createdAt" storm:"index"`
	Initiators []Initiator `json:"initiators"`
	Tasks      []TaskSpec  `json:"tasks" storm:"inline"`
	StartAt    null.Time   `json:"startAt" storm:"index"`
	EndAt      null.Time   `json:"endAt" storm:"index"`
}
type Link big.Int

func (*Link) MarshalText

func (l *Link) MarshalText() ([]byte, error)

func (*Link) SetString

func (l *Link) SetString(s string, base int) (*Link, bool)

func (*Link) UnmarshalText

func (l *Link) UnmarshalText(text []byte) error

type Migration

type Migration struct{}

func (Migration) Migrate

func (m Migration) Migrate(orm *orm.ORM) error

func (Migration) Timestamp

func (m Migration) Timestamp() string

type RunResult

type RunResult struct {
	JobRunID     string      `json:"jobRunId"`
	Data         JSON        `json:"data"`
	Status       RunStatus   `json:"status"`
	ErrorMessage null.String `json:"error"`
	Amount       *big.Int    `json:"amount,omitempty"`
}

type RunStatus

type RunStatus string

type ServiceAgreement

type ServiceAgreement struct {
	CreatedAt   Time        `json:"createdAt" storm:"index"`
	Encumbrance Encumbrance `json:"encumbrance" storm:"inline"`
	ID          string      `json:"id" storm:"id,unique"`
	JobSpecID   string      `json:"jobSpecID"`
	RequestBody string      `json:"requestBody"`
	Signature   Signature   `json:"signature"`
	JobSpec     JobSpec
}

type Session

type Session struct {
	ID       string `json:"id" storm:"id,unique"`
	LastUsed Time   `json:"lastUsed" storm:"index"`
}

type Signature

type Signature [SignatureLength]byte

type TaskRun

type TaskRun struct {
	ID     string    `json:"id" storm:"id,unique"`
	Result RunResult `json:"result"`
	Status RunStatus `json:"status"`
	Task   TaskSpec  `json:"task"`
}

type TaskSpec

type TaskSpec struct {
	Type          TaskType `json:"type" storm:"index"`
	Confirmations uint64   `json:"confirmations"`
	Params        JSON     `json:"-"`
}

func (TaskSpec) MarshalJSON

func (t TaskSpec) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON-encoded TaskSpec Params.

func (*TaskSpec) UnmarshalJSON

func (t *TaskSpec) UnmarshalJSON(input []byte) error

UnmarshalJSON parses the given input and updates the TaskSpec.

type TaskType

type TaskType string

type Time

type Time struct {
	time.Time
}

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) error

UnmarshalJSON parses the raw time stored in JSON-encoded data and stores it to the Time field.

type Tx

type Tx struct {
	ID       uint64         `storm:"id,increment,index"`
	From     common.Address `storm:"index"`
	To       common.Address
	Data     []byte
	Nonce    uint64 `storm:"index"`
	Value    *big.Int
	GasLimit uint64
	TxAttempt
}

type TxAttempt

type TxAttempt struct {
	Hash      common.Hash `storm:"id,unique"`
	TxID      uint64      `storm:"index"`
	GasPrice  *big.Int
	Confirmed bool
	Hex       string
	SentAt    uint64
}

type Unchanged

type Unchanged interface{}

type User

type User struct {
	Email          string `json:"email" storm:"id,unique"`
	HashedPassword string `json:"hashedPassword"`
	CreatedAt      Time   `json:"createdAt" storm:"index"`
}

type WebURL

type WebURL struct {
	*url.URL
}

func (*WebURL) UnmarshalJSON

func (w *WebURL) UnmarshalJSON(j []byte) error

Jump to

Keyboard shortcuts

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