genopenrpc

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package genopenrpc generates Open-RPC spec by proto files.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoServicesInFiles is returned when all proto-files do not contain service directives.
	ErrNoServicesInFiles = errors.New("proto files do not contain services")
	// ErrServiceNotFound is returned when service with required name not found in list service.
	ErrServiceNotFound = errors.New("service not found")
	// ErrMessageIsNil is returned when you try to generate empty message.
	ErrMessageIsNil = errors.New("message is nil")
	// ErrInvalidKeyType is returned when key of the map field is wrong.
	ErrInvalidKeyType = errors.New("key of the map should be string or number")
)
View Source
var (
	// Version of the generator.
	Version = "(unknown)"
	// MethodsWithServiceName specifies that name of methods will be generate with service name.
	MethodsWithServiceName = false
	// GenerateServices service names to generate, all if it empty.
	GenerateServices = []string{}
	// ServiceDescriptionsPath path to json file with service descriptions.
	ServiceDescriptionsPath = ""
)

Some variables as config of generator.

Functions

func Run

func Run(gen *protogen.Plugin) error

Run loops through files to generate and creates spec file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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