openapiextension_v1

package
Version: v0.0.0-...-d88c8b5 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package openapiextension_v1 is a generated protocol buffer package.

It is generated from these files:

extension.proto

It has these top-level messages:

Version
ExtensionHandlerRequest
ExtensionHandlerResponse
Wrapper

Index

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 openapic.
	Wrapper *Wrapper `protobuf:"bytes,1,opt,name=wrapper" json:"wrapper,omitempty"`
	// The version number of openapi compiler.
	CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"`
}

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

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" 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" json:"error,omitempty"`
	// text output
	Value *google_protobuf.Any `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
}

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 (*ExtensionHandlerResponse) ProtoMessage

func (*ExtensionHandlerResponse) ProtoMessage()

func (*ExtensionHandlerResponse) Reset

func (m *ExtensionHandlerResponse) Reset()

func (*ExtensionHandlerResponse) String

func (m *ExtensionHandlerResponse) String() string

type Version

type Version struct {
	Major int32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"`
	Minor int32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"`
	Patch int32 `protobuf:"varint,3,opt,name=patch" 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" json:"suffix,omitempty"`
}

The version number of OpenAPI compiler.

func (*Version) Descriptor

func (*Version) Descriptor() ([]byte, []int)

func (*Version) GetMajor

func (m *Version) GetMajor() int32

func (*Version) GetMinor

func (m *Version) GetMinor() int32

func (*Version) GetPatch

func (m *Version) GetPatch() int32

func (*Version) GetSuffix

func (m *Version) GetSuffix() string

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) Reset

func (m *Version) Reset()

func (*Version) String

func (m *Version) String() string

type Wrapper

type Wrapper struct {
	// version of the OpenAPI specification in which this extension was written.
	Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
	// Name of the extension
	ExtensionName string `protobuf:"bytes,2,opt,name=extension_name,json=extensionName" json:"extension_name,omitempty"`
	// Must be a valid yaml for the proto
	Yaml string `protobuf:"bytes,3,opt,name=yaml" json:"yaml,omitempty"`
}

func (*Wrapper) Descriptor

func (*Wrapper) Descriptor() ([]byte, []int)

func (*Wrapper) GetExtensionName

func (m *Wrapper) GetExtensionName() string

func (*Wrapper) GetVersion

func (m *Wrapper) GetVersion() string

func (*Wrapper) GetYaml

func (m *Wrapper) GetYaml() string

func (*Wrapper) ProtoMessage

func (*Wrapper) ProtoMessage()

func (*Wrapper) Reset

func (m *Wrapper) Reset()

func (*Wrapper) String

func (m *Wrapper) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL