cmd

package
v2.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version string

Functions

func CodeGenerator

func CodeGenerator(jar []byte) *cobra.Command

func ExecuteJar

func ExecuteJar(jar []byte, params JarStdinParameters) ([]byte, error)

func FilterByNamespace added in v2.0.7

func FilterByNamespace(manifest *GoRestliManifest, allowList []string)

func GenerateAllImportsTest

func GenerateAllImportsTest(outputDir string, codeFiles []*utils.CodeFile) (err error)

func GenerateCode

func GenerateCode(
	outputDir string,
	manifests []*GoRestliManifest,
	generateWithPackageRoot bool,
) error

func GenerateCustomTyperefInit

func GenerateCustomTyperefInit(outputDir string, manifest *GoRestliManifest) (err error)

func LocateCustomTyperefs

func LocateCustomTyperefs(manifest *GoRestliManifest, outputDir string) error

func RegisterManifests

func RegisterManifests(manifests []*GoRestliManifest) (err error)

Types

type DataType

type DataType struct {
	Enum            *types.Enum            `json:"enum,omitempty"`
	Fixed           *types.Fixed           `json:"fixed,omitempty"`
	Record          *types.Record          `json:"record,omitempty"`
	ComplexKey      *types.ComplexKey      `json:"complexKey,omitempty"`
	StandaloneUnion *types.StandaloneUnion `json:"standaloneUnion,omitempty"`
	Typeref         *types.Typeref         `json:"typeref,omitempty"`
}

func (*DataType) GetComplexType

func (dt *DataType) GetComplexType() utils.ComplexType

func (*DataType) UnmarshalJSON

func (dt *DataType) UnmarshalJSON(data []byte) error

type GoRestliManifest

type GoRestliManifest struct {
	PackageRoot         string                `json:"packageRoot"`
	InputDataTypes      []DataType            `json:"inputDataTypes"`
	DependencyDataTypes []DataType            `json:"dependencyDataTypes"`
	Resources           []*resources.Resource `json:"resources"`
}

func ReadManifest

func ReadManifest(data []byte) (*GoRestliManifest, error)

func (*GoRestliManifest) GenerateResourceCode

func (m *GoRestliManifest) GenerateResourceCode() (codeFiles []*utils.CodeFile)

func (*GoRestliManifest) UnmarshalJSON

func (m *GoRestliManifest) UnmarshalJSON(data []byte) error

type JarStdinParameters

type JarStdinParameters struct {
	PackageRoot  string   `json:"packageRoot,omitempty"`
	Dependencies []string `json:"dependencies,omitempty"`
	Inputs       []string `json:"inputs,omitempty"`
	RawRecords   []string `json:"rawRecords,omitempty"`
}

Jump to

Keyboard shortcuts

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