api

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const Bytes20 = "membuffers.bytes20"
View Source
const Bytes32 = "membuffers.bytes32"
View Source
const MEMBUFC_VERSION = "0.4.0"
View Source
const Uint256 = "membuffers.uint256"

Variables

This section is empty.

Functions

func Compile

func Compile(conf *Config) error

func ToCamel

func ToCamel(s string) string

func ToSnake

func ToSnake(s string) string

Types

type Config

type Config struct {
	Language      string   // which output language to generate (eg. "go")
	LanguageGoCtx bool     // should go language contexts be added to all interfaces
	Mock          bool     // should mock services be created in addition to interfaces
	Files         []string // input files
	Version       string   // version
}

func NewConfig

func NewConfig() *Config

type Enum

type Enum struct {
	Name   string
	Values []EnumValue
}

type EnumValue

type EnumValue struct {
	Name  string
	Value int
}

type InlineType

type InlineType struct {
	Name        string
	Alias       string
	FieldGoType string
}

type MessageField

type MessageField struct {
	FieldName              string
	FieldGoType            string
	IsMessage              bool
	IsArray                bool
	IsUnion                bool
	IsEnum                 bool
	IsInline               bool
	InlineUnderlyingGoType string
	TypeAccessor           string
	FieldIndex             int
	MessageName            string
}

type NameWithAndWithoutImport

type NameWithAndWithoutImport struct {
	CleanName      string
	ImportName     string
	MockImportName string
}

type ServiceMethod

type ServiceMethod struct {
	Name   string
	Input  string
	Output string
}

Jump to

Keyboard shortcuts

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