proto

package
v0.12.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_module_proto protoreflect.FileDescriptor
View Source
var Module_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Module",
	HandlerType: (*ModuleServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Generate",
			Handler:    _Module_Generate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "module.proto",
}

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

Functions

func RegisterModuleServer

func RegisterModuleServer(s grpc.ServiceRegistrar, srv ModuleServer)

Types

type GeneratorRequest

type GeneratorRequest struct {

	// Project represents the project name
	Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
	// Stack represents the stack name
	Stack string `protobuf:"bytes,2,opt,name=stack,proto3" json:"stack,omitempty"`
	// App represents the application name, which is typically the same as the namespace of Kubernetes resources
	App string `protobuf:"bytes,3,opt,name=app,proto3" json:"app,omitempty"`
	// Workload represents the v1.Workload defined in the AppConfiguration
	Workload []byte `protobuf:"bytes,4,opt,name=workload,proto3" json:"workload,omitempty"`
	// DevModuleConfig is the developer's inputs of this module
	DevConfig []byte `protobuf:"bytes,5,opt,name=dev_config,json=devConfig,proto3" json:"dev_config,omitempty"`
	// PlatformModuleConfig is the platform engineer's inputs of this module
	PlatformConfig []byte `protobuf:"bytes,6,opt,name=platform_config,json=platformConfig,proto3" json:"platform_config,omitempty"`
	// context contains workspace-level configurations, such as topologies, server endpoints, metadata, etc.
	Context []byte `protobuf:"bytes,7,opt,name=context,proto3" json:"context,omitempty"`
	// contains filtered or unexported fields
}

GeneratorRequest represents a request to generate something based on the project details

func (*GeneratorRequest) Descriptor deprecated

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

Deprecated: Use GeneratorRequest.ProtoReflect.Descriptor instead.

func (*GeneratorRequest) GetApp

func (x *GeneratorRequest) GetApp() string

func (*GeneratorRequest) GetContext added in v0.12.0

func (x *GeneratorRequest) GetContext() []byte

func (*GeneratorRequest) GetDevConfig added in v0.12.0

func (x *GeneratorRequest) GetDevConfig() []byte

func (*GeneratorRequest) GetPlatformConfig added in v0.12.0

func (x *GeneratorRequest) GetPlatformConfig() []byte

func (*GeneratorRequest) GetProject

func (x *GeneratorRequest) GetProject() string

func (*GeneratorRequest) GetStack

func (x *GeneratorRequest) GetStack() string

func (*GeneratorRequest) GetWorkload

func (x *GeneratorRequest) GetWorkload() []byte

func (*GeneratorRequest) ProtoMessage

func (*GeneratorRequest) ProtoMessage()

func (*GeneratorRequest) ProtoReflect

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

func (*GeneratorRequest) Reset

func (x *GeneratorRequest) Reset()

func (*GeneratorRequest) String

func (x *GeneratorRequest) String() string

type GeneratorResponse

type GeneratorResponse struct {

	// Resources is a v1.Resource array, which represents the generated resources by this module.
	Resources [][]byte `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
	// Patcher contains fields should be patched into the workload corresponding fields
	Patcher []byte `protobuf:"bytes,2,opt,name=patcher,proto3" json:"patcher,omitempty"`
	// contains filtered or unexported fields
}

GeneratorResponse represents the generate result of the generator.

func (*GeneratorResponse) Descriptor deprecated

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

Deprecated: Use GeneratorResponse.ProtoReflect.Descriptor instead.

func (*GeneratorResponse) GetPatcher added in v0.12.0

func (x *GeneratorResponse) GetPatcher() []byte

func (*GeneratorResponse) GetResources

func (x *GeneratorResponse) GetResources() [][]byte

func (*GeneratorResponse) ProtoMessage

func (*GeneratorResponse) ProtoMessage()

func (*GeneratorResponse) ProtoReflect

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

func (*GeneratorResponse) Reset

func (x *GeneratorResponse) Reset()

func (*GeneratorResponse) String

func (x *GeneratorResponse) String() string

type ModuleClient

type ModuleClient interface {
	Generate(ctx context.Context, in *GeneratorRequest, opts ...grpc.CallOption) (*GeneratorResponse, error)
}

ModuleClient is the client API for Module 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 NewModuleClient

func NewModuleClient(cc grpc.ClientConnInterface) ModuleClient

type ModuleServer

type ModuleServer interface {
	Generate(context.Context, *GeneratorRequest) (*GeneratorResponse, error)
	// contains filtered or unexported methods
}

ModuleServer is the server API for Module service. All implementations must embed UnimplementedModuleServer for forward compatibility

type UnimplementedModuleServer

type UnimplementedModuleServer struct {
}

UnimplementedModuleServer must be embedded to have forward compatible implementations.

func (UnimplementedModuleServer) Generate

type UnsafeModuleServer

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

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

Jump to

Keyboard shortcuts

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