generator

package
v0.0.0-...-0e79ca8 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelCase

func CamelCase(s string) string

CamelCase returns the string converted to camel case (e.g. some_name to SomeName)

func GenerateGo

func GenerateGo(outpath string, thrifts map[string]*parser.Thrift, flags Flags) error

GenerateGo generates go files.

Types

type ErrMissingInclude

type ErrMissingInclude string

func (ErrMissingInclude) Error

func (e ErrMissingInclude) Error() string

type ErrUnknownType

type ErrUnknownType string

func (ErrUnknownType) Error

func (e ErrUnknownType) Error() string

type Flags

type Flags struct {
	Binarystring bool   // Always use string for binary instead of []byte
	ImportPrefix string // Prefix for Thrift-generated go package imports
	JSONEnumnum  bool   // For JSON marshal enums by number instead of name
	NoRPC        bool   // RPC code is not generated
	Pointers     bool   // Make all fields pointers
	SignedBytes  bool   // Interpret Thrift byte as Go signed int8 type
}

Flags generater flags

type GoPackage

type GoPackage struct {
	Path string
	Name string
}

Jump to

Keyboard shortcuts

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