Documentation ¶
Overview ¶
Example ¶
input := []byte{ // age 0, 21, // siblings 0, 3, } view, err := person.NewPersonV1View(input) if err != nil { log.Fatal(err) } fmt.Println("age:", view.Age()) fmt.Println("siblings:", view.Siblings())
Output: age: 21 siblings: 3
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PersonV1Maker ¶
type PersonV1Maker struct {
// contains filtered or unexported fields
}
func NewPersonV1Maker ¶
func NewPersonV1Maker() *PersonV1Maker
func (*PersonV1Maker) Bytes ¶
func (m *PersonV1Maker) Bytes() []byte
func (*PersonV1Maker) SetAge ¶
func (m *PersonV1Maker) SetAge(v uint16)
func (*PersonV1Maker) SetSiblings ¶
func (m *PersonV1Maker) SetSiblings(v uint16)
type PersonV1View ¶
type PersonV1View struct {
// contains filtered or unexported fields
}
func NewPersonV1View ¶
func NewPersonV1View(data []byte) (*PersonV1View, error)
func (*PersonV1View) Age ¶
func (v *PersonV1View) Age() uint16
func (*PersonV1View) Siblings ¶
func (v *PersonV1View) Siblings() uint16
Click to show internal directories.
Click to hide internal directories.