person

package
v0.0.0-...-f56171f Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2016 License: MIT Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

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