Documentation ¶
Index ¶
- Variables
- func Main(handler extensionHandler)
- type ExtensionHandlerRequest
- func (*ExtensionHandlerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExtensionHandlerRequest) GetCompilerVersion() *Version
- func (x *ExtensionHandlerRequest) GetWrapper() *Wrapper
- func (*ExtensionHandlerRequest) ProtoMessage()
- func (x *ExtensionHandlerRequest) ProtoReflect() protoreflect.Message
- func (x *ExtensionHandlerRequest) Reset()
- func (x *ExtensionHandlerRequest) String() string
- type ExtensionHandlerResponse
- func (*ExtensionHandlerResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ExtensionHandlerResponse) GetErrors() []string
- func (x *ExtensionHandlerResponse) GetHandled() bool
- func (x *ExtensionHandlerResponse) GetValue() *anypb.Any
- func (*ExtensionHandlerResponse) ProtoMessage()
- func (x *ExtensionHandlerResponse) ProtoReflect() protoreflect.Message
- func (x *ExtensionHandlerResponse) Reset()
- func (x *ExtensionHandlerResponse) String() string
- type Version
- func (*Version) Descriptor() ([]byte, []int)deprecated
- func (x *Version) GetMajor() int32
- func (x *Version) GetMinor() int32
- func (x *Version) GetPatch() int32
- func (x *Version) GetSuffix() string
- func (*Version) ProtoMessage()
- func (x *Version) ProtoReflect() protoreflect.Message
- func (x *Version) Reset()
- func (x *Version) String() string
- type Wrapper
- func (*Wrapper) Descriptor() ([]byte, []int)deprecated
- func (x *Wrapper) GetExtensionName() string
- func (x *Wrapper) GetVersion() string
- func (x *Wrapper) GetYaml() string
- func (*Wrapper) ProtoMessage()
- func (x *Wrapper) ProtoReflect() protoreflect.Message
- func (x *Wrapper) Reset()
- func (x *Wrapper) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_extensions_extension_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type ExtensionHandlerRequest ¶
type ExtensionHandlerRequest struct { // The extension to process. Wrapper *Wrapper `protobuf:"bytes,1,opt,name=wrapper,proto3" json:"wrapper,omitempty"` // The version number of Gnostic. CompilerVersion *Version `protobuf:"bytes,2,opt,name=compiler_version,json=compilerVersion,proto3" json:"compiler_version,omitempty"` // contains filtered or unexported fields }
An encoded Request is written to the ExtensionHandler's stdin.
func (*ExtensionHandlerRequest) Descriptor
deprecated
func (*ExtensionHandlerRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExtensionHandlerRequest.ProtoReflect.Descriptor instead.
func (*ExtensionHandlerRequest) GetCompilerVersion ¶
func (x *ExtensionHandlerRequest) GetCompilerVersion() *Version
func (*ExtensionHandlerRequest) GetWrapper ¶
func (x *ExtensionHandlerRequest) GetWrapper() *Wrapper
func (*ExtensionHandlerRequest) ProtoMessage ¶
func (*ExtensionHandlerRequest) ProtoMessage()
func (*ExtensionHandlerRequest) ProtoReflect ¶
func (x *ExtensionHandlerRequest) ProtoReflect() protoreflect.Message
func (*ExtensionHandlerRequest) Reset ¶
func (x *ExtensionHandlerRequest) Reset()
func (*ExtensionHandlerRequest) String ¶
func (x *ExtensionHandlerRequest) String() string
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(s). 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. Errors []string `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` // text output Value *anypb.Any `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
The extensions writes an encoded ExtensionHandlerResponse to stdout.
func (*ExtensionHandlerResponse) Descriptor
deprecated
func (*ExtensionHandlerResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExtensionHandlerResponse.ProtoReflect.Descriptor instead.
func (*ExtensionHandlerResponse) GetErrors ¶
func (x *ExtensionHandlerResponse) GetErrors() []string
func (*ExtensionHandlerResponse) GetHandled ¶
func (x *ExtensionHandlerResponse) GetHandled() bool
func (*ExtensionHandlerResponse) GetValue ¶
func (x *ExtensionHandlerResponse) GetValue() *anypb.Any
func (*ExtensionHandlerResponse) ProtoMessage ¶
func (*ExtensionHandlerResponse) ProtoMessage()
func (*ExtensionHandlerResponse) ProtoReflect ¶
func (x *ExtensionHandlerResponse) ProtoReflect() protoreflect.Message
func (*ExtensionHandlerResponse) Reset ¶
func (x *ExtensionHandlerResponse) Reset()
func (*ExtensionHandlerResponse) String ¶
func (x *ExtensionHandlerResponse) String() string
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"` // contains filtered or unexported fields }
The version number of Gnostic.
func (*Version) Descriptor
deprecated
func (*Version) ProtoMessage ¶
func (*Version) ProtoMessage()
func (*Version) ProtoReflect ¶
func (x *Version) ProtoReflect() protoreflect.Message
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"` // YAML-formatted extension value. Yaml string `protobuf:"bytes,3,opt,name=yaml,proto3" json:"yaml,omitempty"` // contains filtered or unexported fields }
func (*Wrapper) Descriptor
deprecated
func (*Wrapper) GetExtensionName ¶
func (*Wrapper) GetVersion ¶
func (*Wrapper) ProtoMessage ¶
func (*Wrapper) ProtoMessage()
func (*Wrapper) ProtoReflect ¶
func (x *Wrapper) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.