bootstrap_node

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: 14 Imported by: 0

Documentation

Overview

Package bootstrap_node is a generated protocol buffer package.

It is generated from these files:

x/nft/bootstrap_node/codec.proto

It has these top-level messages:

BootstrapNodeToken
TokenDetails
URI
IssueTokenMsg

Index

Constants

View Source
const (
	BucketName = "bsnnft"
)

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-Za-z0-9]{3,20}$`).MatchString
)

Functions

func NewBootstrapNodeToken

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

func RegisterQuery

func RegisterQuery(qr weave.QueryRouter)

RegisterQuery will register this bucket as "nft/bootstrap_nodes"

func RegisterRoutes

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

RegisterRoutes will instantiate and register all handlers in this package

Types

type BootstrapNodeToken

type BootstrapNodeToken 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 (*BootstrapNodeToken) Approvals

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

func (*BootstrapNodeToken) Copy

func (*BootstrapNodeToken) Descriptor

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

func (*BootstrapNodeToken) GetBase

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

func (*BootstrapNodeToken) GetBlockchainID

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

func (*BootstrapNodeToken) GetDetails

func (m *BootstrapNodeToken) GetDetails() *TokenDetails

func (*BootstrapNodeToken) GetUri

func (m *BootstrapNodeToken) GetUri() URI

func (*BootstrapNodeToken) Marshal

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

func (*BootstrapNodeToken) MarshalTo

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

func (*BootstrapNodeToken) OwnerAddress

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

func (*BootstrapNodeToken) ProtoMessage

func (*BootstrapNodeToken) ProtoMessage()

func (*BootstrapNodeToken) Reset

func (m *BootstrapNodeToken) Reset()

func (*BootstrapNodeToken) SetApprovals added in v0.9.1

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

func (*BootstrapNodeToken) SetBlockchainID

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

func (*BootstrapNodeToken) SetUri

func (m *BootstrapNodeToken) SetUri(actor weave.Address, uri URI) error

func (*BootstrapNodeToken) Size

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

func (*BootstrapNodeToken) String

func (m *BootstrapNodeToken) String() string

func (*BootstrapNodeToken) Transfer

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

func (*BootstrapNodeToken) Unmarshal

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

func (*BootstrapNodeToken) Validate

func (m *BootstrapNodeToken) Validate() error

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, uri URI) (orm.Object, error)

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 Token

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

func AsNode

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

AsNode 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"`
	Uri          URI    `protobuf:"bytes,2,opt,name=uri" json:"uri"`
}

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) GetUri

func (m *TokenDetails) GetUri() URI

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

type URI

type URI struct {
	Host     string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Port     int32  `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	Protocol string `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"`
	PubKey   string `protobuf:"bytes,4,opt,name=pubKey,proto3" json:"pubKey,omitempty"`
}

func (*URI) Descriptor

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

func (*URI) GetHost

func (m *URI) GetHost() string

func (*URI) GetPort

func (m *URI) GetPort() int32

func (*URI) GetProtocol

func (m *URI) GetProtocol() string

func (*URI) GetPubKey

func (m *URI) GetPubKey() string

func (*URI) Marshal

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

func (*URI) MarshalTo

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

func (*URI) ProtoMessage

func (*URI) ProtoMessage()

func (*URI) Reset

func (m *URI) Reset()

func (*URI) Size

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

func (*URI) String

func (m *URI) String() string

func (*URI) Unmarshal

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

func (URI) Validate

func (m URI) Validate() error

Jump to

Keyboard shortcuts

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