rest

package
v0.22.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: Apache-2.0, Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(ctx context.CoreContext, r *mux.Router, cdc *wire.Codec, kb keys.Keybase, storeName string)

RegisterRoutes resgister REST routes

func WriteJSON added in v0.22.4

func WriteJSON(w http.ResponseWriter, cdc *wire.Codec, data interface{})

WriteJSON ...

Types

type AssetOutput added in v0.22.0

type AssetOutput struct {
	Asset     asset.Asset            `json:"asset"`
	Materials map[string]asset.Asset `json:"material_by_id"`
}

AssetOutput ..

type ProposalOutput added in v0.20.0

type ProposalOutput struct {
	Role       asset.ProposalRole   `json:"role"`       // The role assigned to the recipient
	Status     asset.ProposalStatus `json:"status"`     // The response of the recipient
	Properties []string             `json:"properties"` // The asset's attributes name that the recipient is authorized to update
	Issuer     sdk.AccAddress       `json:"issuer"`     // The proposal issuer
	Recipient  sdk.AccAddress       `json:"recipient"`  // The recipient of the proposal
	AssetID    string               `json:"asset_id"`   // The id of the asset
}

ProposalOutput ...

func ToProposalOutput added in v0.22.4

func ToProposalOutput(proposal asset.Proposal, assetID string) ProposalOutput

ToProposalOutput ...

Jump to

Keyboard shortcuts

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