Documentation
¶
Overview ¶
Package bf_tx is a package that defines the Blockfreight™ Transaction (BF_TX) transaction standard and provides some useful functions to work with the BF_TX.
Index ¶
- func BF_TXContent(bf_tx BF_TX) (string, error)
- func HashBF_TX(bf_tx BF_TX) ([]byte, error)
- func HashBF_TX_salt(hash []byte, salt []byte) []byte
- func PrintBF_TX(bf_tx BF_TX)
- func State(bf_tx BF_TX) string
- type AgentMaster
- type AgentMasterProperties
- type AgentOwner
- type AgentOwnerProperties
- type BF_TX
- type BolNum
- type ConditionsCarriage
- type Consignee
- type Date
- type DescGoods
- type FirstName
- type FreightAdvAmt
- type FreightPayableAmt
- type GeneralInstructions
- type GrossWeight
- type IssueDetails
- type IssueDetailsProperties
- type LastName
- type MasterInfo
- type MasterInfoProperties
- type NotifyAddress
- type NumBol
- type PlaceIssue
- type PortDischarge
- type PortLoading
- type Properties
- type RefNum
- type Shipper
- type Sig
- type Vessel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BF_TXContent ¶
BF_TXContent receives the BF_TX structure, applies it the json.Marshal procedure and return the content of the BF_TX JSON.
func HashBF_TX_salt ¶
HashBF_TX_salt hashes two byte arrays and returns it.
Types ¶
type AgentMaster ¶
type AgentMaster struct {
Type string
Properties AgentMasterProperties
}
AgentMaster struct
type AgentMasterProperties ¶
AgentMasterProperties struct
type AgentOwner ¶
type AgentOwner struct {
Type string
Properties AgentOwnerProperties
}
AgentOwner struct
type AgentOwnerProperties ¶
type AgentOwnerProperties struct {
First_Name FirstName
Last_Name LastName
Sig Sig
Conditions_for_Carriage ConditionsCarriage
}
AgentOwnerProperties struct
type BF_TX ¶
type BF_TX struct {
// =========================
// Bill of Lading attributes
// =========================
Type string
Properties Properties
// ===================================
// Blockfreight Transaction attributes
// ===================================
Id string
PrivateKey ecdsa.PrivateKey
Signhash []uint8
Signature string
Verified bool
Transmitted bool
Amendment string
}
BF_TX structure respresents an logical abstraction of a Blockfreight™ Transaction.
func Reinitialize ¶
Reinitialize set the default values to the Blockfreight attributes of BF_TX
type GeneralInstructions ¶
type GeneralInstructions struct {
Type string
}
GeneralInstructions struct
type IssueDetails ¶
type IssueDetails struct {
Type string
Properties IssueDetailsProperties
}
IssueDetails struct
type IssueDetailsProperties ¶
type IssueDetailsProperties struct {
Place_of_Issue PlaceIssue
Date_of_Issue Date
}
IssueDetailsProperties struct
type MasterInfo ¶
type MasterInfo struct {
Type string
Properties MasterInfoProperties
}
Masterinfo struct
type MasterInfoProperties ¶
MasterInfoProperties struct
type Properties ¶
type Properties struct {
Shipper Shipper
Bol_Num BolNum
Ref_Num RefNum
Consignee Consignee
Vessel Vessel
Port_of_Loading PortLoading
Port_of_Discharge PortDischarge
Notify_Address NotifyAddress
Desc_of_Goods DescGoods
Gross_Weight GrossWeight
Freight_Payable_Amt FreightPayableAmt
Freight_Adv_Amt FreightAdvAmt
General_Instructions GeneralInstructions
Date_Shipped Date
Issue_Details IssueDetails
Num_Bol NumBol
Master_Info MasterInfo
Agent_for_Master AgentMaster
Agent_for_Owner AgentOwner
}
Properties struct