contract

package
v0.0.0-...-3dfee76 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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 DatasetMetadataInterface

type DatasetMetadataInterface interface {
	ToBytes() ([]byte, error)
	FromBytes(bs []byte) error
	Validate() error
}

type DatasetMetadataLedger

type DatasetMetadataLedger struct {
	contractapi.Contract
}

func (*DatasetMetadataLedger) Query

func (*DatasetMetadataLedger) QueryByRange

func (l *DatasetMetadataLedger) QueryByRange(ctx contractapi.TransactionContextInterface, collection string, start string, end string, max int) ([]*DatasetMetadataPublic, error)

func (*DatasetMetadataLedger) QueryPrivate

func (*DatasetMetadataLedger) Register

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

Jump to

Keyboard shortcuts

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