github.com/nytimes/openapi2proto@v0.2.1/compiler/interface.go (about) 1 package compiler 2 3 import ( 4 "github.com/NYTimes/openapi2proto/internal/option" 5 "github.com/NYTimes/openapi2proto/openapi" 6 "github.com/NYTimes/openapi2proto/protobuf" 7 ) 8 9 const ( 10 phaseInvalid = iota 11 phaseCompileDefinitions 12 phaseCompileExtensions 13 phaseCompilePaths 14 ) 15 16 // Option is used to pass options to several methods 17 type Option = option.Option 18 19 type compileCtx struct { 20 annotate bool 21 skipRpcs bool 22 namespaceEnums bool 23 definitions map[string]protobuf.Type 24 externalDefinitions map[string]map[string]protobuf.Type 25 imports map[string]struct{} 26 parents []protobuf.Container 27 phase int 28 pkg *protobuf.Package 29 rpcs map[string]*protobuf.RPC 30 spec *openapi.Spec 31 service *protobuf.Service 32 types map[protobuf.Container]map[protobuf.Type]struct{} 33 unfulfilledRefs map[string]struct{} 34 messageNames map[string]bool 35 }