plugin

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 8 Imported by: 0

README

protoc --go_out=. --go_opt=paths=source_relative \
    --go-grpc_out=. --go-grpc_opt=paths=source_relative \
    protoc/veradco.proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_protoc_veradco_proto protoreflect.FileDescriptor
View Source
var Plugin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "plugin.Plugin",
	HandlerType: (*PluginServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Execute",
			Handler:    _Plugin_Execute_Handler,
		},
		{
			MethodName: "Discover",
			Handler:    _Plugin_Discover_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protoc/veradco.proto",
}

Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPluginServer

func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)

Types

type AdmissionResponse

type AdmissionResponse struct {
	Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	Error    string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*AdmissionResponse) Descriptor deprecated

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

Deprecated: Use AdmissionResponse.ProtoReflect.Descriptor instead.

func (*AdmissionResponse) GetError

func (x *AdmissionResponse) GetError() string

func (*AdmissionResponse) GetResponse

func (x *AdmissionResponse) GetResponse() []byte

func (*AdmissionResponse) ProtoMessage

func (*AdmissionResponse) ProtoMessage()

func (*AdmissionResponse) ProtoReflect

func (x *AdmissionResponse) ProtoReflect() protoreflect.Message

func (*AdmissionResponse) Reset

func (x *AdmissionResponse) Reset()

func (*AdmissionResponse) String

func (x *AdmissionResponse) String() string

type AdmissionReview

type AdmissionReview struct {
	Review        []byte `protobuf:"bytes,1,opt,name=review,proto3" json:"review,omitempty"`
	Configuration string `protobuf:"bytes,2,opt,name=configuration,proto3" json:"configuration,omitempty"`
	DryRun        bool   `protobuf:"varint,3,opt,name=dryRun,proto3" json:"dryRun,omitempty"`
	// contains filtered or unexported fields
}

func (*AdmissionReview) Descriptor deprecated

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

Deprecated: Use AdmissionReview.ProtoReflect.Descriptor instead.

func (*AdmissionReview) GetConfiguration

func (x *AdmissionReview) GetConfiguration() string

func (*AdmissionReview) GetDryRun

func (x *AdmissionReview) GetDryRun() bool

func (*AdmissionReview) GetReview

func (x *AdmissionReview) GetReview() []byte

func (*AdmissionReview) ProtoMessage

func (*AdmissionReview) ProtoMessage()

func (*AdmissionReview) ProtoReflect

func (x *AdmissionReview) ProtoReflect() protoreflect.Message

func (*AdmissionReview) Reset

func (x *AdmissionReview) Reset()

func (*AdmissionReview) String

func (x *AdmissionReview) String() string

type ConfigurationResponse

type ConfigurationResponse struct {
	Configuration []byte `protobuf:"bytes,1,opt,name=configuration,proto3" json:"configuration,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigurationResponse) Descriptor deprecated

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

Deprecated: Use ConfigurationResponse.ProtoReflect.Descriptor instead.

func (*ConfigurationResponse) GetConfiguration

func (x *ConfigurationResponse) GetConfiguration() []byte

func (*ConfigurationResponse) ProtoMessage

func (*ConfigurationResponse) ProtoMessage()

func (*ConfigurationResponse) ProtoReflect

func (x *ConfigurationResponse) ProtoReflect() protoreflect.Message

func (*ConfigurationResponse) Reset

func (x *ConfigurationResponse) Reset()

func (*ConfigurationResponse) String

func (x *ConfigurationResponse) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type PluginClient

type PluginClient interface {
	Execute(ctx context.Context, in *AdmissionReview, opts ...grpc.CallOption) (*AdmissionResponse, error)
	Discover(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ConfigurationResponse, error)
}

PluginClient is the client API for Plugin service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewPluginClient

func NewPluginClient(cc grpc.ClientConnInterface) PluginClient

type PluginServer

type PluginServer interface {
	Execute(context.Context, *AdmissionReview) (*AdmissionResponse, error)
	Discover(context.Context, *Empty) (*ConfigurationResponse, error)
	// contains filtered or unexported methods
}

PluginServer is the server API for Plugin service. All implementations must embed UnimplementedPluginServer for forward compatibility

type UnimplementedPluginServer

type UnimplementedPluginServer struct {
}

UnimplementedPluginServer must be embedded to have forward compatible implementations.

func (UnimplementedPluginServer) Discover

func (UnimplementedPluginServer) Execute

type UnsafePluginServer

type UnsafePluginServer interface {
	// contains filtered or unexported methods
}

UnsafePluginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL