Skip to content

badboyd/avro-schema-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

avro-schema-gen

Gen Avro schema from Go struct.

For example, from this struct

type Pointer struct {
	in *int
}

avro-schema-gen will create a schema like this

{
    "type":"record",
    "name":"Pointer",
    "fields":[
        {
            "name":"in",
            "default":null,
            "type":[
                "null",
                "long"
            ]
        }
    ]
}

How to use

import avroschema "github.com/badboyd/avro-schema-gen"

type Pointer struct {
	in *int
}

func main() {
    avroschema.Generate(Pointer{})
}

Releases

No releases published

Packages

No packages published

Languages