Documentation ¶
Overview ¶
Package containing utilities for BC in Go
Index ¶
- Constants
- func AddPeer(directory, peer string) error
- func Alias() (string, error)
- func BCHost() string
- func BCWebsite() string
- func BinarySizeToString(size uint64) string
- func BooleanFlag(name string) bool
- func CacheDirectory(directory string) (string, error)
- func CertificateDirectory(directory string) (string, error)
- func CreateRecords(creator Account, access []Identity, references []*Reference, reader io.Reader, ...) (int, error)
- func DecimalSizeToString(size uint64) string
- func IsBeta() bool
- func IsLive() bool
- func Iterate(channel string, hash []byte, block *Block, cache Cache, network Network, ...) error
- func IterateChronologically(channel string, hash []byte, block *Block, cache Cache, network Network, ...) error
- func KeyDirectory(directory string) (string, error)
- func LastMinedTimestamp(node Node, channel Channel) (uint64, error)
- func LoadConfig() error
- func MineProto(node Node, channel Channel, threshold uint64, listener MiningListener, ...) error
- func MoneyToString(currency string, amount int64) string
- func Ones(data []byte) uint64
- func Peers(directory string) ([]string, error)
- func PrintBlock(output io.Writer, prefix string, hash []byte, block *Block)
- func PrintBlockEntry(output io.Writer, prefix string, entry *BlockEntry)
- func PrintRecord(output io.Writer, prefix string, hash []byte, record *Record)
- func PrintReference(output io.Writer, prefix string, reference *Reference)
- func Read(channel string, hash []byte, block *Block, cache Cache, network Network, ...) error
- func ReadConfig(directory string) error
- func ReadDelimitedProtobuf(reader *bufio.Reader, destination proto.Message) error
- func ReadKey(channel string, hash []byte, block *Block, cache Cache, network Network, ...) error
- func RootDirectory() (string, error)
- func RootDirectoryForUser(u *user.User) string
- func SetupLogging(directory string) (*os.File, error)
- func SplitRemoveEmpty(s, sep string) []string
- func Timestamp() uint64
- func TimestampToString(timestamp uint64) string
- func ValidateName(name string) error
- func WriteDelimitedProtobuf(writer *bufio.Writer, source proto.Message) error
- type Account
- type Block
- func LoadBlock(channel string, cache Cache, network Network, hash []byte) (*Block, error)
- func LoadBlockContainingRecord(channel string, cache Cache, network Network, hash []byte) (*Block, error)
- func Mine(node Node, channel Channel, threshold uint64, listener MiningListener) ([]byte, *Block, error)
- func MineBlock(node Node, channel Channel, threshold uint64, listener MiningListener, ...) ([]byte, *Block, error)
- func MineEntries(node Node, channel Channel, threshold uint64, listener MiningListener, ...) ([]byte, *Block, error)
- func (*Block) Descriptor() ([]byte, []int)
- func (m *Block) GetChannelName() string
- func (m *Block) GetEntry() []*BlockEntry
- func (m *Block) GetLength() uint64
- func (m *Block) GetMiner() string
- func (m *Block) GetNonce() uint64
- func (m *Block) GetPrevious() []byte
- func (m *Block) GetTimestamp() uint64
- func (*Block) ProtoMessage()
- func (m *Block) Reset()
- func (m *Block) String() string
- func (m *Block) XXX_DiscardUnknown()
- func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Block) XXX_Merge(src proto.Message)
- func (m *Block) XXX_Size() int
- func (m *Block) XXX_Unmarshal(b []byte) error
- type BlockEntry
- func (*BlockEntry) Descriptor() ([]byte, []int)
- func (m *BlockEntry) GetRecord() *Record
- func (m *BlockEntry) GetRecordHash() []byte
- func (*BlockEntry) ProtoMessage()
- func (m *BlockEntry) Reset()
- func (m *BlockEntry) String() string
- func (m *BlockEntry) XXX_DiscardUnknown()
- func (m *BlockEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockEntry) XXX_Merge(src proto.Message)
- func (m *BlockEntry) XXX_Size() int
- func (m *BlockEntry) XXX_Unmarshal(b []byte) error
- type Cache
- type Channel
- type ErrBlockHashIncorrect
- type ErrBlockTooLarge
- type ErrChainInvalid
- type ErrChainTooShort
- type ErrChannelNameIncorrect
- type ErrChannelNameInvalid
- type ErrChannelOutOfDate
- type ErrNoEntriesToMine
- type ErrNoSuchBlock
- type ErrNoSuchChannel
- type ErrNoSuchHead
- type ErrNoSuchMapping
- type ErrNonceWrapAround
- type ErrPayloadTooLarge
- type ErrStopIteration
- type Identity
- type LoggingMiningListener
- type MiningListener
- type Network
- type Node
- type PrintingMiningListener
- type Record
- func (*Record) Descriptor() ([]byte, []int)
- func (m *Record) GetAccess() []*Record_Access
- func (m *Record) GetCompressionAlgorithm() cryptogo.CompressionAlgorithm
- func (m *Record) GetCreator() string
- func (m *Record) GetEncryptionAlgorithm() cryptogo.EncryptionAlgorithm
- func (m *Record) GetMeta() map[string]string
- func (m *Record) GetPayload() []byte
- func (m *Record) GetReference() []*Reference
- func (m *Record) GetSignature() []byte
- func (m *Record) GetSignatureAlgorithm() cryptogo.SignatureAlgorithm
- func (m *Record) GetTimestamp() uint64
- func (*Record) ProtoMessage()
- func (m *Record) Reset()
- func (m *Record) String() string
- func (m *Record) XXX_DiscardUnknown()
- func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Record) XXX_Merge(src proto.Message)
- func (m *Record) XXX_Size() int
- func (m *Record) XXX_Unmarshal(b []byte) error
- type Record_Access
- func (*Record_Access) Descriptor() ([]byte, []int)
- func (m *Record_Access) GetAlias() string
- func (m *Record_Access) GetEncryptionAlgorithm() cryptogo.EncryptionAlgorithm
- func (m *Record_Access) GetSecretKey() []byte
- func (*Record_Access) ProtoMessage()
- func (m *Record_Access) Reset()
- func (m *Record_Access) String() string
- func (m *Record_Access) XXX_DiscardUnknown()
- func (m *Record_Access) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Record_Access) XXX_Merge(src proto.Message)
- func (m *Record_Access) XXX_Size() int
- func (m *Record_Access) XXX_Unmarshal(b []byte) error
- type Reference
- func (*Reference) Descriptor() ([]byte, []int)
- func (m *Reference) GetBlockHash() []byte
- func (m *Reference) GetChannelName() string
- func (m *Reference) GetIndex() uint64
- func (m *Reference) GetRecordHash() []byte
- func (m *Reference) GetTimestamp() uint64
- func (*Reference) ProtoMessage()
- func (m *Reference) Reset()
- func (m *Reference) String() string
- func (m *Reference) XXX_DiscardUnknown()
- func (m *Reference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Reference) XXX_Merge(src proto.Message)
- func (m *Reference) XXX_Size() int
- func (m *Reference) XXX_Unmarshal(b []byte) error
- type Validator
Constants ¶
const ( THRESHOLD_Z = 0 THRESHOLD_I = 256 // (32 / 64) * 512 // Hash Space: 2 ^ 256 // Usage: General Purpose THRESHOLD_H = 272 // (34 / 64) * 512 // Hash Space: 2 ^ 240 // Usage: General Purpose THRESHOLD_G = 288 // (36 / 64) * 512 // Hash Space: 2 ^ 224 // Usage: General Purpose, Alias THRESHOLD_F = 304 // (38 / 64) * 512 // Hash Space: 2 ^ 208 // Usage: Hour Validation THRESHOLD_E = 320 // (40 / 64) * 512 // Hash Space: 2 ^ 192 // Usage: Day Validation THRESHOLD_D = 336 // (42 / 64) * 512 // Hash Space: 2 ^ 176 // Usage: Week Validation THRESHOLD_C = 352 // (44 / 64) * 512 // Hash Space: 2 ^ 160 // Usage: Year Validation THRESHOLD_B = 368 // (46 / 64) * 512 // Hash Space: 2 ^ 144 // Usage: Decade Validation THRESHOLD_A = 384 // (48 / 64) * 512 // Hash Space: 2 ^ 128 // Usage: Century Validation MAX_BLOCK_SIZE_BYTES = uint64(2 * 1024 * 1024 * 1024) // 2Gb MAX_PAYLOAD_SIZE_BYTES = uint64(10 * 1024 * 1024) // 10Mb )
const ( BC_HOST = "bc.aletheiaware.com" BC_HOST_TEST = "test-bc.aletheiaware.com" BETA_FLAG = "BETA" LIVE_FLAG = "LIVE" )
Variables ¶
This section is empty.
Functions ¶
func BinarySizeToString ¶
func BooleanFlag ¶ added in v1.2.0
func CacheDirectory ¶ added in v1.2.0
func CertificateDirectory ¶ added in v1.2.0
func CreateRecords ¶
func CreateRecords(creator Account, access []Identity, references []*Reference, reader io.Reader, callback func([]byte, *Record) error) (int, error)
Chunk the data from reader into individual records with their own secret key and access list
func DecimalSizeToString ¶
func IterateChronologically ¶
func KeyDirectory ¶ added in v1.2.0
func LastMinedTimestamp ¶ added in v1.2.0
func LoadConfig ¶
func LoadConfig() error
func MoneyToString ¶
func PrintBlockEntry ¶
func PrintBlockEntry(output io.Writer, prefix string, entry *BlockEntry)
func ReadConfig ¶
func ReadDelimitedProtobuf ¶
func RootDirectory ¶ added in v1.2.0
func RootDirectoryForUser ¶ added in v1.2.0
func SplitRemoveEmpty ¶
func TimestampToString ¶
func ValidateName ¶ added in v1.2.0
ValidateName ensures all characters are in the set [a-zA-Z0-9.-_]
Types ¶
type Account ¶ added in v1.2.0
type Account interface { Identity // Decrypt takes an Encryption Algorithm, Encrypted Payload, and Symmetric Key. // The Key is used to decrypt the Payload. // Decrypt returns the Decrypted Payload, or an error. Decrypt(cryptogo.EncryptionAlgorithm, []byte, []byte) ([]byte, error) // DecryptKey takes an Encrytion Algorithm and Encrypted Key. // The Key is decrypted with this Account's Private Key. // DecryptKey returns the Decrypted Key, or an error DecryptKey(cryptogo.EncryptionAlgorithm, []byte) ([]byte, error) // Sign takes a Payload. // Sign returns the Signature, Algorithm, or an error. Sign([]byte) (cryptogo.SignatureAlgorithm, []byte, error) }
type Block ¶
type Block struct { // Timestamp (nanoseconds) when the block was created. Timestamp uint64 `protobuf:"fixed64,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Name of the channel. ChannelName string `protobuf:"bytes,2,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty"` // Length of chain in blocks (inclusive). Length uint64 `protobuf:"fixed64,3,opt,name=length,proto3" json:"length,omitempty"` // Hash of the previous block in the chain. Previous []byte `protobuf:"bytes,4,opt,name=previous,proto3" json:"previous,omitempty"` // Alias of the block miner's public key. Miner string `protobuf:"bytes,5,opt,name=miner,proto3" json:"miner,omitempty"` // The nonce mined to reach threshold. Nonce uint64 `protobuf:"fixed64,6,opt,name=nonce,proto3" json:"nonce,omitempty"` // The block's entries (list of hash/record pairs). Entry []*BlockEntry `protobuf:"bytes,7,rep,name=entry,proto3" json:"entry,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func LoadBlockContainingRecord ¶ added in v1.2.0
func MineEntries ¶ added in v1.2.0
func MineEntries(node Node, channel Channel, threshold uint64, listener MiningListener, entries []*BlockEntry) ([]byte, *Block, error)
func (*Block) Descriptor ¶
func (*Block) GetChannelName ¶
func (*Block) GetEntry ¶
func (m *Block) GetEntry() []*BlockEntry
func (*Block) GetPrevious ¶
func (*Block) GetTimestamp ¶
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) XXX_DiscardUnknown ¶
func (m *Block) XXX_DiscardUnknown()
func (*Block) XXX_Marshal ¶
func (*Block) XXX_Unmarshal ¶
type BlockEntry ¶
type BlockEntry struct { // Hash of the record. RecordHash []byte `protobuf:"bytes,1,opt,name=record_hash,json=recordHash,proto3" json:"record_hash,omitempty"` Record *Record `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BlockEntry) Descriptor ¶
func (*BlockEntry) Descriptor() ([]byte, []int)
func (*BlockEntry) GetRecord ¶
func (m *BlockEntry) GetRecord() *Record
func (*BlockEntry) GetRecordHash ¶
func (m *BlockEntry) GetRecordHash() []byte
func (*BlockEntry) ProtoMessage ¶
func (*BlockEntry) ProtoMessage()
func (*BlockEntry) Reset ¶
func (m *BlockEntry) Reset()
func (*BlockEntry) String ¶
func (m *BlockEntry) String() string
func (*BlockEntry) XXX_DiscardUnknown ¶
func (m *BlockEntry) XXX_DiscardUnknown()
func (*BlockEntry) XXX_Marshal ¶
func (m *BlockEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockEntry) XXX_Merge ¶
func (m *BlockEntry) XXX_Merge(src proto.Message)
func (*BlockEntry) XXX_Size ¶
func (m *BlockEntry) XXX_Size() int
func (*BlockEntry) XXX_Unmarshal ¶
func (m *BlockEntry) XXX_Unmarshal(b []byte) error
type Cache ¶
type Cache interface { Head(channel string) (*Reference, error) Block(hash []byte) (*Block, error) BlockEntries(channel string, timestamp uint64) ([]*BlockEntry, error) BlockContainingRecord(channel string, hash []byte) (*Block, error) PutHead(channel string, reference *Reference) error PutBlock(hash []byte, block *Block) error PutBlockEntry(channel string, entry *BlockEntry) error }
type Channel ¶
type Channel interface { fmt.Stringer Name() string Head() []byte Timestamp() uint64 AddTrigger(func()) AddValidator(Validator) Update(Cache, Network, []byte, *Block) error Set(uint64, []byte) Load(Cache, Network) error Refresh(Cache, Network) error Pull(Cache, Network) error Push(Cache, Network) error }
type ErrBlockHashIncorrect ¶ added in v1.2.1
type ErrBlockHashIncorrect struct { }
ErrBlockHashIncorrect is returned when the given hash does not match the hash of the given block.
func (ErrBlockHashIncorrect) Error ¶ added in v1.2.1
func (e ErrBlockHashIncorrect) Error() string
type ErrBlockTooLarge ¶ added in v1.2.1
type ErrBlockTooLarge struct {
Size, Max uint64
}
ErrBlockTooLarge is returned when the Block exceeds the size limit.
func (ErrBlockTooLarge) Error ¶ added in v1.2.1
func (e ErrBlockTooLarge) Error() string
type ErrChainInvalid ¶ added in v1.2.1
type ErrChainInvalid struct {
Reason string
}
ErrChainInvalid is returned when a block fails validation for some reason.
func (ErrChainInvalid) Error ¶ added in v1.2.1
func (e ErrChainInvalid) Error() string
type ErrChainTooShort ¶ added in v1.2.1
type ErrChainTooShort struct {
LengthA, LengthB uint64
}
ErrChainTooShort is returned when a new chain is shorter the channel's current head.
func (ErrChainTooShort) Error ¶ added in v1.2.1
func (e ErrChainTooShort) Error() string
type ErrChannelNameIncorrect ¶ added in v1.2.1
type ErrChannelNameIncorrect struct {
Expected, Actual string
}
ErrChannelNameIncorrect is returned when a block channel name doesn't match the channel.
func (ErrChannelNameIncorrect) Error ¶ added in v1.2.1
func (e ErrChannelNameIncorrect) Error() string
type ErrChannelNameInvalid ¶ added in v1.2.1
type ErrChannelNameInvalid struct {
Reason string
}
ErrChannelNameInvalid is returned when a channel name is too long or includes unsupported characters.
func (ErrChannelNameInvalid) Error ¶ added in v1.2.1
func (e ErrChannelNameInvalid) Error() string
type ErrChannelOutOfDate ¶ added in v1.2.1
type ErrChannelOutOfDate struct {
Channel string
}
ErrChannelOutOfDate is returned when a broadcast fails due to the network having a more up-to-date version of the channel.
func (ErrChannelOutOfDate) Error ¶ added in v1.2.1
func (e ErrChannelOutOfDate) Error() string
type ErrNoEntriesToMine ¶ added in v1.2.1
type ErrNoEntriesToMine struct {
Channel string
}
ErrNoEntriesToMine is returned when a mining operation fails due to a lack of entries.
func (ErrNoEntriesToMine) Error ¶ added in v1.2.1
func (e ErrNoEntriesToMine) Error() string
type ErrNoSuchBlock ¶ added in v1.2.1
type ErrNoSuchBlock struct {
Hash string
}
ErrNoSuchBlock is returned when a block with the given hash cannot be found.
func (ErrNoSuchBlock) Error ¶ added in v1.2.1
func (e ErrNoSuchBlock) Error() string
type ErrNoSuchChannel ¶ added in v1.2.1
type ErrNoSuchChannel struct {
Channel string
}
ErrNoSuchChannel is returned when a channel with the given name cannot be found.
func (ErrNoSuchChannel) Error ¶ added in v1.2.1
func (e ErrNoSuchChannel) Error() string
type ErrNoSuchHead ¶ added in v1.2.1
type ErrNoSuchHead struct {
Channel string
}
ErrNoSuchHead is returned when a head with the given name cannot be found.
func (ErrNoSuchHead) Error ¶ added in v1.2.1
func (e ErrNoSuchHead) Error() string
type ErrNoSuchMapping ¶ added in v1.2.1
type ErrNoSuchMapping struct {
Hash string
}
ErrNoSuchMapping is returned when a mapping with the given hash cannot be found.
func (ErrNoSuchMapping) Error ¶ added in v1.2.1
func (e ErrNoSuchMapping) Error() string
type ErrNonceWrapAround ¶ added in v1.2.1
type ErrNonceWrapAround struct { }
ErrNonceWrapAround is returned when a mining operation fails after attempting every possible nonce.
func (ErrNonceWrapAround) Error ¶ added in v1.2.1
func (e ErrNonceWrapAround) Error() string
type ErrPayloadTooLarge ¶ added in v1.2.1
type ErrPayloadTooLarge struct {
Size, Max uint64
}
ErrPayloadTooLarge is returned when the Payload exceeds the size limit.
func (ErrPayloadTooLarge) Error ¶ added in v1.2.1
func (e ErrPayloadTooLarge) Error() string
type ErrStopIteration ¶ added in v1.2.1
type ErrStopIteration struct { }
ErrStopIteration is used by callbacks to indicate that their iteration through a channel should stop, typically because the result has been found.
func (ErrStopIteration) Error ¶ added in v1.2.1
func (e ErrStopIteration) Error() string
type Identity ¶ added in v1.2.0
type Identity interface { Alias() string PublicKey() (cryptogo.PublicKeyFormat, []byte, error) // Encrypt takes a Plaintext Payload // A new AES 256bit Symmetric Key is generated, used to encrypt the Payload. // Encrypt returns the Encryption Algorithm, Encrypted Payload, Key used, or an error. Encrypt([]byte) (cryptogo.EncryptionAlgorithm, []byte, []byte, error) // Encrypt takes a Plaintext key // The given key is encrypted with this Identity's Public Key // EncryptKey returns the Encryption Algorithm and Encrypted Key, or an error. EncryptKey([]byte) (cryptogo.EncryptionAlgorithm, []byte, error) // Verify takes a Signature Algorithm, Payload, and Signature. // Verify returns an error if the signature cannot be verified. Verify(cryptogo.SignatureAlgorithm, []byte, []byte) error }
type LoggingMiningListener ¶ added in v1.1.5
type LoggingMiningListener struct { }
func (*LoggingMiningListener) OnMiningStarted ¶ added in v1.1.5
func (l *LoggingMiningListener) OnMiningStarted(channel Channel, size uint64)
func (*LoggingMiningListener) OnMiningThresholdReached ¶ added in v1.1.5
func (l *LoggingMiningListener) OnMiningThresholdReached(channel Channel, hash []byte, block *Block)
func (*LoggingMiningListener) OnNewMaxOnes ¶ added in v1.1.5
func (l *LoggingMiningListener) OnNewMaxOnes(channel Channel, nonce, ones uint64)
type MiningListener ¶
type Network ¶
type Network interface { // Requests the head hash of the given channel Head(channel string) (*Reference, error) // Requests the block from the given reference Block(reference *Reference) (*Block, error) // Broadcasts the channel update to the network Broadcast(channel Channel, cache Cache, hash []byte, block *Block) error }
type PrintingMiningListener ¶
func (*PrintingMiningListener) OnMiningStarted ¶
func (p *PrintingMiningListener) OnMiningStarted(channel Channel, size uint64)
func (*PrintingMiningListener) OnMiningThresholdReached ¶
func (p *PrintingMiningListener) OnMiningThresholdReached(channel Channel, hash []byte, block *Block)
func (*PrintingMiningListener) OnNewMaxOnes ¶
func (p *PrintingMiningListener) OnNewMaxOnes(channel Channel, nonce, ones uint64)
type Record ¶
type Record struct { // Timestamp (nanoseconds) when the record was created. Timestamp uint64 `protobuf:"fixed64,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Alias of the record creator's public key. Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` // The list of accesses granted. Access []*Record_Access `protobuf:"bytes,3,rep,name=access,proto3" json:"access,omitempty"` // Holds record content, optionally encrypted with a secret key. Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` // The algorithm used to compress the payload. CompressionAlgorithm cryptogo.CompressionAlgorithm `` /* 155-byte string literal not displayed */ // The algorithm used to encrypt the payload. EncryptionAlgorithm cryptogo.EncryptionAlgorithm `` /* 151-byte string literal not displayed */ // Signature of payload (signed by the record creator's private key). Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"` // The algorithm used to sign the payload. SignatureAlgorithm cryptogo.SignatureAlgorithm `` /* 147-byte string literal not displayed */ // References to previous records. Reference []*Reference `protobuf:"bytes,9,rep,name=reference,proto3" json:"reference,omitempty"` // Holds payload meta data. Meta map[string]string `` /* 150-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func CreateRecord ¶
func (*Record) Descriptor ¶
func (*Record) GetAccess ¶
func (m *Record) GetAccess() []*Record_Access
func (*Record) GetCompressionAlgorithm ¶
func (m *Record) GetCompressionAlgorithm() cryptogo.CompressionAlgorithm
func (*Record) GetCreator ¶
func (*Record) GetEncryptionAlgorithm ¶
func (m *Record) GetEncryptionAlgorithm() cryptogo.EncryptionAlgorithm
func (*Record) GetPayload ¶
func (*Record) GetReference ¶
func (*Record) GetSignature ¶
func (*Record) GetSignatureAlgorithm ¶
func (m *Record) GetSignatureAlgorithm() cryptogo.SignatureAlgorithm
func (*Record) GetTimestamp ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) XXX_DiscardUnknown ¶
func (m *Record) XXX_DiscardUnknown()
func (*Record) XXX_Marshal ¶
func (*Record) XXX_Unmarshal ¶
type Record_Access ¶
type Record_Access struct { // Alias of the public key granted access, empty if public. Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` // The secret access key used to encrypt the payload. SecretKey []byte `protobuf:"bytes,2,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"` // If the alias is set, the secret key will be encrypted by the alias' public key. // The algorithm used to encrypt the secret key. EncryptionAlgorithm cryptogo.EncryptionAlgorithm `` /* 151-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Record_Access) Descriptor ¶
func (*Record_Access) Descriptor() ([]byte, []int)
func (*Record_Access) GetAlias ¶
func (m *Record_Access) GetAlias() string
func (*Record_Access) GetEncryptionAlgorithm ¶
func (m *Record_Access) GetEncryptionAlgorithm() cryptogo.EncryptionAlgorithm
func (*Record_Access) GetSecretKey ¶
func (m *Record_Access) GetSecretKey() []byte
func (*Record_Access) ProtoMessage ¶
func (*Record_Access) ProtoMessage()
func (*Record_Access) Reset ¶
func (m *Record_Access) Reset()
func (*Record_Access) String ¶
func (m *Record_Access) String() string
func (*Record_Access) XXX_DiscardUnknown ¶
func (m *Record_Access) XXX_DiscardUnknown()
func (*Record_Access) XXX_Marshal ¶
func (m *Record_Access) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Record_Access) XXX_Merge ¶
func (m *Record_Access) XXX_Merge(src proto.Message)
func (*Record_Access) XXX_Size ¶
func (m *Record_Access) XXX_Size() int
func (*Record_Access) XXX_Unmarshal ¶
func (m *Record_Access) XXX_Unmarshal(b []byte) error
type Reference ¶
type Reference struct { // Timestamp (nanoseconds) when the referenced item was created. Timestamp uint64 `protobuf:"fixed64,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Name of the channel holding the referenced item. ChannelName string `protobuf:"bytes,2,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty"` // Hash of the block holding the referenced item. BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Hash of the record holding the referenced item. RecordHash []byte `protobuf:"bytes,4,opt,name=record_hash,json=recordHash,proto3" json:"record_hash,omitempty"` // Index of block in chain holding the referenced item. Index uint64 `protobuf:"fixed64,5,opt,name=index,proto3" json:"index,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func WriteRecord ¶
func (*Reference) Descriptor ¶
func (*Reference) GetBlockHash ¶
func (*Reference) GetChannelName ¶
func (*Reference) GetRecordHash ¶
func (*Reference) GetTimestamp ¶
func (*Reference) ProtoMessage ¶
func (*Reference) ProtoMessage()
func (*Reference) XXX_DiscardUnknown ¶
func (m *Reference) XXX_DiscardUnknown()