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 BFTXContent(bftx BF_TX) (string, error)
- func GenerateBFTXUID(hash []byte, salt []byte) string
- func HashBFTX(bftx BF_TX) ([]byte, error)
- func PrintBFTX(bftx BF_TX)
- func State(bftx BF_TX) string
- type AgentMaster
- type AgentOwner
- 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 LastName
- type MasterInfo
- 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 BFTXContent ¶ added in v0.5.0
BFTXContent receives the BF_TX structure, applies it the json.Marshal procedure and return the content of the BF_TX JSON.
func GenerateBFTXUID ¶ added in v0.5.0
GenerateBFTXUID hashes two byte arrays and returns it.
Types ¶
type AgentMaster ¶
type AgentMaster struct { FirstName string `json:"FirstName"` LastName string `json:"LastName"` Sig string `json:"Sig"` }
AgentMaster struct
type AgentOwner ¶
type AgentOwner struct { FirstName string `json:"FirstName"` LastName string `json:"LastName"` Sig string `json:"Sig"` ConditionsForCarriage string `json:"ConditionsForCarriage"` }
AgentOwner struct
type BF_TX ¶
type BF_TX struct { // ========================= // Bill of Lading attributes // ========================= Properties Properties // =================================== // Blockfreight Transaction attributes // =================================== Id string `json:"Id"` PrivateKey ecdsa.PrivateKey `json:"-"` Signhash []uint8 `json:"Signhash"` Signature string `json:"Signature"` Verified bool `json:"Verified"` Transmitted bool `json:"Transmitted"` Amendment string `json:"Amendment"` Private string `json:"Private"` }
BF_TX structure respresents an logical abstraction of a Blockfreight™ Transaction.
func ByteArrayToBFTX ¶ added in v0.5.0
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 { PlaceOfIssue string `json:"PlaceOfIssue"` DateOfIssue string `json:"DateOfIssue"` }
IssueDetails struct
type MasterInfo ¶
type MasterInfo struct { FirstName string `json:"FirstName"` LastName string `json:"LastName"` Sig string `json:"Sig"` }
MasterInfo struct
type Properties ¶
type Properties struct { Shipper string `protobuf:"bytes,1,opt,name=Shipper" json:"Shipper"` BolNum string `protobuf:"varint,1,opt,name=BolNum" json:"BolNum"` RefNum string `protobuf:"varint,2,opt,name=RefNum" json:"RefNum"` Consignee string `protobuf:"bytes,2,opt,name=Consignee" json:"Consignee"` HouseBill string `protobuf:"bytes,3,opt,name=HouseBill" json:"HouseBill"` Vessel string `protobuf:"varint,3,opt,name=Vessel" json:"Vessel"` Packages string `protobuf:"varint,4,opt,name=Packages" json:"Packages"` PackType string `protobuf:"bytes,4,opt,name=PackType" json:"PackType"` INCOTerms string `protobuf:"bytes,5,opt,name=INCOTerms" json:"INCOTerms"` PortOfLoading string `protobuf:"bytes,6,opt,name=PortOfLoading" json:"PortOfLoading"` PortOfDischarge string `protobuf:"bytes,7,opt,name=PortOfDischarge" json:"PortOfDischarge"` Destination string `protobuf:"bytes,8,opt,name=Destination" json:"Destination"` MarksAndNumbers string `protobuf:"bytes,9,opt,name=MarksAndNumbers" json:"MarksAndNumbers"` UnitOfWeight string `protobuf:"bytes,10,opt,name=UnitOfWeight" json:"UnitOfWeight"` DeliverAgent string `protobuf:"bytes,11,opt,name=DeliverAgent" json:"DeliverAgent"` ReceiveAgent string `protobuf:"bytes,12,opt,name=ReceiveAgent" json:"ReceiveAgent"` Container string `protobuf:"bytes,13,opt,name=Container" json:"Container"` ContainerSeal string `protobuf:"bytes,14,opt,name=ContainerSeal" json:"ContainerSeal"` ContainerMode string `protobuf:"bytes,15,opt,name=ContainerMode" json:"ContainerMode"` ContainerType string `protobuf:"bytes,16,opt,name=ContainerType" json:"ContainerType"` Volume string `protobuf:"bytes,17,opt,name=Volume" json:"Volume"` UnitOfVolume string `protobuf:"bytes,18,opt,name=UnitOfVolume" json:"UnitOfVolume"` NotifyAddress string `protobuf:"bytes,19,opt,name=NotifyAddress" json:"NotifyAddress"` DescOfGoods string `protobuf:"bytes,20,opt,name=DescOfGoods" json:"DescOfGoods"` GrossWeight string `protobuf:"varint,5,opt,name=GrossWeight" json:"GrossWeight"` FreightPayableAmt string `protobuf:"varint,6,opt,name=FreightPayableAmt" json:"FreightPayableAmt"` FreightAdvAmt string `protobuf:"varint,7,opt,name=FreightAdvAmt" json:"FreightAdvAmt"` GeneralInstructions string `protobuf:"bytes,21,opt,name=GeneralInstructions" json:"GeneralInstructions"` DateShipped string `protobuf:"bytes,22,opt,name=DateShipped" json:"DateShipped"` IssueDetails IssueDetails `json:"IssueDetails"` NumBol string `protobuf:"varint,8,opt,name=NumBol" json:"NumBol"` MasterInfo MasterInfo `json:"MasterInfo"` AgentForMaster AgentMaster `json:"AgentForMaster"` AgentForOwner AgentOwner `json:"AgentForOwner"` EncryptionMetaData string `json:"EncryptionMetaData"` }
Properties struct
Click to show internal directories.
Click to hide internal directories.