Documentation ¶
Index ¶
- Constants
- func ListSchemas() []string
- func LoadExtensions() error
- func LoadSchema(name string, buf []byte, tpl interface{})
- func RegisterDecoder(h uint64, fn NewDecoderFunc)
- func RegisterSchema(s Schema)
- type Alias
- type Asset
- type Baker
- type BakerStatus
- type Decoder
- type Descriptor
- type Event
- type EventType
- type Location
- type NewDecoderFunc
- type Payout
- type Registry
- type Schema
- type Social
- type TezosDomains
- type TezosProfile
- type Token
- type Tz16
- type Tz16Error
- type Tz16License
- type Tz16Source
- type Tz16View
- type Tz21
- type Tz21Asset
- type Tz21Attribute
- type Tz21DataRate
- type Tz21Dimension
- type Tz21Format
- type Updated
Constants ¶
View Source
const ( EventTypeInvalid = iota EventTypeUpdate EventTypeMerge EventTypeRemove EventTypeResolve )
View Source
const (
NsDomain = "tzdomain"
)
View Source
const (
NsProfile = "tzprofile"
)
Variables ¶
This section is empty.
Functions ¶
func ListSchemas ¶
func ListSchemas() []string
func LoadExtensions ¶
func LoadExtensions() error
func LoadSchema ¶
func RegisterDecoder ¶
func RegisterDecoder(h uint64, fn NewDecoderFunc)
func RegisterSchema ¶
func RegisterSchema(s Schema)
Types ¶
type Alias ¶
type Asset ¶
type Baker ¶
type Baker struct { Status BakerStatus `json:"status,omitempty"` Fee float64 `json:"fee,omitempty"` PayoutDelay bool `json:"payout_delay,omitempty"` MinPayout float64 `json:"min_payout,omitempty"` MinDelegation float64 `json:"min_delegation,omitempty"` NonDelegatable bool `json:"non_delegatable,omitempty"` IsSponsored bool `json:"sponsored,omitempty"` }
type BakerStatus ¶
type BakerStatus string
const ( BakerStatusInvalid BakerStatus = "" BakerStatusPublic BakerStatus = "public" BakerStatusPrivate BakerStatus = "private" BakerStatusClosing BakerStatus = "closing" BakerStatusClosed BakerStatus = "closed" )
func ParseBakerStatus ¶
func ParseBakerStatus(s string) BakerStatus
func (BakerStatus) IsValid ¶
func (s BakerStatus) IsValid() bool
func (*BakerStatus) UnmarshalText ¶
func (s *BakerStatus) UnmarshalText(data []byte) error
type Decoder ¶
type Decoder interface { OnOperation(context.Context, *model.Op) ([]*Event, error) OnTaskComplete(context.Context, *model.Metadata, *task.TaskResult) ([]*Event, error) Namespace() string }
func LookupDecoder ¶
type Descriptor ¶
type EventType ¶
type EventType byte
func ParseEventType ¶
func (EventType) MarshalText ¶
func (*EventType) UnmarshalText ¶
type Location ¶
type NewDecoderFunc ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (Registry) ListSchemas ¶
type Schema ¶
type Schema interface { // Returns the schema's unique namespace which is used as value prefix. Namespace() string // Validates JSON encoded data against built-in schema and returns // an error when validation fails. ValidateBytes([]byte) error // Validates a Go type against built-in schema and returns an error when // validation fails. Validate(interface{}) error // Creates a schema-compatible descriptor as Go type NewDescriptor() Descriptor }
type Social ¶
type TezosDomains ¶
type TezosDomains struct {
Name string `json:"name"`
}
func (TezosDomains) Namespace ¶
func (d TezosDomains) Namespace() string
func (TezosDomains) Validate ¶
func (d TezosDomains) Validate() error
type TezosProfile ¶
type TezosProfile struct { Alias string `json:"alias,omitempty"` Description string `json:"description,omitempty"` Logo string `json:"logo,omitempty"` Website string `json:"website,omitempty"` Twitter string `json:"twitter,omitempty"` Ethereum string `json:"ethereum,omitempty"` DomainName string `json:"domain_name,omitempty"` Discord string `json:"discord,omitempty"` Github string `json:"github,omitempty"` Serial uint64 `json:"serial,omitempty"` }
func (TezosProfile) Namespace ¶
func (d TezosProfile) Namespace() string
func (TezosProfile) Validate ¶
func (d TezosProfile) Validate() error
type Token ¶
type Token struct { Name string `json:"name"` Symbol string `json:"symbol"` Decimals int `json:"decimals"` Logo string `json:"logo,omitempty"` }
fungible and non-fungible assets
type Tz16 ¶
type Tz16 struct { Name string `json:"name"` Description string `json:"description,omitempty"` Version string `json:"version,omitempty"` License *Tz16License `json:"license,omitempty"` Authors []string `json:"authors,omitempty"` Homepage string `json:"homepage,omitempty"` Source *Tz16Source `json:"source,omitempty"` Interfaces []string `json:"interfaces,omitempty"` Errors []Tz16Error `json:"errors,omitempty"` Views []Tz16View `json:"views,omitempty"` }
type Tz16License ¶
type Tz16Source ¶
type Tz21Asset ¶
type Tz21Asset struct { Description string `json:"description"` Minter tezos.Address `json:"minter"` Creators []string `json:"creators"` Contributors []string `json:"contributors"` Publishers []string `json:"publishers"` Date time.Time `json:"date"` BlockLevel int64 `json:"blockLevel"` Type string `json:"type"` Tags []string `json:"tags"` Genres []string `json:"genres"` Language string `json:"language"` Identifier string `json:"identifier"` Rights string `json:"rights"` RightUri string `json:"rightUri"` ArtifactUri string `json:"artifactUri"` DisplayUri string `json:"displayUri"` ThumbnailUri string `json:"thumbnailUri"` ExternalUri string `json:"externalUri"` IsTransferable bool `json:"isTransferable"` IsBooleanAmount bool `json:"isBooleanAmount"` ShouldPreferSymbol bool `json:"shouldPreferSymbol"` Formats []Tz21Format `json:"formats"` Attributes []Tz21Attribute `json:"attributes"` Assets []Tz21Asset `json:"assets"` }
type Tz21Attribute ¶
type Tz21DataRate ¶
type Tz21Dimension ¶
type Tz21Format ¶
type Tz21Format struct { Uri string `json:"uri"` Hash string `json:"hash"` MimeType string `json:"mimeType"` FileSize int64 `json:"fileSize"` FileName string `json:"fileName"` Duration string `json:"duration"` Dimensions Tz21Dimension `json:"dimensions"` DataRate Tz21DataRate `json:"dataRate"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.