Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Name string `json:"name"` Street string `json:"street"` HouseNumber string `json:"houseNumber"` Town string `json:"town"` }
func (*Address) Scan ¶
Make the Address struct implement the sql.Scanner interface. This method simply decodes a JSON-encoded value into the struct fields. Ref: https://www.alexedwards.net/blog/using-postgresql-jsonb
type Block ¶
type Block struct { Transactions []Transaction `json:"Transactions"` // contains filtered or unexported fields }
type Transaction ¶
type Transaction struct { Id uuid.UUID `json:"id"` RecipientAddress Address `json:"recipientAddress"` SenderAddress Address `json:"senderAddress"` Value float32 `json:"value"` }
func (*Transaction) IsValid ¶
func (t *Transaction) IsValid() bool
Alterantive: use factory function and make structs private http://www.golangpatterns.info/object-oriented/constructors
Click to show internal directories.
Click to hide internal directories.