jsontostruct

package
v0.0.0-...-8d6dda1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(url string) ([]byte, string, error)

func Mock

func Mock(b []byte, i interface{}) ([]byte, error)

func ParseJson

func ParseJson(b []byte) (interface{}, error)

func PrintGo

func PrintGo(f interface{}, name string)

func WriteGo

func WriteGo(w io.Writer, f interface{}, name string)

Types

type ByIDFirst

type ByIDFirst []string

func (ByIDFirst) Len

func (p ByIDFirst) Len() int

func (ByIDFirst) Less

func (p ByIDFirst) Less(i, j int) bool

func (ByIDFirst) Swap

func (p ByIDFirst) Swap(i, j int)

type Model

type Model struct {
	Writer      io.Writer
	WithExample bool
	Data        interface{}
	Name        string
	Format      bool
	Convert     bool
}

func FromBytes

func FromBytes(bytes []byte, name string) (*Model, error)

func GetModel

func GetModel(url string) (*Model, error)

func New

func New(data interface{}, name string) *Model

func (*Model) WriteGo

func (m *Model) WriteGo()

func (*Model) WriteJava

func (m *Model) WriteJava()

Jump to

Keyboard shortcuts

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