Documentation ¶
Index ¶
- func HealthHandler(w http.ResponseWriter, _ *http.Request)
- type Attribute
- type AttributeConfig
- type Controller
- func (c *Controller) GetReceiptByTransactionHash(rw http.ResponseWriter, r *http.Request)
- func (c *Controller) GetTable(rw http.ResponseWriter, r *http.Request)
- func (c *Controller) GetTableQuery(rw http.ResponseWriter, r *http.Request)
- func (c *Controller) Version(rw http.ResponseWriter, _ *http.Request)
- type Metadata
- type MetadataConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HealthHandler ¶
func HealthHandler(w http.ResponseWriter, _ *http.Request)
HealthHandler serves health check requests.
Types ¶
type Attribute ¶
type Attribute struct { DisplayType string `json:"display_type,omitempty"` TraitType string `json:"trait_type"` Value interface{} `json:"value"` }
Attribute is a single entry in the "attributes" field of Metadata.
type AttributeConfig ¶
type AttributeConfig struct { Column string `query:"column"` DisplayType string `query:"display_type"` TraitType string `query:"trait_type"` }
AttributeConfig provides formatting for a column used to drive an Attribute when using format=erc721 query param.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller defines the HTTP handlers for interacting with user tables.
func NewController ¶
func NewController(gateway gateway.Gateway) *Controller
NewController creates a new Controller.
func (*Controller) GetReceiptByTransactionHash ¶
func (c *Controller) GetReceiptByTransactionHash(rw http.ResponseWriter, r *http.Request)
GetReceiptByTransactionHash handles request asking for a transaction receipt.
func (*Controller) GetTable ¶
func (c *Controller) GetTable(rw http.ResponseWriter, r *http.Request)
GetTable handles the GET /chain/{chainID}/tables/{tableId} call.
func (*Controller) GetTableQuery ¶
func (c *Controller) GetTableQuery(rw http.ResponseWriter, r *http.Request)
GetTableQuery handles the GET /query?statement=[statement] call. Use format=objects|table query param to control output format.
func (*Controller) Version ¶
func (c *Controller) Version(rw http.ResponseWriter, _ *http.Request)
Version returns git information of the running binary.
type Metadata ¶
type Metadata struct { Image interface{} `json:"image,omitempty"` ImageTransparent interface{} `json:"image_transparent,omitempty"` ImageData interface{} `json:"image_data,omitempty"` ExternalURL interface{} `json:"external_url,omitempty"` Description interface{} `json:"description,omitempty"` Name interface{} `json:"name,omitempty"` Attributes []Attribute `json:"attributes,omitempty"` BackgroundColor interface{} `json:"background_color,omitempty"` AnimationURL interface{} `json:"animation_url,omitempty"` YoutubeURL interface{} `json:"youtube_url,omitempty"` }
Metadata represents erc721 metadata. Ref: https://docs.opensea.io/docs/metadata-standards
type MetadataConfig ¶
type MetadataConfig struct { Image string `query:"image"` ImageTransparent string `query:"image_transparent"` ImageData string `query:"image_data"` ExternalURL string `query:"external_url"` Description string `query:"description"` Name string `query:"name"` Attributes []AttributeConfig `query:"attributes"` BackgroundColor string `query:"background_color"` AnimationURL string `query:"animation_url"` YoutubeURL string `query:"youtube_url"` }
MetadataConfig defines columns should be mapped to erc721 metadata when using format=erc721 query param.