trip

package
v0.0.0-...-8269def Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const TripABI = "" /* 5316-byte string literal not displayed */

TripABI is the input ABI used to generate the binding from.

Variables

This section is empty.

Functions

This section is empty.

Types

type Struct0

type Struct0 struct {
	FromLat [10]byte
	FromLng [11]byte
	ToLat   [10]byte
	ToLng   [11]byte
}

Struct0 is an auto generated low-level Go binding around an user-defined struct.

type Trip

type Trip struct {
	TripCaller     // Read-only binding to the contract
	TripTransactor // Write-only binding to the contract
	TripFilterer   // Log filterer for contract events
}

Trip is an auto generated Go binding around an Ethereum contract.

func NewTrip

func NewTrip(address common.Address, backend bind.ContractBackend) (*Trip, error)

NewTrip creates a new instance of Trip, bound to a specific deployed contract.

type TripCaller

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

TripCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewTripCaller

func NewTripCaller(address common.Address, caller bind.ContractCaller) (*TripCaller, error)

NewTripCaller creates a new read-only instance of Trip, bound to a specific deployed contract.

func (*TripCaller) AvailableChargeAmount

func (_Trip *TripCaller) AvailableChargeAmount(opts *bind.CallOpts) (*big.Int, error)

AvailableChargeAmount is a free data retrieval call binding the contract method 0x63c192ce.

Solidity: function availableChargeAmount() constant returns(uint256 amount)

func (*TripCaller) BeforeBuy

func (_Trip *TripCaller) BeforeBuy(opts *bind.CallOpts, _value *big.Int, _data []byte) (bool, string, error)

BeforeBuy is a free data retrieval call binding the contract method 0x102b9b26.

Solidity: function beforeBuy(uint256 _value, bytes _data) constant returns(bool, string)

func (*TripCaller) GetCarrierAddress

func (_Trip *TripCaller) GetCarrierAddress(opts *bind.CallOpts) (common.Address, error)

GetCarrierAddress is a free data retrieval call binding the contract method 0xabc14e61.

Solidity: function getCarrierAddress() constant returns(address)

func (*TripCaller) GetCarrierId

func (_Trip *TripCaller) GetCarrierId(opts *bind.CallOpts) (*big.Int, error)

GetCarrierId is a free data retrieval call binding the contract method 0x21a88559.

Solidity: function getCarrierId() constant returns(uint256)

func (*TripCaller) GetTickets

func (_Trip *TripCaller) GetTickets(opts *bind.CallOpts, _time *big.Int) (struct {
	TicketsArray uint8
	IndexesArray []*big.Int
}, error)

GetTickets is a free data retrieval call binding the contract method 0x14f2979f.

Solidity: function getTickets(uint256 _time) constant returns(uint8 ticketsArray, uint256[] indexesArray)

func (*TripCaller) GetTickets0

func (_Trip *TripCaller) GetTickets0(opts *bind.CallOpts) (struct {
	Addresses []common.Address
	Times     []*big.Int
}, error)

GetTickets0 is a free data retrieval call binding the contract method 0x4ed02622.

Solidity: function getTickets() constant returns(address[] addresses, uint256[] times)

func (*TripCaller) GetTripId

func (_Trip *TripCaller) GetTripId(opts *bind.CallOpts) (*big.Int, error)

GetTripId is a free data retrieval call binding the contract method 0xf1d5659e.

Solidity: function getTripId() constant returns(uint256)

func (*TripCaller) Info

func (_Trip *TripCaller) Info(opts *bind.CallOpts) (struct {
	CarrierAddress common.Address
	CarrierId      *big.Int
	TripLoc        Struct0
	Price          *big.Int
	Schedule       [][]byte
	Places         uint8
	Description    []byte
	Enabled        bool
	Token          common.Address
	RouteType      uint8
}, error)

Info is a free data retrieval call binding the contract method 0x370158ea.

Solidity: function info() constant returns(address carrierAddress, uint256 _carrierId, Struct0 _tripLoc, uint256 _price, bytes[] _schedule, uint8 _places, bytes _description, bool _enabled, address _token, uint8 _routeType)

func (*TripCaller) Owner

func (_Trip *TripCaller) Owner(opts *bind.CallOpts) (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() constant returns(address)

type TripCallerRaw

type TripCallerRaw struct {
	Contract *TripCaller // Generic read-only contract binding to access the raw methods on
}

TripCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*TripCallerRaw) Call

func (_Trip *TripCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type TripCallerSession

type TripCallerSession struct {
	Contract *TripCaller   // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts // Call options to use throughout this session
}

TripCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*TripCallerSession) AvailableChargeAmount

func (_Trip *TripCallerSession) AvailableChargeAmount() (*big.Int, error)

AvailableChargeAmount is a free data retrieval call binding the contract method 0x63c192ce.

Solidity: function availableChargeAmount() constant returns(uint256 amount)

func (*TripCallerSession) BeforeBuy

func (_Trip *TripCallerSession) BeforeBuy(_value *big.Int, _data []byte) (bool, string, error)

BeforeBuy is a free data retrieval call binding the contract method 0x102b9b26.

Solidity: function beforeBuy(uint256 _value, bytes _data) constant returns(bool, string)

func (*TripCallerSession) GetCarrierAddress

func (_Trip *TripCallerSession) GetCarrierAddress() (common.Address, error)

GetCarrierAddress is a free data retrieval call binding the contract method 0xabc14e61.

Solidity: function getCarrierAddress() constant returns(address)

func (*TripCallerSession) GetCarrierId

func (_Trip *TripCallerSession) GetCarrierId() (*big.Int, error)

GetCarrierId is a free data retrieval call binding the contract method 0x21a88559.

Solidity: function getCarrierId() constant returns(uint256)

func (*TripCallerSession) GetTickets

func (_Trip *TripCallerSession) GetTickets(_time *big.Int) (struct {
	TicketsArray uint8
	IndexesArray []*big.Int
}, error)

GetTickets is a free data retrieval call binding the contract method 0x14f2979f.

Solidity: function getTickets(uint256 _time) constant returns(uint8 ticketsArray, uint256[] indexesArray)

func (*TripCallerSession) GetTickets0

func (_Trip *TripCallerSession) GetTickets0() (struct {
	Addresses []common.Address
	Times     []*big.Int
}, error)

GetTickets0 is a free data retrieval call binding the contract method 0x4ed02622.

Solidity: function getTickets() constant returns(address[] addresses, uint256[] times)

func (*TripCallerSession) GetTripId

func (_Trip *TripCallerSession) GetTripId() (*big.Int, error)

GetTripId is a free data retrieval call binding the contract method 0xf1d5659e.

Solidity: function getTripId() constant returns(uint256)

func (*TripCallerSession) Info

func (_Trip *TripCallerSession) Info() (struct {
	CarrierAddress common.Address
	CarrierId      *big.Int
	TripLoc        Struct0
	Price          *big.Int
	Schedule       [][]byte
	Places         uint8
	Description    []byte
	Enabled        bool
	Token          common.Address
	RouteType      uint8
}, error)

Info is a free data retrieval call binding the contract method 0x370158ea.

Solidity: function info() constant returns(address carrierAddress, uint256 _carrierId, Struct0 _tripLoc, uint256 _price, bytes[] _schedule, uint8 _places, bytes _description, bool _enabled, address _token, uint8 _routeType)

func (*TripCallerSession) Owner

func (_Trip *TripCallerSession) Owner() (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() constant returns(address)

type TripCharged

type TripCharged struct {
	CarrierAddress common.Address
	Amount         *big.Int
	TripContract   common.Address
	Raw            types.Log // Blockchain specific contextual infos
}

TripCharged represents a Charged event raised by the Trip contract.

type TripChargedIterator

type TripChargedIterator struct {
	Event *TripCharged // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

TripChargedIterator is returned from FilterCharged and is used to iterate over the raw logs and unpacked data for Charged events raised by the Trip contract.

func (*TripChargedIterator) Close

func (it *TripChargedIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*TripChargedIterator) Error

func (it *TripChargedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*TripChargedIterator) Next

func (it *TripChargedIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type TripFilterer

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

TripFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewTripFilterer

func NewTripFilterer(address common.Address, filterer bind.ContractFilterer) (*TripFilterer, error)

NewTripFilterer creates a new log filterer instance of Trip, bound to a specific deployed contract.

func (*TripFilterer) FilterCharged

func (_Trip *TripFilterer) FilterCharged(opts *bind.FilterOpts) (*TripChargedIterator, error)

FilterCharged is a free log retrieval operation binding the contract event 0x654be7454f73d17698cc6328c334c6b369ce05eeb009e2fc3189178ed31cf8b1.

Solidity: event Charged(address carrierAddress, uint256 amount, address tripContract)

func (*TripFilterer) ParseCharged

func (_Trip *TripFilterer) ParseCharged(log types.Log) (*TripCharged, error)

ParseCharged is a log parse operation binding the contract event 0x654be7454f73d17698cc6328c334c6b369ce05eeb009e2fc3189178ed31cf8b1.

Solidity: event Charged(address carrierAddress, uint256 amount, address tripContract)

func (*TripFilterer) WatchCharged

func (_Trip *TripFilterer) WatchCharged(opts *bind.WatchOpts, sink chan<- *TripCharged) (event.Subscription, error)

WatchCharged is a free log subscription operation binding the contract event 0x654be7454f73d17698cc6328c334c6b369ce05eeb009e2fc3189178ed31cf8b1.

Solidity: event Charged(address carrierAddress, uint256 amount, address tripContract)

type TripRaw

type TripRaw struct {
	Contract *Trip // Generic contract binding to access the raw methods on
}

TripRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*TripRaw) Call

func (_Trip *TripRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*TripRaw) Transact

func (_Trip *TripRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*TripRaw) Transfer

func (_Trip *TripRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type TripSession

type TripSession struct {
	Contract     *Trip             // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

TripSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*TripSession) AvailableChargeAmount

func (_Trip *TripSession) AvailableChargeAmount() (*big.Int, error)

AvailableChargeAmount is a free data retrieval call binding the contract method 0x63c192ce.

Solidity: function availableChargeAmount() constant returns(uint256 amount)

func (*TripSession) BeforeBuy

func (_Trip *TripSession) BeforeBuy(_value *big.Int, _data []byte) (bool, string, error)

BeforeBuy is a free data retrieval call binding the contract method 0x102b9b26.

Solidity: function beforeBuy(uint256 _value, bytes _data) constant returns(bool, string)

func (*TripSession) Charge

func (_Trip *TripSession) Charge(_to common.Address) (*types.Transaction, error)

Charge is a paid mutator transaction binding the contract method 0xfc6bd76a.

Solidity: function charge(address _to) returns()

func (*TripSession) GetCarrierAddress

func (_Trip *TripSession) GetCarrierAddress() (common.Address, error)

GetCarrierAddress is a free data retrieval call binding the contract method 0xabc14e61.

Solidity: function getCarrierAddress() constant returns(address)

func (*TripSession) GetCarrierId

func (_Trip *TripSession) GetCarrierId() (*big.Int, error)

GetCarrierId is a free data retrieval call binding the contract method 0x21a88559.

Solidity: function getCarrierId() constant returns(uint256)

func (*TripSession) GetTickets

func (_Trip *TripSession) GetTickets(_time *big.Int) (struct {
	TicketsArray uint8
	IndexesArray []*big.Int
}, error)

GetTickets is a free data retrieval call binding the contract method 0x14f2979f.

Solidity: function getTickets(uint256 _time) constant returns(uint8 ticketsArray, uint256[] indexesArray)

func (*TripSession) GetTickets0

func (_Trip *TripSession) GetTickets0() (struct {
	Addresses []common.Address
	Times     []*big.Int
}, error)

GetTickets0 is a free data retrieval call binding the contract method 0x4ed02622.

Solidity: function getTickets() constant returns(address[] addresses, uint256[] times)

func (*TripSession) GetTripId

func (_Trip *TripSession) GetTripId() (*big.Int, error)

GetTripId is a free data retrieval call binding the contract method 0xf1d5659e.

Solidity: function getTripId() constant returns(uint256)

func (*TripSession) Info

func (_Trip *TripSession) Info() (struct {
	CarrierAddress common.Address
	CarrierId      *big.Int
	TripLoc        Struct0
	Price          *big.Int
	Schedule       [][]byte
	Places         uint8
	Description    []byte
	Enabled        bool
	Token          common.Address
	RouteType      uint8
}, error)

Info is a free data retrieval call binding the contract method 0x370158ea.

Solidity: function info() constant returns(address carrierAddress, uint256 _carrierId, Struct0 _tripLoc, uint256 _price, bytes[] _schedule, uint8 _places, bytes _description, bool _enabled, address _token, uint8 _routeType)

func (*TripSession) Owner

func (_Trip *TripSession) Owner() (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() constant returns(address)

func (*TripSession) Refund

func (_Trip *TripSession) Refund(_buyer common.Address, _time *big.Int, _count *big.Int) (*types.Transaction, error)

Refund is a paid mutator transaction binding the contract method 0x18fd8903.

Solidity: function refund(address _buyer, uint256 _time, uint256 _count) returns()

func (*TripSession) SetArribute

func (_Trip *TripSession) SetArribute(_tripLoc Struct0, _price *big.Int, _schedule [][]byte, _places uint8, _description []byte) (*types.Transaction, error)

SetArribute is a paid mutator transaction binding the contract method 0x4a7b590e.

Solidity: function setArribute(Struct0 _tripLoc, uint256 _price, bytes[] _schedule, uint8 _places, bytes _description) returns()

func (*TripSession) SetEnabled

func (_Trip *TripSession) SetEnabled(_enabled bool) (*types.Transaction, error)

SetEnabled is a paid mutator transaction binding the contract method 0x328d8f72.

Solidity: function setEnabled(bool _enabled) returns()

func (*TripSession) SetVehicle

func (_Trip *TripSession) SetVehicle(_routeType uint8) (*types.Transaction, error)

SetVehicle is a paid mutator transaction binding the contract method 0xb1ab1f50.

Solidity: function setVehicle(uint8 _routeType) returns()

func (*TripSession) TokenFallback

func (_Trip *TripSession) TokenFallback(_from common.Address, _value *big.Int, _data []byte) (*types.Transaction, error)

TokenFallback is a paid mutator transaction binding the contract method 0xc0ee0b8a.

Solidity: function tokenFallback(address _from, uint256 _value, bytes _data) returns()

func (*TripSession) TransferOwnership

func (_Trip *TripSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

type TripTransactor

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

TripTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewTripTransactor

func NewTripTransactor(address common.Address, transactor bind.ContractTransactor) (*TripTransactor, error)

NewTripTransactor creates a new write-only instance of Trip, bound to a specific deployed contract.

func (*TripTransactor) Charge

func (_Trip *TripTransactor) Charge(opts *bind.TransactOpts, _to common.Address) (*types.Transaction, error)

Charge is a paid mutator transaction binding the contract method 0xfc6bd76a.

Solidity: function charge(address _to) returns()

func (*TripTransactor) Refund

func (_Trip *TripTransactor) Refund(opts *bind.TransactOpts, _buyer common.Address, _time *big.Int, _count *big.Int) (*types.Transaction, error)

Refund is a paid mutator transaction binding the contract method 0x18fd8903.

Solidity: function refund(address _buyer, uint256 _time, uint256 _count) returns()

func (*TripTransactor) SetArribute

func (_Trip *TripTransactor) SetArribute(opts *bind.TransactOpts, _tripLoc Struct0, _price *big.Int, _schedule [][]byte, _places uint8, _description []byte) (*types.Transaction, error)

SetArribute is a paid mutator transaction binding the contract method 0x4a7b590e.

Solidity: function setArribute(Struct0 _tripLoc, uint256 _price, bytes[] _schedule, uint8 _places, bytes _description) returns()

func (*TripTransactor) SetEnabled

func (_Trip *TripTransactor) SetEnabled(opts *bind.TransactOpts, _enabled bool) (*types.Transaction, error)

SetEnabled is a paid mutator transaction binding the contract method 0x328d8f72.

Solidity: function setEnabled(bool _enabled) returns()

func (*TripTransactor) SetVehicle

func (_Trip *TripTransactor) SetVehicle(opts *bind.TransactOpts, _routeType uint8) (*types.Transaction, error)

SetVehicle is a paid mutator transaction binding the contract method 0xb1ab1f50.

Solidity: function setVehicle(uint8 _routeType) returns()

func (*TripTransactor) TokenFallback

func (_Trip *TripTransactor) TokenFallback(opts *bind.TransactOpts, _from common.Address, _value *big.Int, _data []byte) (*types.Transaction, error)

TokenFallback is a paid mutator transaction binding the contract method 0xc0ee0b8a.

Solidity: function tokenFallback(address _from, uint256 _value, bytes _data) returns()

func (*TripTransactor) TransferOwnership

func (_Trip *TripTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

type TripTransactorRaw

type TripTransactorRaw struct {
	Contract *TripTransactor // Generic write-only contract binding to access the raw methods on
}

TripTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*TripTransactorRaw) Transact

func (_Trip *TripTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*TripTransactorRaw) Transfer

func (_Trip *TripTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type TripTransactorSession

type TripTransactorSession struct {
	Contract     *TripTransactor   // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

TripTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*TripTransactorSession) Charge

func (_Trip *TripTransactorSession) Charge(_to common.Address) (*types.Transaction, error)

Charge is a paid mutator transaction binding the contract method 0xfc6bd76a.

Solidity: function charge(address _to) returns()

func (*TripTransactorSession) Refund

func (_Trip *TripTransactorSession) Refund(_buyer common.Address, _time *big.Int, _count *big.Int) (*types.Transaction, error)

Refund is a paid mutator transaction binding the contract method 0x18fd8903.

Solidity: function refund(address _buyer, uint256 _time, uint256 _count) returns()

func (*TripTransactorSession) SetArribute

func (_Trip *TripTransactorSession) SetArribute(_tripLoc Struct0, _price *big.Int, _schedule [][]byte, _places uint8, _description []byte) (*types.Transaction, error)

SetArribute is a paid mutator transaction binding the contract method 0x4a7b590e.

Solidity: function setArribute(Struct0 _tripLoc, uint256 _price, bytes[] _schedule, uint8 _places, bytes _description) returns()

func (*TripTransactorSession) SetEnabled

func (_Trip *TripTransactorSession) SetEnabled(_enabled bool) (*types.Transaction, error)

SetEnabled is a paid mutator transaction binding the contract method 0x328d8f72.

Solidity: function setEnabled(bool _enabled) returns()

func (*TripTransactorSession) SetVehicle

func (_Trip *TripTransactorSession) SetVehicle(_routeType uint8) (*types.Transaction, error)

SetVehicle is a paid mutator transaction binding the contract method 0xb1ab1f50.

Solidity: function setVehicle(uint8 _routeType) returns()

func (*TripTransactorSession) TokenFallback

func (_Trip *TripTransactorSession) TokenFallback(_from common.Address, _value *big.Int, _data []byte) (*types.Transaction, error)

TokenFallback is a paid mutator transaction binding the contract method 0xc0ee0b8a.

Solidity: function tokenFallback(address _from, uint256 _value, bytes _data) returns()

func (*TripTransactorSession) TransferOwnership

func (_Trip *TripTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

Jump to

Keyboard shortcuts

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