sebak: boscoin.io/sebak/lib/node/runner/api/resource Index | Files

package resource

import "boscoin.io/sebak/lib/node/runner/api/resource"

Index

Package Files

account.go block.go constant.go frozen_account.go operation.go resource.go transaction.go

Constants

const (
    APIVersionV1 = "/v1"
    APIPrefix    = "/api"

    URLAccounts              = APIPrefix + APIVersionV1 + "/accounts/{id}"
    URLAccountTransactions   = APIPrefix + APIVersionV1 + "/accounts/{id}/transactions"
    URLAccountOperations     = APIPrefix + APIVersionV1 + "/accounts/{id}/operations"
    URLAccountFrozenAccounts = APIPrefix + APIVersionV1 + "/accounts/{id}/frozen-accounts"
    URLFrozenAccounts        = APIPrefix + APIVersionV1 + "/frozen-accounts"
    URLTransactions          = APIPrefix + APIVersionV1 + "/transactions"
    URLTransactionByHash     = APIPrefix + APIVersionV1 + "/transactions/{id}"
    URLTransactionOperations = APIPrefix + APIVersionV1 + "/transactions/{id}/operations"
    URLTransactionOperation  = APIPrefix + APIVersionV1 + "/transactions/{id}/operations/{opindex}"
    URLTransactionStatus     = APIPrefix + APIVersionV1 + "/transactions/{id}/status"
    URLOperations            = APIPrefix + APIVersionV1 + "/operations/{id}"
    URLBlocks                = APIPrefix + APIVersionV1 + "/blocks/{id}"
)

type Account Uses

type Account struct {
    // contains filtered or unexported fields
}

func NewAccount Uses

func NewAccount(ba *block.BlockAccount) *Account

func (Account) GetMap Uses

func (a Account) GetMap() hal.Entry

func (Account) LinkSelf Uses

func (a Account) LinkSelf() string

func (Account) Resource Uses

func (a Account) Resource() *hal.Resource

type Block Uses

type Block struct {
    // contains filtered or unexported fields
}

func NewBlock Uses

func NewBlock(b *block.Block) *Block

func (Block) GetMap Uses

func (blk Block) GetMap() hal.Entry

func (Block) LinkSelf Uses

func (blk Block) LinkSelf() string

func (Block) Resource Uses

func (blk Block) Resource() *hal.Resource

type FrozenAccount Uses

type FrozenAccount struct {
    // contains filtered or unexported fields
}

func NewFrozenAccount Uses

func NewFrozenAccount(ba *block.BlockAccount, info FrozenAccountInfo) *FrozenAccount

func (FrozenAccount) GetMap Uses

func (fa FrozenAccount) GetMap() hal.Entry

func (FrozenAccount) LinkSelf Uses

func (fa FrozenAccount) LinkSelf() string

func (FrozenAccount) Resource Uses

func (fa FrozenAccount) Resource() *hal.Resource

type FrozenAccountInfo Uses

type FrozenAccountInfo struct {
    CreatedBlockHeight           uint64
    CreatedOpHash                string
    CreatedSequenceId            uint64
    InitialAmount                common.Amount
    FreezingState                FrozenAccountState
    UnfreezingRequestBlockHeight uint64
    UnfreezingRequestOpHash      string
    UnfreezingRemainingBlocks    uint64
    PaymentOpHash                string
}

type FrozenAccountState Uses

type FrozenAccountState string
const (
    FrozenState   FrozenAccountState = "frozen"
    MeltingState  FrozenAccountState = "melting"
    UnfrozenState FrozenAccountState = "unfrozen"
    ReturnedState FrozenAccountState = "returned"
)

type Operation Uses

type Operation struct {
    Block *block.Block
    // contains filtered or unexported fields
}

func NewOperation Uses

func NewOperation(bo *block.BlockOperation, opIndex int) *Operation

func (Operation) BlockOperation Uses

func (o Operation) BlockOperation() *block.BlockOperation

func (Operation) GetMap Uses

func (o Operation) GetMap() hal.Entry

func (Operation) LinkSelf Uses

func (o Operation) LinkSelf() string

func (Operation) Resource Uses

func (o Operation) Resource() *hal.Resource

type Resource Uses

type Resource interface {
    LinkSelf() string
    Resource() *hal.Resource
    GetMap() hal.Entry
}

type ResourceList Uses

type ResourceList struct {
    Resources []Resource
    SelfLink  string
    NextLink  string
    PrevLink  string
}

func NewResourceList Uses

func NewResourceList(list []Resource, selfLink, nextLink, prevLink string) *ResourceList

func (ResourceList) GetMap Uses

func (l ResourceList) GetMap() hal.Entry

func (ResourceList) LinkNext Uses

func (l ResourceList) LinkNext() string

func (ResourceList) LinkPrev Uses

func (l ResourceList) LinkPrev() string

func (ResourceList) LinkSelf Uses

func (l ResourceList) LinkSelf() string

func (ResourceList) Resource Uses

func (l ResourceList) Resource() *hal.Resource

type Transaction Uses

type Transaction struct {
    // contains filtered or unexported fields
}

func NewTransaction Uses

func NewTransaction(bt *block.BlockTransaction, tx transaction.Transaction) *Transaction

func (Transaction) GetMap Uses

func (t Transaction) GetMap() hal.Entry

func (Transaction) LinkSelf Uses

func (t Transaction) LinkSelf() string

func (Transaction) Resource Uses

func (t Transaction) Resource() *hal.Resource

type TransactionStatus Uses

type TransactionStatus struct {
    Hash   string
    Status string
}

func NewTransactionStatus Uses

func NewTransactionStatus(hash, status string) *TransactionStatus

func (TransactionStatus) GetMap Uses

func (t TransactionStatus) GetMap() hal.Entry

func (TransactionStatus) LinkSelf Uses

func (t TransactionStatus) LinkSelf() string

func (TransactionStatus) Resource Uses

func (t TransactionStatus) Resource() *hal.Resource

Package resource imports 7 packages (graph) and is imported by 9 packages. Updated 2019-03-27. Refresh now. Tools for package owners.