transformerserverv1

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Transformer_GetTransformName_FullMethodName                   = "/transformerserverv1.Transformer/GetTransformName"
	Transformer_GetConfigDefinition_FullMethodName                = "/transformerserverv1.Transformer/GetConfigDefinition"
	Transformer_Transform_FullMethodName                          = "/transformerserverv1.Transformer/Transform"
	Transformer_ListAbstractResourceTypes_FullMethodName          = "/transformerserverv1.Transformer/ListAbstractResourceTypes"
	Transformer_CustomValidateAbstractResource_FullMethodName     = "/transformerserverv1.Transformer/CustomValidateAbstractResource"
	Transformer_GetAbstractResourceSpecDefinition_FullMethodName  = "/transformerserverv1.Transformer/GetAbstractResourceSpecDefinition"
	Transformer_CanAbstractResourceLinkTo_FullMethodName          = "/transformerserverv1.Transformer/CanAbstractResourceLinkTo"
	Transformer_IsAbstractResourceCommonTerminal_FullMethodName   = "/transformerserverv1.Transformer/IsAbstractResourceCommonTerminal"
	Transformer_GetAbstractResourceType_FullMethodName            = "/transformerserverv1.Transformer/GetAbstractResourceType"
	Transformer_GetAbstractResourceTypeDescription_FullMethodName = "/transformerserverv1.Transformer/GetAbstractResourceTypeDescription"
	Transformer_GetAbstractResourceExamples_FullMethodName        = "/transformerserverv1.Transformer/GetAbstractResourceExamples"
)
View Source
const (
	// The protocol version that is used during the handshake to ensure the plugin
	// is compatible with the host service.
	ProtocolVersion = "1.0"
)

Variables

View Source
var File_plugin_framework_transformerserverv1_transformer_proto protoreflect.FileDescriptor
View Source
var Transformer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "transformerserverv1.Transformer",
	HandlerType: (*TransformerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetTransformName",
			Handler:    _Transformer_GetTransformName_Handler,
		},
		{
			MethodName: "GetConfigDefinition",
			Handler:    _Transformer_GetConfigDefinition_Handler,
		},
		{
			MethodName: "Transform",
			Handler:    _Transformer_Transform_Handler,
		},
		{
			MethodName: "ListAbstractResourceTypes",
			Handler:    _Transformer_ListAbstractResourceTypes_Handler,
		},
		{
			MethodName: "CustomValidateAbstractResource",
			Handler:    _Transformer_CustomValidateAbstractResource_Handler,
		},
		{
			MethodName: "GetAbstractResourceSpecDefinition",
			Handler:    _Transformer_GetAbstractResourceSpecDefinition_Handler,
		},
		{
			MethodName: "CanAbstractResourceLinkTo",
			Handler:    _Transformer_CanAbstractResourceLinkTo_Handler,
		},
		{
			MethodName: "IsAbstractResourceCommonTerminal",
			Handler:    _Transformer_IsAbstractResourceCommonTerminal_Handler,
		},
		{
			MethodName: "GetAbstractResourceType",
			Handler:    _Transformer_GetAbstractResourceType_Handler,
		},
		{
			MethodName: "GetAbstractResourceTypeDescription",
			Handler:    _Transformer_GetAbstractResourceTypeDescription_Handler,
		},
		{
			MethodName: "GetAbstractResourceExamples",
			Handler:    _Transformer_GetAbstractResourceExamples_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "plugin-framework/transformerserverv1/transformer.proto",
}

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

Functions

func NewServer

func NewServer(
	pluginID string,
	pluginMetadata *pluginservicev1.PluginMetadata,
	transformer TransformerServer,
	pluginServiceClient pluginservicev1.ServiceClient,
	hostInfoContainer pluginutils.HostInfoContainer,
	opts ...pluginbase.ServerOption[TransformerServer],
) *pluginbase.Server[TransformerServer]

NewServer creates a new plugin server for a transformer plugin, taking care of registration and running the server.

func RegisterTransformerServer

func RegisterTransformerServer(s grpc.ServiceRegistrar, srv TransformerServer)

func WrapTransformerClient

func WrapTransformerClient(client TransformerClient, hostID string) transform.SpecTransformer

WrapTransformerClient wraps a transformer plugin v1 TransformerClient in a blueprint framework SpecTransformer to allow the deploy engine to interact with the transformer in a way that is compatible with the blueprint framework and is agnostic to the underlying communication protocol.

Types

type AbstractResourceRequest

type AbstractResourceRequest struct {

	// The type of resource to carry out an action on or retrieve
	// some information about.
	AbstractResourceType *sharedtypesv1.ResourceType `protobuf:"bytes,1,opt,name=abstract_resource_type,json=abstractResourceType" json:"abstract_resource_type,omitempty"`
	// The ID of the host making the request
	// to the transformer.
	HostId string `protobuf:"bytes,2,opt,name=host_id,json=hostId" json:"host_id,omitempty"`
	// Runtime configuration for the current environment
	// specific to the current transformer.
	Context *TransformerContext `protobuf:"bytes,3,opt,name=context" json:"context,omitempty"`
	// contains filtered or unexported fields
}

AbstractResourceRequest is the request input for general abstract resource type requests that only require a resource type and the current context.

func (*AbstractResourceRequest) Descriptor deprecated

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

Deprecated: Use AbstractResourceRequest.ProtoReflect.Descriptor instead.

func (*AbstractResourceRequest) GetAbstractResourceType

func (x *AbstractResourceRequest) GetAbstractResourceType() *sharedtypesv1.ResourceType

func (*AbstractResourceRequest) GetContext

func (*AbstractResourceRequest) GetHostId

func (x *AbstractResourceRequest) GetHostId() string

func (*AbstractResourceRequest) ProtoMessage

func (*AbstractResourceRequest) ProtoMessage()

func (*AbstractResourceRequest) ProtoReflect

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

func (*AbstractResourceRequest) Reset

func (x *AbstractResourceRequest) Reset()

func (*AbstractResourceRequest) String

func (x *AbstractResourceRequest) String() string

type AbstractResourceSpecDefinitionResponse

type AbstractResourceSpecDefinitionResponse struct {

	// Types that are valid to be assigned to Response:
	//
	//	*AbstractResourceSpecDefinitionResponse_SpecDefinition
	//	*AbstractResourceSpecDefinitionResponse_ErrorResponse
	Response isAbstractResourceSpecDefinitionResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

AbstractResourceSpecDefinitionResponse is the response containing the spec definition for a given abstract resource type.

func (*AbstractResourceSpecDefinitionResponse) Descriptor deprecated

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

Deprecated: Use AbstractResourceSpecDefinitionResponse.ProtoReflect.Descriptor instead.

func (*AbstractResourceSpecDefinitionResponse) GetErrorResponse

func (*AbstractResourceSpecDefinitionResponse) GetResponse

func (x *AbstractResourceSpecDefinitionResponse) GetResponse() isAbstractResourceSpecDefinitionResponse_Response

func (*AbstractResourceSpecDefinitionResponse) GetSpecDefinition

func (*AbstractResourceSpecDefinitionResponse) ProtoMessage

func (*AbstractResourceSpecDefinitionResponse) ProtoReflect

func (*AbstractResourceSpecDefinitionResponse) Reset

func (*AbstractResourceSpecDefinitionResponse) String

type AbstractResourceSpecDefinitionResponse_ErrorResponse

type AbstractResourceSpecDefinitionResponse_ErrorResponse struct {
	ErrorResponse *sharedtypesv1.ErrorResponse `protobuf:"bytes,2,opt,name=error_response,json=errorResponse,oneof"`
}

type AbstractResourceSpecDefinitionResponse_SpecDefinition

type AbstractResourceSpecDefinitionResponse_SpecDefinition struct {
	SpecDefinition *sharedtypesv1.ResourceSpecDefinition `protobuf:"bytes,1,opt,name=spec_definition,json=specDefinition,oneof"`
}

type AbstractResourceTypes

type AbstractResourceTypes struct {
	ResourceTypes []*sharedtypesv1.ResourceType `protobuf:"bytes,1,rep,name=resource_types,json=resourceTypes" json:"resource_types,omitempty"`
	// contains filtered or unexported fields
}

AbstractResourceTypes holds a list of resource types that are implemented by the transformer.

func (*AbstractResourceTypes) Descriptor deprecated

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

Deprecated: Use AbstractResourceTypes.ProtoReflect.Descriptor instead.

func (*AbstractResourceTypes) GetResourceTypes

func (x *AbstractResourceTypes) GetResourceTypes() []*sharedtypesv1.ResourceType

func (*AbstractResourceTypes) ProtoMessage

func (*AbstractResourceTypes) ProtoMessage()

func (*AbstractResourceTypes) ProtoReflect

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

func (*AbstractResourceTypes) Reset

func (x *AbstractResourceTypes) Reset()

func (*AbstractResourceTypes) String

func (x *AbstractResourceTypes) String() string

type AbstractResourceTypesResponse

type AbstractResourceTypesResponse struct {

	// Types that are valid to be assigned to Response:
	//
	//	*AbstractResourceTypesResponse_AbstractResourceTypes
	//	*AbstractResourceTypesResponse_ErrorResponse
	Response isAbstractResourceTypesResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

AbstractResourceTypesResponse contains the response for requesting a list of all the abstract resource types that are implemented by the transformer.

func (*AbstractResourceTypesResponse) Descriptor deprecated

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

Deprecated: Use AbstractResourceTypesResponse.ProtoReflect.Descriptor instead.

func (*AbstractResourceTypesResponse) GetAbstractResourceTypes

func (x *AbstractResourceTypesResponse) GetAbstractResourceTypes() *AbstractResourceTypes

func (*AbstractResourceTypesResponse) GetErrorResponse

func (*AbstractResourceTypesResponse) GetResponse

func (x *AbstractResourceTypesResponse) GetResponse() isAbstractResourceTypesResponse_Response

func (*AbstractResourceTypesResponse) ProtoMessage

func (*AbstractResourceTypesResponse) ProtoMessage()

func (*AbstractResourceTypesResponse) ProtoReflect

func (*AbstractResourceTypesResponse) Reset

func (x *AbstractResourceTypesResponse) Reset()

func (*AbstractResourceTypesResponse) String

type AbstractResourceTypesResponse_AbstractResourceTypes

type AbstractResourceTypesResponse_AbstractResourceTypes struct {
	AbstractResourceTypes *AbstractResourceTypes `protobuf:"bytes,1,opt,name=abstract_resource_types,json=abstractResourceTypes,oneof"`
}

type AbstractResourceTypesResponse_ErrorResponse

type AbstractResourceTypesResponse_ErrorResponse struct {
	ErrorResponse *sharedtypesv1.ErrorResponse `protobuf:"bytes,2,opt,name=error_response,json=errorResponse,oneof"`
}

type BlueprintTransformRequest

type BlueprintTransformRequest struct {

	// The blueprint that should be transformed.
	InputBlueprint *schemapb.Blueprint `protobuf:"bytes,1,opt,name=input_blueprint,json=inputBlueprint" json:"input_blueprint,omitempty"`
	// The ID of the host making the request
	// to the transformer.
	HostId string `protobuf:"bytes,2,opt,name=host_id,json=hostId" json:"host_id,omitempty"`
	// Runtime configuration for the current environment
	// specific to the current transformer.
	Context *TransformerContext `protobuf:"bytes,3,opt,name=context" json:"context,omitempty"`
	// contains filtered or unexported fields
}

BlueprintTransformRequest is the request for transforming a blueprint.

func (*BlueprintTransformRequest) Descriptor deprecated

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

Deprecated: Use BlueprintTransformRequest.ProtoReflect.Descriptor instead.

func (*BlueprintTransformRequest) GetContext

func (*BlueprintTransformRequest) GetHostId

func (x *BlueprintTransformRequest) GetHostId() string

func (*BlueprintTransformRequest) GetInputBlueprint

func (x *BlueprintTransformRequest) GetInputBlueprint() *schemapb.Blueprint

func (*BlueprintTransformRequest) ProtoMessage

func (*BlueprintTransformRequest) ProtoMessage()

func (*BlueprintTransformRequest) ProtoReflect

func (*BlueprintTransformRequest) Reset

func (x *BlueprintTransformRequest) Reset()

func (*BlueprintTransformRequest) String

func (x *BlueprintTransformRequest) String() string

type BlueprintTransformResponse

type BlueprintTransformResponse struct {

	// Types that are valid to be assigned to Response:
	//
	//	*BlueprintTransformResponse_TransformedBlueprint
	//	*BlueprintTransformResponse_ErrorResponse
	Response isBlueprintTransformResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

BlueprintTransformResponse is the response for transforming a blueprint.

func (*BlueprintTransformResponse) Descriptor deprecated

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

Deprecated: Use BlueprintTransformResponse.ProtoReflect.Descriptor instead.

func (*BlueprintTransformResponse) GetErrorResponse

func (*BlueprintTransformResponse) GetResponse

func (x *BlueprintTransformResponse) GetResponse() isBlueprintTransformResponse_Response

func (*BlueprintTransformResponse) GetTransformedBlueprint

func (x *BlueprintTransformResponse) GetTransformedBlueprint() *schemapb.Blueprint

func (*BlueprintTransformResponse) ProtoMessage

func (*BlueprintTransformResponse) ProtoMessage()

func (*BlueprintTransformResponse) ProtoReflect

func (*BlueprintTransformResponse) Reset

func (x *BlueprintTransformResponse) Reset()

func (*BlueprintTransformResponse) String

func (x *BlueprintTransformResponse) String() string

type BlueprintTransformResponse_ErrorResponse

type BlueprintTransformResponse_ErrorResponse struct {
	// An error response if the transformation failed.
	ErrorResponse *sharedtypesv1.ErrorResponse `protobuf:"bytes,2,opt,name=error_response,json=errorResponse,oneof"`
}

type BlueprintTransformResponse_TransformedBlueprint

type BlueprintTransformResponse_TransformedBlueprint struct {
	// The transformed blueprint.
	TransformedBlueprint *schemapb.Blueprint `protobuf:"bytes,1,opt,name=transformed_blueprint,json=transformedBlueprint,oneof"`
}

type CanAbstractResourceLinkToResponse

type CanAbstractResourceLinkToResponse struct {

	// Types that are valid to be assigned to Response:
	//
	//	*CanAbstractResourceLinkToResponse_ResourceTypes
	//	*CanAbstractResourceLinkToResponse_ErrorResponse
	Response isCanAbstractResourceLinkToResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

CanAbstractResourceLinkToResponse is the response for a request to get all the resource types that a given abstract resource type can link to.

func (*CanAbstractResourceLinkToResponse) Descriptor deprecated

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

Deprecated: Use CanAbstractResourceLinkToResponse.ProtoReflect.Descriptor instead.

func (*CanAbstractResourceLinkToResponse) GetErrorResponse

func (*CanAbstractResourceLinkToResponse) GetResourceTypes

func (*CanAbstractResourceLinkToResponse) GetResponse

func (x *CanAbstractResourceLinkToResponse) GetResponse() isCanAbstractResourceLinkToResponse_Response

func (*CanAbstractResourceLinkToResponse) ProtoMessage

func (*CanAbstractResourceLinkToResponse) ProtoMessage()

func (*CanAbstractResourceLinkToResponse) ProtoReflect

func (*CanAbstractResourceLinkToResponse) Reset

func (*CanAbstractResourceLinkToResponse) String

type CanAbstractResourceLinkToResponse_ErrorResponse

type CanAbstractResourceLinkToResponse_ErrorResponse struct {
	ErrorResponse *sharedtypesv1.ErrorResponse `protobuf:"bytes,2,opt,name=error_response,json=errorResponse,oneof"`
}

type CanAbstractResourceLinkToResponse_ResourceTypes

type CanAbstractResourceLinkToResponse_ResourceTypes struct {
	ResourceTypes *sharedtypesv1.CanLinkTo `protobuf:"bytes,1,opt,name=resource_types,json=resourceTypes,oneof"`
}

type CustomValidateAbstractResourceCompleteResponse

type CustomValidateAbstractResourceCompleteResponse struct {
	Diagnostics []*sharedtypesv1.Diagnostic `protobuf:"bytes,1,rep,name=diagnostics" json:"diagnostics,omitempty"`
	// contains filtered or unexported fields
}

CustomValidateAbstractResourceCompleteResponse is the response returned by the transformer plugin when custom resource validation has been completed.

func (*CustomValidateAbstractResourceCompleteResponse) Descriptor deprecated

Deprecated: Use CustomValidateAbstractResourceCompleteResponse.ProtoReflect.Descriptor instead.

func (*CustomValidateAbstractResourceCompleteResponse) GetDiagnostics

func (*CustomValidateAbstractResourceCompleteResponse) ProtoMessage

func (*CustomValidateAbstractResourceCompleteResponse) ProtoReflect

func (*CustomValidateAbstractResourceCompleteResponse) Reset

func (*CustomValidateAbstractResourceCompleteResponse) String

type CustomValidateAbstractResourceRequest

type CustomValidateAbstractResourceRequest struct {

	// The type of resource being validate.
	AbstractResourceType *sharedtypesv1.ResourceType `protobuf:"bytes,1,opt,name=abstract_resource_type,json=abstractResourceType" json:"abstract_resource_type,omitempty"`
	// The ID of the host making the request
	// to the transformer.
	HostId string `protobuf:"bytes,2,opt,name=host_id,json=hostId" json:"host_id,omitempty"`
	// The resource schema as parsed within a blueprint.
	SchemaResource *schemapb.Resource `protobuf:"bytes,3,opt,name=schema_resource,json=schemaResource" json:"schema_resource,omitempty"`
	// Runtime configuration for the current environment
	// specific to the current transformer.
	Context *TransformerContext `protobuf:"bytes,4,opt,name=context" json:"context,omitempty"`
	// contains filtered or unexported fields
}

CustomValidateAbstractResourceRequest is the request for custom abstract resource validation.

func (*CustomValidateAbstractResourceRequest) Descriptor deprecated

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

Deprecated: Use CustomValidateAbstractResourceRequest.ProtoReflect.Descriptor instead.

func (*CustomValidateAbstractResourceRequest) GetAbstractResourceType

func (*CustomValidateAbstractResourceRequest) GetContext

func (*CustomValidateAbstractResourceRequest) GetHostId

func (*CustomValidateAbstractResourceRequest) GetSchemaResource

func (*CustomValidateAbstractResourceRequest) ProtoMessage

func (*CustomValidateAbstractResourceRequest) ProtoMessage()

func (*CustomValidateAbstractResourceRequest) ProtoReflect

func (*CustomValidateAbstractResourceRequest) Reset

func (*CustomValidateAbstractResourceRequest) String

type CustomValidateAbstractResourceResponse

type CustomValidateAbstractResourceResponse struct {

	// Types that are valid to be assigned to Response:
	//
	//	*CustomValidateAbstractResourceResponse_CompleteResponse
	//	*CustomValidateAbstractResourceResponse_ErrorResponse
	Response isCustomValidateAbstractResourceResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

CustomValidateAbstractResourceResponse is the response for custom abstract resource validation, can be a validation complete response or an error response.

func (*CustomValidateAbstractResourceResponse) Descriptor deprecated

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

Deprecated: Use CustomValidateAbstractResourceResponse.ProtoReflect.Descriptor instead.

func (*CustomValidateAbstractResourceResponse) GetCompleteResponse

func (*CustomValidateAbstractResourceResponse) GetErrorResponse

func (*CustomValidateAbstractResourceResponse) GetResponse

func (x *CustomValidateAbstractResourceResponse) GetResponse() isCustomValidateAbstractResourceResponse_Response

func (*CustomValidateAbstractResourceResponse) ProtoMessage

func (*CustomValidateAbstractResourceResponse) ProtoReflect

func (*CustomValidateAbstractResourceResponse) Reset

func (*CustomValidateAbstractResourceResponse) String

type CustomValidateAbstractResourceResponse_CompleteResponse

type CustomValidateAbstractResourceResponse_CompleteResponse struct {
	CompleteResponse *CustomValidateAbstractResourceCompleteResponse `protobuf:"bytes,1,opt,name=complete_response,json=completeResponse,oneof"`
}

type CustomValidateAbstractResourceResponse_ErrorResponse

type CustomValidateAbstractResourceResponse_ErrorResponse struct {
	ErrorResponse *sharedtypesv1.ErrorResponse `protobuf:"bytes,2,opt,name=error_response,json=errorResponse,oneof"`
}

type IsAbstractResourceCommonTerminalResponse

type IsAbstractResourceCommonTerminalResponse struct {

	// Types that are valid to be assigned to Response:
	//
	//	*IsAbstractResourceCommonTerminalResponse_Data
	//	*IsAbstractResourceCommonTerminalResponse_ErrorResponse
	Response isIsAbstractResourceCommonTerminalResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

IsAbstractResourceCommonTerminalResponse is the response for a request to check if a given abstract resource type is expected to have a common use-case as a terminal resource.

func (*IsAbstractResourceCommonTerminalResponse) Descriptor deprecated

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

Deprecated: Use IsAbstractResourceCommonTerminalResponse.ProtoReflect.Descriptor instead.

func (*IsAbstractResourceCommonTerminalResponse) GetData

func (*IsAbstractResourceCommonTerminalResponse) GetErrorResponse

func (*IsAbstractResourceCommonTerminalResponse) GetResponse

func (x *IsAbstractResourceCommonTerminalResponse) GetResponse() isIsAbstractResourceCommonTerminalResponse_Response

func (*IsAbstractResourceCommonTerminalResponse) ProtoMessage

func (*IsAbstractResourceCommonTerminalResponse) ProtoReflect

func (*IsAbstractResourceCommonTerminalResponse) Reset

func (*IsAbstractResourceCommonTerminalResponse) String

type IsAbstractResourceCommonTerminalResponse_Data

type IsAbstractResourceCommonTerminalResponse_Data struct {
	Data *sharedtypesv1.ResourceCommonTerminalInfo `protobuf:"bytes,1,opt,name=data,oneof"`
}

type IsAbstractResourceCommonTerminalResponse_ErrorResponse

type IsAbstractResourceCommonTerminalResponse_ErrorResponse struct {
	ErrorResponse *sharedtypesv1.ErrorResponse `protobuf:"bytes,2,opt,name=error_response,json=errorResponse,oneof"`
}

type TransformNameInfo

type TransformNameInfo struct {
	TransformName string `protobuf:"bytes,1,opt,name=transform_name,json=transformName" json:"transform_name,omitempty"`
	// contains filtered or unexported fields
}

TransformNameInfo holds the name that is used in a blueprint to identify the transformer plugin.

func (*TransformNameInfo) Descriptor deprecated

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

Deprecated: Use TransformNameInfo.ProtoReflect.Descriptor instead.

func (*TransformNameInfo) GetTransformName

func (x *TransformNameInfo) GetTransformName() string

func (*TransformNameInfo) ProtoMessage

func (*TransformNameInfo) ProtoMessage()

func (*TransformNameInfo) ProtoReflect

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

func (*TransformNameInfo) Reset

func (x *TransformNameInfo) Reset()

func (*TransformNameInfo) String

func (x *TransformNameInfo) String() string

type TransformNameResponse

type TransformNameResponse struct {

	// Types that are valid to be assigned to Response:
	//
	//	*TransformNameResponse_NameInfo
	//	*TransformNameResponse_ErrorResponse
	Response isTransformNameResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

TransformNameResponse is the response for requesting the transform name that is the string that is used in a blueprint to identify the transformer plugin.

func (*TransformNameResponse) Descriptor deprecated

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

Deprecated: Use TransformNameResponse.ProtoReflect.Descriptor instead.

func (*TransformNameResponse) GetErrorResponse

func (x *TransformNameResponse) GetErrorResponse() *sharedtypesv1.ErrorResponse

func (*TransformNameResponse) GetNameInfo

func (x *TransformNameResponse) GetNameInfo() *TransformNameInfo

func (*TransformNameResponse) GetResponse

func (x *TransformNameResponse) GetResponse() isTransformNameResponse_Response

func (*TransformNameResponse) ProtoMessage

func (*TransformNameResponse) ProtoMessage()

func (*TransformNameResponse) ProtoReflect

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

func (*TransformNameResponse) Reset

func (x *TransformNameResponse) Reset()

func (*TransformNameResponse) String

func (x *TransformNameResponse) String() string

type TransformNameResponse_ErrorResponse

type TransformNameResponse_ErrorResponse struct {
	ErrorResponse *sharedtypesv1.ErrorResponse `protobuf:"bytes,2,opt,name=error_response,json=errorResponse,oneof"`
}

type TransformNameResponse_NameInfo

type TransformNameResponse_NameInfo struct {
	NameInfo *TransformNameInfo `protobuf:"bytes,1,opt,name=name_info,json=nameInfo,oneof"`
}

type TransformerClient

type TransformerClient interface {
	// GetTransformName returns the transform name of the transformer
	// that should be used in the `transform` section of a blueprint
	// to use this transformer plugin.
	GetTransformName(ctx context.Context, in *TransformerRequest, opts ...grpc.CallOption) (*TransformNameResponse, error)
	// ConfigDefinition retrieves a detailed definition of the configuration
	// that is required for the transformer.
	GetConfigDefinition(ctx context.Context, in *TransformerRequest, opts ...grpc.CallOption) (*sharedtypesv1.ConfigDefinitionResponse, error)
	// Transform a blueprint by expanding abstract resources into their
	// final form along with any other transformations that are required.
	Transform(ctx context.Context, in *BlueprintTransformRequest, opts ...grpc.CallOption) (*BlueprintTransformResponse, error)
	// ListAbstractResourceTypes returns a list of abstract resource types
	// that are supported by the transformer.
	ListAbstractResourceTypes(ctx context.Context, in *TransformerRequest, opts ...grpc.CallOption) (*AbstractResourceTypesResponse, error)
	// CustomValidateAbstractResource deals with carrying out custom validation for
	// an abstract resource that goes beyond the built-in resource spec validation.
	CustomValidateAbstractResource(ctx context.Context, in *CustomValidateAbstractResourceRequest, opts ...grpc.CallOption) (*CustomValidateAbstractResourceResponse, error)
	// GetAbstractResourceSpecDefinition retrieves the spec definition for an abstract resource,
	// this is used as the first line of validation for a resource in a blueprint
	// and is also useful for validating references to a resource instance
	// in a blueprint and for providing definitions for docs and tooling.
	// The spec defines both the schema for the resource spec fields that can be defined
	// by users in a blueprint and computed fields that are derived from the deployed
	// resource in the external provider (e.g. Lambda ARN in AWS).
	GetAbstractResourceSpecDefinition(ctx context.Context, in *AbstractResourceRequest, opts ...grpc.CallOption) (*AbstractResourceSpecDefinitionResponse, error)
	// CanAbstractResourceLinkTo produces a list of all the resource types
	// that the given abstract resource type can link to.
	CanAbstractResourceLinkTo(ctx context.Context, in *AbstractResourceRequest, opts ...grpc.CallOption) (*CanAbstractResourceLinkToResponse, error)
	// IsAbstractResourceCommonTerminal specifies whether the given abstract resource type is expected
	// to have a common use-case as a terminal resource that does not link out to other resources.
	// This is useful for providing warnings to users about their blueprints
	// without overloading them with warnings for all resources that don't have any outbound
	// links that could have.
	IsAbstractResourceCommonTerminal(ctx context.Context, in *AbstractResourceRequest, opts ...grpc.CallOption) (*IsAbstractResourceCommonTerminalResponse, error)
	// GetAbstractResourceType retrieves the type of an abstract resource in a blueprint spec
	// that can be used for documentation and tooling.
	// This allows callers to get a human-readable label for the already known
	// resource type.
	GetAbstractResourceType(ctx context.Context, in *AbstractResourceRequest, opts ...grpc.CallOption) (*sharedtypesv1.ResourceTypeResponse, error)
	// GetAbstractResourceTypeDescription retrieves the description for an abstract resource type
	// in a blueprint spec that can be used for documentation and tooling.
	// Markdown and plain text formats are supported.
	GetAbstractResourceTypeDescription(ctx context.Context, in *AbstractResourceRequest, opts ...grpc.CallOption) (*sharedtypesv1.TypeDescriptionResponse, error)
	// GetAbstractResourceExamples deals with retrieving a list of examples
	// for an abstract resource type in a blueprint spec that can be used
	// for documentation and tooling.
	// Markdown and plain text formats are supported.
	GetAbstractResourceExamples(ctx context.Context, in *AbstractResourceRequest, opts ...grpc.CallOption) (*sharedtypesv1.ExamplesResponse, error)
}

TransformerClient is the client API for Transformer 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.

Interface exported by a tranformer plugin server.

type TransformerContext

type TransformerContext struct {

	// Configuration parameters specifically for the transformer.
	TransformerConfigVariables map[string]*schemapb.ScalarValue `` /* 208-byte string literal not displayed */
	// Context-wide variables for the current deploy engine run.
	ContextVariables map[string]*schemapb.ScalarValue `` /* 176-byte string literal not displayed */
	// contains filtered or unexported fields
}

TransformerContext holds the environment configuration for the current transformer.

func (*TransformerContext) Descriptor deprecated

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

Deprecated: Use TransformerContext.ProtoReflect.Descriptor instead.

func (*TransformerContext) GetContextVariables

func (x *TransformerContext) GetContextVariables() map[string]*schemapb.ScalarValue

func (*TransformerContext) GetTransformerConfigVariables

func (x *TransformerContext) GetTransformerConfigVariables() map[string]*schemapb.ScalarValue

func (*TransformerContext) ProtoMessage

func (*TransformerContext) ProtoMessage()

func (*TransformerContext) ProtoReflect

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

func (*TransformerContext) Reset

func (x *TransformerContext) Reset()

func (*TransformerContext) String

func (x *TransformerContext) String() string

type TransformerRequest

type TransformerRequest struct {

	// The ID of the host making the request
	// to the transformer.
	HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId" json:"host_id,omitempty"`
	// contains filtered or unexported fields
}

TransformerRequest is the request input for general transformer requests that only require a host ID.

func (*TransformerRequest) Descriptor deprecated

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

Deprecated: Use TransformerRequest.ProtoReflect.Descriptor instead.

func (*TransformerRequest) GetHostId

func (x *TransformerRequest) GetHostId() string

func (*TransformerRequest) ProtoMessage

func (*TransformerRequest) ProtoMessage()

func (*TransformerRequest) ProtoReflect

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

func (*TransformerRequest) Reset

func (x *TransformerRequest) Reset()

func (*TransformerRequest) String

func (x *TransformerRequest) String() string

type TransformerServer

type TransformerServer interface {
	// GetTransformName returns the transform name of the transformer
	// that should be used in the `transform` section of a blueprint
	// to use this transformer plugin.
	GetTransformName(context.Context, *TransformerRequest) (*TransformNameResponse, error)
	// ConfigDefinition retrieves a detailed definition of the configuration
	// that is required for the transformer.
	GetConfigDefinition(context.Context, *TransformerRequest) (*sharedtypesv1.ConfigDefinitionResponse, error)
	// Transform a blueprint by expanding abstract resources into their
	// final form along with any other transformations that are required.
	Transform(context.Context, *BlueprintTransformRequest) (*BlueprintTransformResponse, error)
	// ListAbstractResourceTypes returns a list of abstract resource types
	// that are supported by the transformer.
	ListAbstractResourceTypes(context.Context, *TransformerRequest) (*AbstractResourceTypesResponse, error)
	// CustomValidateAbstractResource deals with carrying out custom validation for
	// an abstract resource that goes beyond the built-in resource spec validation.
	CustomValidateAbstractResource(context.Context, *CustomValidateAbstractResourceRequest) (*CustomValidateAbstractResourceResponse, error)
	// GetAbstractResourceSpecDefinition retrieves the spec definition for an abstract resource,
	// this is used as the first line of validation for a resource in a blueprint
	// and is also useful for validating references to a resource instance
	// in a blueprint and for providing definitions for docs and tooling.
	// The spec defines both the schema for the resource spec fields that can be defined
	// by users in a blueprint and computed fields that are derived from the deployed
	// resource in the external provider (e.g. Lambda ARN in AWS).
	GetAbstractResourceSpecDefinition(context.Context, *AbstractResourceRequest) (*AbstractResourceSpecDefinitionResponse, error)
	// CanAbstractResourceLinkTo produces a list of all the resource types
	// that the given abstract resource type can link to.
	CanAbstractResourceLinkTo(context.Context, *AbstractResourceRequest) (*CanAbstractResourceLinkToResponse, error)
	// IsAbstractResourceCommonTerminal specifies whether the given abstract resource type is expected
	// to have a common use-case as a terminal resource that does not link out to other resources.
	// This is useful for providing warnings to users about their blueprints
	// without overloading them with warnings for all resources that don't have any outbound
	// links that could have.
	IsAbstractResourceCommonTerminal(context.Context, *AbstractResourceRequest) (*IsAbstractResourceCommonTerminalResponse, error)
	// GetAbstractResourceType retrieves the type of an abstract resource in a blueprint spec
	// that can be used for documentation and tooling.
	// This allows callers to get a human-readable label for the already known
	// resource type.
	GetAbstractResourceType(context.Context, *AbstractResourceRequest) (*sharedtypesv1.ResourceTypeResponse, error)
	// GetAbstractResourceTypeDescription retrieves the description for an abstract resource type
	// in a blueprint spec that can be used for documentation and tooling.
	// Markdown and plain text formats are supported.
	GetAbstractResourceTypeDescription(context.Context, *AbstractResourceRequest) (*sharedtypesv1.TypeDescriptionResponse, error)
	// GetAbstractResourceExamples deals with retrieving a list of examples
	// for an abstract resource type in a blueprint spec that can be used
	// for documentation and tooling.
	// Markdown and plain text formats are supported.
	GetAbstractResourceExamples(context.Context, *AbstractResourceRequest) (*sharedtypesv1.ExamplesResponse, error)
	// contains filtered or unexported methods
}

TransformerServer is the server API for Transformer service. All implementations must embed UnimplementedTransformerServer for forward compatibility.

Interface exported by a tranformer plugin server.

type UnimplementedTransformerServer

type UnimplementedTransformerServer struct{}

UnimplementedTransformerServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedTransformerServer) GetAbstractResourceExamples

func (UnimplementedTransformerServer) GetAbstractResourceTypeDescription

func (UnimplementedTransformerServer) GetTransformName

func (UnimplementedTransformerServer) ListAbstractResourceTypes

type UnsafeTransformerServer

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

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

Jump to

Keyboard shortcuts

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