data

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright 2019 The Smilo-blackbox Authors This file is part of the Smilo-blackbox library.

The Smilo-blackbox library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Smilo-blackbox library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Smilo-blackbox library. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetFilename

func SetFilename(filename string)

func SetLogger

func SetLogger(loggers *logrus.Entry)

SetLogger set the logger

func Start

func Start()

Types

type Encrypted_Transaction

type Encrypted_Transaction struct {
	Hash            []byte `storm:"id"`
	Encoded_Payload []byte
	Timestamp       time.Time `storm:"index"`
}

func CreateEncryptedTransaction

func CreateEncryptedTransaction(hash []byte, encoded_payload []byte, timestamp time.Time) *Encrypted_Transaction

func FindEncryptedTransaction

func FindEncryptedTransaction(hash []byte) (*Encrypted_Transaction, error)

func NewEncryptedTransaction

func NewEncryptedTransaction(encoded_payload []byte) *Encrypted_Transaction

func (*Encrypted_Transaction) Delete

func (et *Encrypted_Transaction) Delete() error

func (*Encrypted_Transaction) Save

func (et *Encrypted_Transaction) Save() error

type Peer

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

func FindPeer

func FindPeer(publicKey []byte) (*Peer, error)

func NewPeer

func NewPeer(pKey []byte, nodeURL string) *Peer

func Update

func Update(pKey []byte, nodeURL string) *Peer

func (*Peer) Delete

func (p *Peer) Delete() error

func (*Peer) Save

func (p *Peer) Save() error

Jump to

Keyboard shortcuts

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