Documentation ¶
Index ¶
- Constants
- Variables
- type BaseResp
- type BlockHashCheckReq
- type BlockHashCheckResp
- type BlockHashQueryResp
- type BlockHashResp
- type License
- type LicenseQueryResp
- type Metadata
- type MetadataQueryResp
- type MetadataSaveResp
- type MetadataType
- type RegisterAccountReq
- type RegisterAccountResp
- type Transaction
Constants ¶
View Source
const (
APISuccessCode = "ok"
)
Variables ¶
View Source
var (
NoneLicense = License{Type: "none"}
)
Functions ¶
This section is empty.
Types ¶
type BlockHashCheckReq ¶
type BlockHashCheckResp ¶
type BlockHashQueryResp ¶
type BlockHashQueryResp struct { BaseResp Data BlockHashResp `json:"data,omitempty"` }
type BlockHashResp ¶
type LicenseQueryResp ¶
type LicenseQueryResp struct { BaseResp Data map[string]interface{} `json:"data,omitempty"` Tx Transaction `json:"tx,omitempty"` }
type Metadata ¶
type Metadata struct { ContentHash string `json:"content_hash,omitempty" binding:"required"` Created string `json:"created,omitempty" binding:"required"` BlockHash string `json:"block_hash,omitempty" binding:"required"` BlockHeight string `json:"block_height,omitempty" binding:"required"` Language string `json:"language,omitempty" binding:"required"` Signature string `json:"signature,omitempty" binding:"required"` PubKey string `json:"pubkey,omitempty" binding:"required"` Type string `json:"type,omitempty" binding:"required"` License struct { Params map[string]string `json:"parameters,omitempty"` Type string `json:"type,omitempty" binding:"required"` } `json:"license,omitempty" binding:"required"` ID string `json:"id,omitempty"` Abstract string `json:"abstract,omitempty"` Category string `json:"category,omitempty"` Content string `json:"content,omitempty"` Data interface{} `json:"data,omitempty"` DNA string `json:"dna,omitempty"` ParentDna string `json:"parent_dna,omitempty"` Extra interface{} `json:"extra,omitempty"` Source string `json:"source,omitempty"` Title string `json:"title,omitempty"` }
func (*Metadata) DumpsLicense ¶
func (*Metadata) DumpsRmSignSort ¶
type MetadataQueryResp ¶
type MetadataQueryResp struct { BaseResp Data Metadata `json:"data,omitempty"` Tx Transaction `json:"tx,omitempty"` }
type MetadataSaveResp ¶
type MetadataType ¶
type MetadataType string
const ( ARTICLE MetadataType = "article" IMAGE MetadataType = "image" AUDIO MetadataType = "audio" VIDEO MetadataType = "video" PRIVATE MetadataType = "private" CUSTOM MetadataType = "custom" FILE MetadataType = "file" )
func (MetadataType) Value ¶
func (c MetadataType) Value() string
type RegisterAccountReq ¶ added in v1.0.3
type RegisterAccountResp ¶ added in v1.0.3
type RegisterAccountResp struct {
BaseResp
}
type Transaction ¶
type Transaction struct { BlockHash string `json:"block_hash,omitempty"` BlockHeight int64 `json:"block_height,omitempty"` DataHeight int64 `json:"data_height,omitempty"` Sender string `json:"sender,omitempty"` Time int64 `json:"time,omitempty"` }
func (*Transaction) Dumps ¶
func (t *Transaction) Dumps() []byte
Click to show internal directories.
Click to hide internal directories.