model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Superhero

type Superhero struct {
	ID            int
	AffiliationID int
	Name          string
	Life          float64
	Energy        float64
	Powers        []*Superpower
}

Superhero is a model to which a custom unmarshal method utilizing buger/jsonparser API is attached.

func (*Superhero) UnmarshalJSON

func (s *Superhero) UnmarshalJSON(b []byte) error

UnmarshalJSON is a method implementing unmarshaler interface and utilizing buger/jsonparser low level API.

type Superpower

type Superpower struct {
	ID      int
	Name    string
	Damage  float64
	Energy  float64
	Passive bool
}

Superpower is a model to which a custom unmarshal method utilizing buger/jsonparser API is attached.

func (*Superpower) UnmarshalJSON

func (s *Superpower) UnmarshalJSON(b []byte) error

UnmarshalJSON is a method implementing unmarshaler interface and utilizing buger/jsonparser low level API.

Jump to

Keyboard shortcuts

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