aproto

package
v0.0.0-...-f9bf7d0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArrayAsStreamAttributeName      = "aproto:array-as-stream"
	ServiceNameReplaceAttributeName = "aproto:service-name-replace"
)

Variables

View Source
var ProtoIdentifierRegex = regexp.MustCompile(`[A-Za-z_][\w_]*`)

Functions

func GetProtoFromAPISpec

func GetProtoFromAPISpec(spec apidoc.Spec) proto.Proto

Types

type ArrayAsStreamAttribute

type ArrayAsStreamAttribute struct {
	Value bool `json:"value"`
}
{
	"name": "aproto:array-as-stream",
	"value": {
	  "value" : true
	}
}

type RpcParameter

type RpcParameter struct {
	IsStream bool
	RpcType  string
	Message  proto.Message
}

type ServiceNameReplaceAttribute

type ServiceNameReplaceAttribute struct {
	RegexMaps []ServiceNameReplaceAttributeRegexMap `json:"regexMaps"`
}
{
      "name": "aproto:service-name-replace",
      "value": {
        "regexMaps" : [{"regex": "[^\\w_]", "replace": "_"}]
      }
    }

type ServiceNameReplaceAttributeRegexMap

type ServiceNameReplaceAttributeRegexMap struct {
	Regex   string `json:"regex"`   //The regex to search for
	Replace string `json:"replace"` //The replace string, see regexp.Regex.Expand for details
}

type UnsupportedTypeError

type UnsupportedTypeError error

Jump to

Keyboard shortcuts

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