golang

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator main package structure

func NewClient

func NewClient(schema smd.Schema) *Generator

NewClient create Generator from zenrpc/v2 SMD.

func (*Generator) Generate

func (g *Generator) Generate() ([]byte, error)

Generate returns generated Go client.

func (*Generator) Method

func (g *Generator) Method(namespace, methodName string) goMethod

Method return method by namespace and methodName.

func (*Generator) Models

func (g *Generator) Models() []goModel

Models convert schema models to goModels. Used in template, should be exported.

func (*Generator) NamespaceMethodNames

func (g *Generator) NamespaceMethodNames(namespace string) (res []string)

NamespaceMethodNames return all methodNames by namespace name.

func (*Generator) NamespaceNames

func (g *Generator) NamespaceNames() (res []string)

NamespaceNames return all namespace names.

Jump to

Keyboard shortcuts

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