ticker

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package ticker is a generated protocol buffer package.

It is generated from these files:

x/nft/ticker/codec.proto

It has these top-level messages:

TickerToken
TokenDetails
IssueTokenMsg

Index

Constants

View Source
const (
	BucketName = "tkrnft"
)

Variables

View Source
var (
	ErrInvalidLengthCodec = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCodec   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	//todo: revisit pattern
	IsValidID = regexp.MustCompile(`^[A-Z0-9]{3,4}$`).MatchString
)

Functions

func NewTickerToken

func NewTickerToken(key []byte, owner weave.Address, approvals []nft.ActionApprovals) *orm.SimpleObj

func RegisterQuery

func RegisterQuery(qr weave.QueryRouter)

RegisterQuery will register this bucket as "/nft/ticker"

func RegisterRoutes

func RegisterRoutes(r weave.Registry, auth x.Authenticator, issuer weave.Address, blockchainBucket orm.Reader)

RegisterRoutes will instantiate and register all handlers in this package

Types

type Bucket

type Bucket struct {
	orm.Bucket
}

func NewBucket

func NewBucket() Bucket

func (Bucket) Create

func (b Bucket) Create(db weave.KVStore, owner weave.Address, id []byte, approvals []nft.ActionApprovals, blockchainID []byte) (orm.Object, error)

type Initializer added in v0.10.0

type Initializer struct {
}

Initializer fulfils the InitStater interface to load data from the genesis file

func (*Initializer) FromGenesis added in v0.10.0

func (i *Initializer) FromGenesis(opts weave.Options, db weave.KVStore) error

FromGenesis will parse initial tokens information from the genesis and persist it in the database.

type IssueHandler

type IssueHandler struct {
	// contains filtered or unexported fields
}

func NewIssueHandler

func NewIssueHandler(auth x.Authenticator, issuer weave.Address, bucket Bucket, blockchains orm.Reader) *IssueHandler

func (IssueHandler) Check

func (h IssueHandler) Check(ctx weave.Context, store weave.KVStore, tx weave.Tx) (weave.CheckResult, error)

func (IssueHandler) Deliver

func (h IssueHandler) Deliver(ctx weave.Context, store weave.KVStore, tx weave.Tx) (weave.DeliverResult, error)

type IssueTokenMsg

type IssueTokenMsg struct {
	Owner     []byte                `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	ID        []byte                `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Details   TokenDetails          `protobuf:"bytes,3,opt,name=details" json:"details"`
	Approvals []nft.ActionApprovals `protobuf:"bytes,4,rep,name=approvals" json:"approvals"`
}

func (*IssueTokenMsg) Descriptor

func (*IssueTokenMsg) Descriptor() ([]byte, []int)

func (*IssueTokenMsg) GetApprovals

func (m *IssueTokenMsg) GetApprovals() []nft.ActionApprovals

func (*IssueTokenMsg) GetDetails

func (m *IssueTokenMsg) GetDetails() TokenDetails

func (*IssueTokenMsg) GetID added in v0.10.0

func (m *IssueTokenMsg) GetID() []byte

func (*IssueTokenMsg) GetOwner

func (m *IssueTokenMsg) GetOwner() []byte

func (*IssueTokenMsg) Marshal

func (m *IssueTokenMsg) Marshal() (dAtA []byte, err error)

func (*IssueTokenMsg) MarshalTo

func (m *IssueTokenMsg) MarshalTo(dAtA []byte) (int, error)

func (*IssueTokenMsg) Path

func (*IssueTokenMsg) Path() string

Path returns the routing path for this message

func (*IssueTokenMsg) ProtoMessage

func (*IssueTokenMsg) ProtoMessage()

func (*IssueTokenMsg) Reset

func (m *IssueTokenMsg) Reset()

func (*IssueTokenMsg) Size

func (m *IssueTokenMsg) Size() (n int)

func (*IssueTokenMsg) String

func (m *IssueTokenMsg) String() string

func (*IssueTokenMsg) Unmarshal

func (m *IssueTokenMsg) Unmarshal(dAtA []byte) error

func (*IssueTokenMsg) Validate

func (i *IssueTokenMsg) Validate() error

type TickerToken

type TickerToken struct {
	Base    *nft.NonFungibleToken `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
	Details *TokenDetails         `protobuf:"bytes,2,opt,name=details" json:"details,omitempty"`
}

func (*TickerToken) Approvals

func (m *TickerToken) Approvals() *nft.ApprovalOps

func (*TickerToken) Copy

func (m *TickerToken) Copy() orm.CloneableData

func (*TickerToken) Descriptor

func (*TickerToken) Descriptor() ([]byte, []int)

func (*TickerToken) GetBase

func (m *TickerToken) GetBase() *nft.NonFungibleToken

func (*TickerToken) GetBlockchainID

func (m *TickerToken) GetBlockchainID() []byte

func (*TickerToken) GetDetails

func (m *TickerToken) GetDetails() *TokenDetails

func (*TickerToken) Marshal

func (m *TickerToken) Marshal() (dAtA []byte, err error)

func (*TickerToken) MarshalTo

func (m *TickerToken) MarshalTo(dAtA []byte) (int, error)

func (*TickerToken) OwnerAddress

func (m *TickerToken) OwnerAddress() weave.Address

func (*TickerToken) ProtoMessage

func (*TickerToken) ProtoMessage()

func (*TickerToken) Reset

func (m *TickerToken) Reset()

func (*TickerToken) SetApprovals added in v0.9.1

func (m *TickerToken) SetApprovals(a nft.Approvals)

func (*TickerToken) SetBlockchainID

func (m *TickerToken) SetBlockchainID(actor weave.Address, id []byte) error

func (*TickerToken) Size

func (m *TickerToken) Size() (n int)

func (*TickerToken) String

func (m *TickerToken) String() string

func (*TickerToken) Transfer

func (m *TickerToken) Transfer(newOwner weave.Address) error

func (*TickerToken) Unmarshal

func (m *TickerToken) Unmarshal(dAtA []byte) error

func (*TickerToken) Validate

func (m *TickerToken) Validate() error

type Token

type Token interface {
	nft.BaseNFT
	GetBlockchainID() []byte
	SetBlockchainID(actor weave.Address, id []byte) error
}

func AsTicker

func AsTicker(obj orm.Object) (Token, error)

AsUsername will safely type-cast any value from Bucket

type TokenDetails

type TokenDetails struct {
	BlockchainID []byte `protobuf:"bytes,1,opt,name=blockchain_id,json=blockchainId,proto3" json:"blockchain_id,omitempty"`
}

func (*TokenDetails) Clone

func (m *TokenDetails) Clone() *TokenDetails

func (*TokenDetails) Descriptor

func (*TokenDetails) Descriptor() ([]byte, []int)

func (*TokenDetails) GetBlockchainID

func (m *TokenDetails) GetBlockchainID() []byte

func (*TokenDetails) Marshal

func (m *TokenDetails) Marshal() (dAtA []byte, err error)

func (*TokenDetails) MarshalTo

func (m *TokenDetails) MarshalTo(dAtA []byte) (int, error)

func (*TokenDetails) ProtoMessage

func (*TokenDetails) ProtoMessage()

func (*TokenDetails) Reset

func (m *TokenDetails) Reset()

func (*TokenDetails) Size

func (m *TokenDetails) Size() (n int)

func (*TokenDetails) String

func (m *TokenDetails) String() string

func (*TokenDetails) Unmarshal

func (m *TokenDetails) Unmarshal(dAtA []byte) error

func (*TokenDetails) Validate

func (m *TokenDetails) Validate() error

Jump to

Keyboard shortcuts

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