-
Notifications
You must be signed in to change notification settings - Fork 100
/
interface.go
38 lines (33 loc) · 1.02 KB
/
interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package compiler
import (
"github.com/NYTimes/openapi2proto/internal/option"
"github.com/NYTimes/openapi2proto/openapi"
"github.com/NYTimes/openapi2proto/protobuf"
)
const (
phaseInvalid = iota
phaseCompileDefinitions
phaseCompileExtensions
phaseCompilePaths
)
// Option is used to pass options to several methods
type Option = option.Option
type compileCtx struct {
annotate bool
skipRpcs bool
prefixEnums bool
wrapPrimitives bool
definitions map[string]protobuf.Type
externalDefinitions map[string]map[string]protobuf.Type
imports map[string]struct{}
parents []protobuf.Container
phase int
pkg *protobuf.Package
rpcs map[string]*protobuf.RPC
spec *openapi.Spec
service *protobuf.Service
types map[protobuf.Container]map[protobuf.Type]struct{}
unfulfilledRefs map[string]struct{}
messageNames map[string]bool
wrapperMessages map[string]bool
}