Documentation
¶
Index ¶
- type DatasetMetadata
- type DatasetMetadataInterface
- type DatasetMetadataLedger
- func (l *DatasetMetadataLedger) Query(ctx contractapi.TransactionContextInterface, collection string, key string) (*DatasetMetadataPublic, error)
- func (l *DatasetMetadataLedger) QueryByRange(ctx contractapi.TransactionContextInterface, collection string, start string, ...) ([]*DatasetMetadataPublic, error)
- func (l *DatasetMetadataLedger) QueryPrivate(ctx contractapi.TransactionContextInterface, key string) (*DatasetMetadata, error)
- func (l *DatasetMetadataLedger) Register(ctx contractapi.TransactionContextInterface) error
- type DatasetMetadataPublic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatasetMetadata ¶
type DatasetMetadata struct {
ID string `json:"id"`
// Resource
Name string `json:"name"`
Note string `json:"note"`
// Metadata
Title string `json:"title"`
Description string `json:"description"`
ContainsSubnationalData bool `json:"containsSubnationalData"`
Source string `json:"source"`
Organisation string `json:"organisation"`
Maintainer string `json:"maintainer"`
Date string `json:"date"`
Location string `json:"location"`
FieldNames []string `json:"fieldNames"`
FileTypes []string `json:"fileTypes"`
NumberOfRows int `json:"numberOfRows"`
License string `json:"license"`
DefineLicense string `json:"defineLicense"`
Methodology string `json:"methodology"`
DefineMethodology string `json:"defineMethodology"`
UpdateFrequency string `json:"updateFrequency"`
Comments string `json:"comments"`
Tags []string `json:"tags"`
// External access endpoint
Endpoint string `json:"endpoint"`
}
func (*DatasetMetadata) FromBytes ¶
func (md *DatasetMetadata) FromBytes(bs []byte) error
func (*DatasetMetadata) ToBytes ¶
func (md *DatasetMetadata) ToBytes() ([]byte, error)
func (*DatasetMetadata) Validate ¶
func (md *DatasetMetadata) Validate() error
type DatasetMetadataLedger ¶
type DatasetMetadataLedger struct {
contractapi.Contract
}
func (*DatasetMetadataLedger) Query ¶
func (l *DatasetMetadataLedger) Query(ctx contractapi.TransactionContextInterface, collection string, key string) (*DatasetMetadataPublic, error)
func (*DatasetMetadataLedger) QueryByRange ¶
func (l *DatasetMetadataLedger) QueryByRange(ctx contractapi.TransactionContextInterface, collection string, start string, end string, max int) ([]*DatasetMetadataPublic, error)
func (*DatasetMetadataLedger) QueryPrivate ¶
func (l *DatasetMetadataLedger) QueryPrivate(ctx contractapi.TransactionContextInterface, key string) (*DatasetMetadata, error)
func (*DatasetMetadataLedger) Register ¶
func (l *DatasetMetadataLedger) Register(ctx contractapi.TransactionContextInterface) error
type DatasetMetadataPublic ¶
type DatasetMetadataPublic struct {
ID string `json:"id"`
// Resource
Name string `json:"name"`
Note string `json:"note"`
// Metadata
Title string `json:"title"`
Description string `json:"description"`
ContainsSubnationalData bool `json:"containsSubnationalData"`
Source string `json:"source"`
Organisation string `json:"organisation"`
Maintainer string `json:"maintainer"`
Date string `json:"date"`
Location string `json:"location"`
NumberOfRows int `json:"numberOfRows"`
License string `json:"license"`
DefineLicense string `json:"defineLicense"`
Methodology string `json:"methodology"`
DefineMethodology string `json:"defineMethodology"`
UpdateFrequency string `json:"updateFrequency"`
Comments string `json:"comments"`
}
func (*DatasetMetadataPublic) FromBytes ¶
func (md *DatasetMetadataPublic) FromBytes(bs []byte) error
func (*DatasetMetadataPublic) ToBytes ¶
func (md *DatasetMetadataPublic) ToBytes() ([]byte, error)
func (*DatasetMetadataPublic) Validate ¶
func (md *DatasetMetadataPublic) Validate() error
Click to show internal directories.
Click to hide internal directories.