api

package
v0.0.0-...-1d82211 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocobufOptionTplStr = `{{ .Options }}`
)

Variables

This section is empty.

Functions

func GenerateStub

func GenerateStub(
	content string,
	outputPath string,
	protocOpts []string,
	removeStubFiles bool,
) (map[string]string, error)

func GetExpectedGithubGoPackageUri

func GetExpectedGithubGoPackageUri(uploadUrl string, protobufContent string) string

func GetOptionGoPackageNameFromProto

func GetOptionGoPackageNameFromProto(protoContent string) string

func GetOptionPackageNameFromProto

func GetOptionPackageNameFromProto(protoContent string, packageName string) string

func GetPackageNameFromProto

func GetPackageNameFromProto(protoContent string) string

func GetServiceNameFromProto

func GetServiceNameFromProto(protoContent string) string

Types

type ApiCreator

type ApiCreator interface {
	InitProtoFile(packageName string, serviceName string, options []string) (string, error)
	InitSetupFile(serviceName string) (string, error)
}

func NewApiCreator

func NewApiCreator() ApiCreator

type StubCreator

type StubCreator interface {
	Generate(protobufContent string) (map[string]string, error)
}

func NewGoStubCreator

func NewGoStubCreator(packageOption string) StubCreator

func NewOpenapiStubCreator

func NewOpenapiStubCreator() StubCreator

Jump to

Keyboard shortcuts

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