Documentation ¶
Index ¶
- func ProcessExtension(handleExtension extensionHandler)
- type ExtensionHandlerRequest
- func (*ExtensionHandlerRequest) Descriptor() ([]byte, []int)
- func (m *ExtensionHandlerRequest) GetCompilerVersion() *Version
- func (m *ExtensionHandlerRequest) GetWrapper() *Wrapper
- func (*ExtensionHandlerRequest) ProtoMessage()
- func (m *ExtensionHandlerRequest) Reset()
- func (m *ExtensionHandlerRequest) String() string
- func (m *ExtensionHandlerRequest) XXX_DiscardUnknown()
- func (m *ExtensionHandlerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExtensionHandlerRequest) XXX_Merge(src proto.Message)
- func (m *ExtensionHandlerRequest) XXX_Size() int
- func (m *ExtensionHandlerRequest) XXX_Unmarshal(b []byte) error
- type ExtensionHandlerResponse
- func (*ExtensionHandlerResponse) Descriptor() ([]byte, []int)
- func (m *ExtensionHandlerResponse) GetError() []string
- func (m *ExtensionHandlerResponse) GetHandled() bool
- func (m *ExtensionHandlerResponse) GetValue() *any.Any
- func (*ExtensionHandlerResponse) ProtoMessage()
- func (m *ExtensionHandlerResponse) Reset()
- func (m *ExtensionHandlerResponse) String() string
- func (m *ExtensionHandlerResponse) XXX_DiscardUnknown()
- func (m *ExtensionHandlerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExtensionHandlerResponse) XXX_Merge(src proto.Message)
- func (m *ExtensionHandlerResponse) XXX_Size() int
- func (m *ExtensionHandlerResponse) XXX_Unmarshal(b []byte) error
- type Version
- func (*Version) Descriptor() ([]byte, []int)
- func (m *Version) GetMajor() int32
- func (m *Version) GetMinor() int32
- func (m *Version) GetPatch() int32
- func (m *Version) GetSuffix() string
- func (*Version) ProtoMessage()
- func (m *Version) Reset()
- func (m *Version) String() string
- func (m *Version) XXX_DiscardUnknown()
- func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Version) XXX_Merge(src proto.Message)
- func (m *Version) XXX_Size() int
- func (m *Version) XXX_Unmarshal(b []byte) error
- type Wrapper
- func (*Wrapper) Descriptor() ([]byte, []int)
- func (m *Wrapper) GetExtensionName() string
- func (m *Wrapper) GetVersion() string
- func (m *Wrapper) GetYaml() string
- func (*Wrapper) ProtoMessage()
- func (m *Wrapper) Reset()
- func (m *Wrapper) String() string
- func (m *Wrapper) XXX_DiscardUnknown()
- func (m *Wrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Wrapper) XXX_Merge(src proto.Message)
- func (m *Wrapper) XXX_Size() int
- func (m *Wrapper) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessExtension ¶
func ProcessExtension(handleExtension extensionHandler)
ProcessExtension calles the handler for a specified extension.
Types ¶
type ExtensionHandlerRequest ¶
type ExtensionHandlerRequest struct { // The OpenAPI descriptions that were explicitly listed on the command line. // The specifications will appear in the order they are specified to gnostic. Wrapper *Wrapper `protobuf:"bytes,1,opt,name=wrapper,proto3" json:"wrapper,omitempty"` // The version number of openapi compiler. CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion,proto3" json:"compiler_version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
An encoded Request is written to the ExtensionHandler's stdin.
func (*ExtensionHandlerRequest) Descriptor ¶
func (*ExtensionHandlerRequest) Descriptor() ([]byte, []int)
func (*ExtensionHandlerRequest) GetCompilerVersion ¶
func (m *ExtensionHandlerRequest) GetCompilerVersion() *Version
func (*ExtensionHandlerRequest) GetWrapper ¶
func (m *ExtensionHandlerRequest) GetWrapper() *Wrapper
func (*ExtensionHandlerRequest) ProtoMessage ¶
func (*ExtensionHandlerRequest) ProtoMessage()
func (*ExtensionHandlerRequest) Reset ¶
func (m *ExtensionHandlerRequest) Reset()
func (*ExtensionHandlerRequest) String ¶
func (m *ExtensionHandlerRequest) String() string
func (*ExtensionHandlerRequest) XXX_DiscardUnknown ¶
func (m *ExtensionHandlerRequest) XXX_DiscardUnknown()
func (*ExtensionHandlerRequest) XXX_Marshal ¶
func (m *ExtensionHandlerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExtensionHandlerRequest) XXX_Merge ¶
func (m *ExtensionHandlerRequest) XXX_Merge(src proto.Message)
func (*ExtensionHandlerRequest) XXX_Size ¶
func (m *ExtensionHandlerRequest) XXX_Size() int
func (*ExtensionHandlerRequest) XXX_Unmarshal ¶
func (m *ExtensionHandlerRequest) XXX_Unmarshal(b []byte) error
type ExtensionHandlerResponse ¶
type ExtensionHandlerResponse struct { // true if the extension is handled by the extension handler; false otherwise Handled bool `protobuf:"varint,1,opt,name=handled,proto3" json:"handled,omitempty"` // Error message. If non-empty, the extension handling failed. // The extension handler process should exit with status code zero // even if it reports an error in this way. // // This should be used to indicate errors which prevent the extension from // operating as intended. Errors which indicate a problem in gnostic // itself -- such as the input Document being unparseable -- should be // reported by writing a message to stderr and exiting with a non-zero // status code. Error []string `protobuf:"bytes,2,rep,name=error,proto3" json:"error,omitempty"` // text output Value *any.Any `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The extensions writes an encoded ExtensionHandlerResponse to stdout.
func (*ExtensionHandlerResponse) Descriptor ¶
func (*ExtensionHandlerResponse) Descriptor() ([]byte, []int)
func (*ExtensionHandlerResponse) GetError ¶
func (m *ExtensionHandlerResponse) GetError() []string
func (*ExtensionHandlerResponse) GetHandled ¶
func (m *ExtensionHandlerResponse) GetHandled() bool
func (*ExtensionHandlerResponse) GetValue ¶
func (m *ExtensionHandlerResponse) GetValue() *any.Any
func (*ExtensionHandlerResponse) ProtoMessage ¶
func (*ExtensionHandlerResponse) ProtoMessage()
func (*ExtensionHandlerResponse) Reset ¶
func (m *ExtensionHandlerResponse) Reset()
func (*ExtensionHandlerResponse) String ¶
func (m *ExtensionHandlerResponse) String() string
func (*ExtensionHandlerResponse) XXX_DiscardUnknown ¶
func (m *ExtensionHandlerResponse) XXX_DiscardUnknown()
func (*ExtensionHandlerResponse) XXX_Marshal ¶
func (m *ExtensionHandlerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExtensionHandlerResponse) XXX_Merge ¶
func (m *ExtensionHandlerResponse) XXX_Merge(src proto.Message)
func (*ExtensionHandlerResponse) XXX_Size ¶
func (m *ExtensionHandlerResponse) XXX_Size() int
func (*ExtensionHandlerResponse) XXX_Unmarshal ¶
func (m *ExtensionHandlerResponse) XXX_Unmarshal(b []byte) error
type Version ¶
type Version struct { Major int32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"` Minor int32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"` Patch int32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"` // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should // be empty for mainline stable releases. Suffix string `protobuf:"bytes,4,opt,name=suffix,proto3" json:"suffix,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The version number of OpenAPI compiler.
func (*Version) XXX_Marshal ¶
type Wrapper ¶
type Wrapper struct { // version of the OpenAPI specification in which this extension was written. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // Name of the extension ExtensionName string `protobuf:"bytes,2,opt,name=extension_name,json=extensionName,proto3" json:"extension_name,omitempty"` // Must be a valid yaml for the proto Yaml string `protobuf:"bytes,3,opt,name=yaml,proto3" json:"yaml,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Wrapper) XXX_Marshal ¶
Click to show internal directories.
Click to hide internal directories.