Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterProviderServer(s grpc.ServiceRegistrar, srv ProviderServer)
- func WrapProviderClient(client ProviderClient) provider.Provider
- type BlueprintParams
- func (*BlueprintParams) Descriptor() ([]byte, []int)deprecated
- func (x *BlueprintParams) GetBlueprintVariables() map[string]*schemapb.ScalarValue
- func (x *BlueprintParams) GetContextVariables() map[string]*schemapb.ScalarValue
- func (x *BlueprintParams) GetProviderConfig() map[string]*schemapb.ScalarValue
- func (*BlueprintParams) ProtoMessage()
- func (x *BlueprintParams) ProtoReflect() protoreflect.Message
- func (x *BlueprintParams) Reset()
- func (x *BlueprintParams) String() string
- type CanLinkToResponse
- func (*CanLinkToResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CanLinkToResponse) GetResourceTypes() []*ResourceType
- func (*CanLinkToResponse) ProtoMessage()
- func (x *CanLinkToResponse) ProtoReflect() protoreflect.Message
- func (x *CanLinkToResponse) Reset()
- func (x *CanLinkToResponse) String() string
- type ColumnAccuracy
- func (ColumnAccuracy) Descriptor() protoreflect.EnumDescriptor
- func (x ColumnAccuracy) Enum() *ColumnAccuracy
- func (ColumnAccuracy) EnumDescriptor() ([]byte, []int)deprecated
- func (x ColumnAccuracy) Number() protoreflect.EnumNumber
- func (x ColumnAccuracy) String() string
- func (ColumnAccuracy) Type() protoreflect.EnumType
- type Diagnostic
- func (*Diagnostic) Descriptor() ([]byte, []int)deprecated
- func (x *Diagnostic) GetLevel() DiagnosticLevel
- func (x *Diagnostic) GetMessage() string
- func (x *Diagnostic) GetRange() *DiagnosticRange
- func (*Diagnostic) ProtoMessage()
- func (x *Diagnostic) ProtoReflect() protoreflect.Message
- func (x *Diagnostic) Reset()
- func (x *Diagnostic) String() string
- type DiagnosticLevel
- func (DiagnosticLevel) Descriptor() protoreflect.EnumDescriptor
- func (x DiagnosticLevel) Enum() *DiagnosticLevel
- func (DiagnosticLevel) EnumDescriptor() ([]byte, []int)deprecated
- func (x DiagnosticLevel) Number() protoreflect.EnumNumber
- func (x DiagnosticLevel) String() string
- func (DiagnosticLevel) Type() protoreflect.EnumType
- type DiagnosticRange
- func (*DiagnosticRange) Descriptor() ([]byte, []int)deprecated
- func (x *DiagnosticRange) GetColumnAccuracy() ColumnAccuracy
- func (x *DiagnosticRange) GetEnd() *SourceMeta
- func (x *DiagnosticRange) GetStart() *SourceMeta
- func (*DiagnosticRange) ProtoMessage()
- func (x *DiagnosticRange) ProtoReflect() protoreflect.Message
- func (x *DiagnosticRange) Reset()
- func (x *DiagnosticRange) String() string
- type ErrorCode
- type ErrorResponse
- func (*ErrorResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ErrorResponse) GetCode() ErrorCode
- func (x *ErrorResponse) GetDetails() *anypb.Any
- func (x *ErrorResponse) GetMessage() string
- func (*ErrorResponse) ProtoMessage()
- func (x *ErrorResponse) ProtoReflect() protoreflect.Message
- func (x *ErrorResponse) Reset()
- func (x *ErrorResponse) String() string
- type Namespace
- type ProviderClient
- type ProviderServer
- type ResourceInfo
- func (*ResourceInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceInfo) GetInstanceId() string
- func (x *ResourceInfo) GetResourceId() string
- func (x *ResourceInfo) GetRevisionId() string
- func (x *ResourceInfo) GetSchemaResource() *schemapb.Resource
- func (*ResourceInfo) ProtoMessage()
- func (x *ResourceInfo) ProtoReflect() protoreflect.Message
- func (x *ResourceInfo) Reset()
- func (x *ResourceInfo) String() string
- type ResourceType
- type Server
- type ServerOption
- type SourceMeta
- type UnimplementedProviderServer
- func (UnimplementedProviderServer) CanLinkTo(context.Context, *ResourceType) (*CanLinkToResponse, error)
- func (UnimplementedProviderServer) GetNamespace(context.Context, *emptypb.Empty) (*Namespace, error)
- func (UnimplementedProviderServer) ValidateResource(context.Context, *ValidateResourceRequest) (*ValidateResourceResponse, error)
- type UnsafeProviderServer
- type ValidateResourceCompleteResponse
- func (*ValidateResourceCompleteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ValidateResourceCompleteResponse) GetDiagnostics() []*Diagnostic
- func (*ValidateResourceCompleteResponse) ProtoMessage()
- func (x *ValidateResourceCompleteResponse) ProtoReflect() protoreflect.Message
- func (x *ValidateResourceCompleteResponse) Reset()
- func (x *ValidateResourceCompleteResponse) String() string
- type ValidateResourceRequest
- func (*ValidateResourceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ValidateResourceRequest) GetBlueprintParams() *BlueprintParams
- func (x *ValidateResourceRequest) GetSchemaResource() *schemapb.Resource
- func (*ValidateResourceRequest) ProtoMessage()
- func (x *ValidateResourceRequest) ProtoReflect() protoreflect.Message
- func (x *ValidateResourceRequest) Reset()
- func (x *ValidateResourceRequest) String() string
- type ValidateResourceResponse
- func (*ValidateResourceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ValidateResourceResponse) GetCompleteResponse() *ValidateResourceCompleteResponse
- func (x *ValidateResourceResponse) GetErrorResponse() *ErrorResponse
- func (m *ValidateResourceResponse) GetResponse() isValidateResourceResponse_Response
- func (*ValidateResourceResponse) ProtoMessage()
- func (x *ValidateResourceResponse) ProtoReflect() protoreflect.Message
- func (x *ValidateResourceResponse) Reset()
- func (x *ValidateResourceResponse) String() string
- type ValidateResourceResponse_CompleteResponse
- type ValidateResourceResponse_ErrorResponse
Constants ¶
const ( Provider_GetNamespace_FullMethodName = "/providerserverv1.Provider/GetNamespace" Provider_ValidateResource_FullMethodName = "/providerserverv1.Provider/ValidateResource" Provider_CanLinkTo_FullMethodName = "/providerserverv1.Provider/CanLinkTo" )
Variables ¶
var ( DiagnosticLevel_name = map[int32]string{ 0: "DIAGNOSTIC_LEVEL_NONE", 1: "DIAGNOSTIC_LEVEL_ERROR", 2: "DIAGNOSTIC_LEVEL_WARNING", 3: "DIAGNOSTIC_LEVEL_INFO", } DiagnosticLevel_value = map[string]int32{ "DIAGNOSTIC_LEVEL_NONE": 0, "DIAGNOSTIC_LEVEL_ERROR": 1, "DIAGNOSTIC_LEVEL_WARNING": 2, "DIAGNOSTIC_LEVEL_INFO": 3, } )
Enum value maps for DiagnosticLevel.
var ( ColumnAccuracy_name = map[int32]string{ 0: "COLUMN_ACCURACY_NONE", 1: "COLUMN_ACCURACY_EXACT", 2: "COLUMN_ACCURACY_APPROXIMATE", } ColumnAccuracy_value = map[string]int32{ "COLUMN_ACCURACY_NONE": 0, "COLUMN_ACCURACY_EXACT": 1, "COLUMN_ACCURACY_APPROXIMATE": 2, } )
Enum value maps for ColumnAccuracy.
var ( ErrorCode_name = map[int32]string{ 0: "ERROR_CODE_UNEXPECTED", 1: "ERROR_CODE_TRANSIENT", 2: "ERROR_CODE_BAD_INPUT", } ErrorCode_value = map[string]int32{ "ERROR_CODE_UNEXPECTED": 0, "ERROR_CODE_TRANSIENT": 1, "ERROR_CODE_BAD_INPUT": 2, } )
Enum value maps for ErrorCode.
var File_build_engine_plugin_providerserverv1_provider_proto protoreflect.FileDescriptor
var Provider_ServiceDesc = grpc.ServiceDesc{ ServiceName: "providerserverv1.Provider", HandlerType: (*ProviderServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetNamespace", Handler: _Provider_GetNamespace_Handler, }, { MethodName: "ValidateResource", Handler: _Provider_ValidateResource_Handler, }, { MethodName: "CanLinkTo", Handler: _Provider_CanLinkTo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "deploy-engine/plugin/providerserverv1/provider.proto", }
Provider_ServiceDesc is the grpc.ServiceDesc for Provider service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProviderServer ¶
func RegisterProviderServer(s grpc.ServiceRegistrar, srv ProviderServer)
func WrapProviderClient ¶
func WrapProviderClient(client ProviderClient) provider.Provider
WrapProviderClient wraps a provider plugin v1 ProviderClient in a blueprint framework Provider to allow the deploy engine to interact with the provider in a way that is compatible with the blueprint framework and unaware that the provider is backed by a gRPC server plugin.
Types ¶
type BlueprintParams ¶
type BlueprintParams struct { // Configuration parameters specifically for the provider. ProviderConfig map[string]*schemapb.ScalarValue `` /* 170-byte string literal not displayed */ // Context-wide variable for the current deploy engine run. ContextVariables map[string]*schemapb.ScalarValue `` /* 176-byte string literal not displayed */ // Variables for the current blueprint. BlueprintVariables map[string]*schemapb.ScalarValue `` /* 182-byte string literal not displayed */ // contains filtered or unexported fields }
BlueprintParams holds the runtime parameters for the current blueprint, provider and context.
func (*BlueprintParams) Descriptor
deprecated
func (*BlueprintParams) Descriptor() ([]byte, []int)
Deprecated: Use BlueprintParams.ProtoReflect.Descriptor instead.
func (*BlueprintParams) GetBlueprintVariables ¶
func (x *BlueprintParams) GetBlueprintVariables() map[string]*schemapb.ScalarValue
func (*BlueprintParams) GetContextVariables ¶
func (x *BlueprintParams) GetContextVariables() map[string]*schemapb.ScalarValue
func (*BlueprintParams) GetProviderConfig ¶
func (x *BlueprintParams) GetProviderConfig() map[string]*schemapb.ScalarValue
func (*BlueprintParams) ProtoMessage ¶
func (*BlueprintParams) ProtoMessage()
func (*BlueprintParams) ProtoReflect ¶
func (x *BlueprintParams) ProtoReflect() protoreflect.Message
func (*BlueprintParams) Reset ¶
func (x *BlueprintParams) Reset()
func (*BlueprintParams) String ¶
func (x *BlueprintParams) String() string
type CanLinkToResponse ¶
type CanLinkToResponse struct { ResourceTypes []*ResourceType `protobuf:"bytes,1,rep,name=resource_types,json=resourceTypes" json:"resource_types,omitempty"` // contains filtered or unexported fields }
CanLinkToResponse is the response for a request to get all the resource types that a given resource type can link to.
func (*CanLinkToResponse) Descriptor
deprecated
func (*CanLinkToResponse) Descriptor() ([]byte, []int)
Deprecated: Use CanLinkToResponse.ProtoReflect.Descriptor instead.
func (*CanLinkToResponse) GetResourceTypes ¶
func (x *CanLinkToResponse) GetResourceTypes() []*ResourceType
func (*CanLinkToResponse) ProtoMessage ¶
func (*CanLinkToResponse) ProtoMessage()
func (*CanLinkToResponse) ProtoReflect ¶
func (x *CanLinkToResponse) ProtoReflect() protoreflect.Message
func (*CanLinkToResponse) Reset ¶
func (x *CanLinkToResponse) Reset()
func (*CanLinkToResponse) String ¶
func (x *CanLinkToResponse) String() string
type ColumnAccuracy ¶
type ColumnAccuracy int32
DiagnosticLevel is an enum for the level of a diagnostic.
const ( // protobuf enums must have a zero value, so we need a NONE value // here. // ColumnAccuracy starts at 1 as per the Blueprint framework. ColumnAccuracy_COLUMN_ACCURACY_NONE ColumnAccuracy = 0 // Indicates that the column is accurate. ColumnAccuracy_COLUMN_ACCURACY_EXACT ColumnAccuracy = 1 // Indicates that the column is approximate. ColumnAccuracy_COLUMN_ACCURACY_APPROXIMATE ColumnAccuracy = 2 )
func (ColumnAccuracy) Descriptor ¶
func (ColumnAccuracy) Descriptor() protoreflect.EnumDescriptor
func (ColumnAccuracy) Enum ¶
func (x ColumnAccuracy) Enum() *ColumnAccuracy
func (ColumnAccuracy) EnumDescriptor
deprecated
func (ColumnAccuracy) EnumDescriptor() ([]byte, []int)
Deprecated: Use ColumnAccuracy.Descriptor instead.
func (ColumnAccuracy) Number ¶
func (x ColumnAccuracy) Number() protoreflect.EnumNumber
func (ColumnAccuracy) String ¶
func (x ColumnAccuracy) String() string
func (ColumnAccuracy) Type ¶
func (ColumnAccuracy) Type() protoreflect.EnumType
type Diagnostic ¶
type Diagnostic struct { // The level of this diagnostic. Level DiagnosticLevel `protobuf:"varint,1,opt,name=level,enum=providerserverv1.DiagnosticLevel" json:"level,omitempty"` // The message of this diagnostic. Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` // An optional text range in the source blueprint // that the diagnostic applies to. // This will only be present when the source blueprint // is YAML and the plugin can extract this information // from the resource schema. Range *DiagnosticRange `protobuf:"bytes,3,opt,name=range" json:"range,omitempty"` // contains filtered or unexported fields }
Diagnostic provides error, warning or informational diagnostic for a blueprint.
func (*Diagnostic) Descriptor
deprecated
func (*Diagnostic) Descriptor() ([]byte, []int)
Deprecated: Use Diagnostic.ProtoReflect.Descriptor instead.
func (*Diagnostic) GetLevel ¶
func (x *Diagnostic) GetLevel() DiagnosticLevel
func (*Diagnostic) GetMessage ¶
func (x *Diagnostic) GetMessage() string
func (*Diagnostic) GetRange ¶
func (x *Diagnostic) GetRange() *DiagnosticRange
func (*Diagnostic) ProtoMessage ¶
func (*Diagnostic) ProtoMessage()
func (*Diagnostic) ProtoReflect ¶
func (x *Diagnostic) ProtoReflect() protoreflect.Message
func (*Diagnostic) Reset ¶
func (x *Diagnostic) Reset()
func (*Diagnostic) String ¶
func (x *Diagnostic) String() string
type DiagnosticLevel ¶
type DiagnosticLevel int32
DiagnosticLevel is an enum for the level of a diagnostic.
const ( // protobuf enums must have a zero value, so we need a NONE value // here. // DiagnosticLevel starts at 1 as per the Blueprint framework. DiagnosticLevel_DIAGNOSTIC_LEVEL_NONE DiagnosticLevel = 0 // Indicates an error diagnostic. DiagnosticLevel_DIAGNOSTIC_LEVEL_ERROR DiagnosticLevel = 1 // Indicates a warning diagnostic. DiagnosticLevel_DIAGNOSTIC_LEVEL_WARNING DiagnosticLevel = 2 // Indicates an informational diagnostic. DiagnosticLevel_DIAGNOSTIC_LEVEL_INFO DiagnosticLevel = 3 )
func (DiagnosticLevel) Descriptor ¶
func (DiagnosticLevel) Descriptor() protoreflect.EnumDescriptor
func (DiagnosticLevel) Enum ¶
func (x DiagnosticLevel) Enum() *DiagnosticLevel
func (DiagnosticLevel) EnumDescriptor
deprecated
func (DiagnosticLevel) EnumDescriptor() ([]byte, []int)
Deprecated: Use DiagnosticLevel.Descriptor instead.
func (DiagnosticLevel) Number ¶
func (x DiagnosticLevel) Number() protoreflect.EnumNumber
func (DiagnosticLevel) String ¶
func (x DiagnosticLevel) String() string
func (DiagnosticLevel) Type ¶
func (DiagnosticLevel) Type() protoreflect.EnumType
type DiagnosticRange ¶
type DiagnosticRange struct { Start *SourceMeta `protobuf:"bytes,1,opt,name=start" json:"start,omitempty"` End *SourceMeta `protobuf:"bytes,2,opt,name=end" json:"end,omitempty"` ColumnAccuracy ColumnAccuracy `` /* 134-byte string literal not displayed */ // contains filtered or unexported fields }
A range in the source blueprint that a diagnostic applies to. This will only be used for source formats that allow position tracking (i.e. YAML source documents).
func (*DiagnosticRange) Descriptor
deprecated
func (*DiagnosticRange) Descriptor() ([]byte, []int)
Deprecated: Use DiagnosticRange.ProtoReflect.Descriptor instead.
func (*DiagnosticRange) GetColumnAccuracy ¶
func (x *DiagnosticRange) GetColumnAccuracy() ColumnAccuracy
func (*DiagnosticRange) GetEnd ¶
func (x *DiagnosticRange) GetEnd() *SourceMeta
func (*DiagnosticRange) GetStart ¶
func (x *DiagnosticRange) GetStart() *SourceMeta
func (*DiagnosticRange) ProtoMessage ¶
func (*DiagnosticRange) ProtoMessage()
func (*DiagnosticRange) ProtoReflect ¶
func (x *DiagnosticRange) ProtoReflect() protoreflect.Message
func (*DiagnosticRange) Reset ¶
func (x *DiagnosticRange) Reset()
func (*DiagnosticRange) String ¶
func (x *DiagnosticRange) String() string
type ErrorCode ¶
type ErrorCode int32
ErrorCode is an enum for a range of error codes for provider plugins.
const ( // Indicates that the error is unexpected and the // action cannot be retried by the deploy engine // host. // This will not crash the deploy engine host but // will stop the current action (e.g. deploying a blueprint). ErrorCode_ERROR_CODE_UNEXPECTED ErrorCode = 0 // Indicates that the failure is transient and the // action can be retried by the deploy engine // host based on the deploy engine host's retry policy. ErrorCode_ERROR_CODE_TRANSIENT ErrorCode = 1 // Indicates that the input to the provider plugin // is invalid. Bad input errors should not be retried // but are distinguished from unexpected errors to allow // the deploy engine host to provide a more specific // error message to the user. ErrorCode_ERROR_CODE_BAD_INPUT ErrorCode = 2 )
func (ErrorCode) Descriptor ¶
func (ErrorCode) Descriptor() protoreflect.EnumDescriptor
func (ErrorCode) EnumDescriptor
deprecated
func (ErrorCode) Number ¶
func (x ErrorCode) Number() protoreflect.EnumNumber
func (ErrorCode) Type ¶
func (ErrorCode) Type() protoreflect.EnumType
type ErrorResponse ¶
type ErrorResponse struct { // An error code specific to the plugin system. // For example, an action that should be retried // would have a specific error code to let the deploy engine // host know that the action should be retried. Code ErrorCode `protobuf:"varint,1,opt,name=code,enum=providerserverv1.ErrorCode" json:"code,omitempty"` // A human-readable error message. Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` // Extra details about the error. Details *anypb.Any `protobuf:"bytes,3,opt,name=details" json:"details,omitempty"` // contains filtered or unexported fields }
Error response returned by the provider plugin when an error occurs during any of the supported provider plugin actions.
func (*ErrorResponse) Descriptor
deprecated
func (*ErrorResponse) Descriptor() ([]byte, []int)
Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead.
func (*ErrorResponse) GetCode ¶
func (x *ErrorResponse) GetCode() ErrorCode
func (*ErrorResponse) GetDetails ¶
func (x *ErrorResponse) GetDetails() *anypb.Any
func (*ErrorResponse) GetMessage ¶
func (x *ErrorResponse) GetMessage() string
func (*ErrorResponse) ProtoMessage ¶
func (*ErrorResponse) ProtoMessage()
func (*ErrorResponse) ProtoReflect ¶
func (x *ErrorResponse) ProtoReflect() protoreflect.Message
func (*ErrorResponse) Reset ¶
func (x *ErrorResponse) Reset()
func (*ErrorResponse) String ¶
func (x *ErrorResponse) String() string
type Namespace ¶
type Namespace struct { Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"` // contains filtered or unexported fields }
Namespace of a provider used to route resource and data source types to the correct provider.
func (*Namespace) Descriptor
deprecated
func (*Namespace) GetNamespace ¶
func (*Namespace) ProtoMessage ¶
func (*Namespace) ProtoMessage()
func (*Namespace) ProtoReflect ¶
func (x *Namespace) ProtoReflect() protoreflect.Message
type ProviderClient ¶
type ProviderClient interface { // GetNamespace returns the namespace of the provider // used to route resource and data source types // to the correct provider. GetNamespace(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Namespace, error) // ValidateResource deals with validating a resource // against the provider's schema/specification. ValidateResource(ctx context.Context, in *ValidateResourceRequest, opts ...grpc.CallOption) (*ValidateResourceResponse, error) // CanLinkTo produces a list of all the resource types // that the given resource type can link to. CanLinkTo(ctx context.Context, in *ResourceType, opts ...grpc.CallOption) (*CanLinkToResponse, error) }
ProviderClient is the client API for Provider 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 provider plugin server.
func NewProviderClient ¶
func NewProviderClient(cc grpc.ClientConnInterface) ProviderClient
type ProviderServer ¶
type ProviderServer interface { // GetNamespace returns the namespace of the provider // used to route resource and data source types // to the correct provider. GetNamespace(context.Context, *emptypb.Empty) (*Namespace, error) // ValidateResource deals with validating a resource // against the provider's schema/specification. ValidateResource(context.Context, *ValidateResourceRequest) (*ValidateResourceResponse, error) // CanLinkTo produces a list of all the resource types // that the given resource type can link to. CanLinkTo(context.Context, *ResourceType) (*CanLinkToResponse, error) // contains filtered or unexported methods }
ProviderServer is the server API for Provider service. All implementations must embed UnimplementedProviderServer for forward compatibility.
Interface exported by a provider plugin server.
type ResourceInfo ¶
type ResourceInfo struct { // Holds the ID of a resource when in the context // of a blueprint instance when deploying or staging changes. // Sometimes staging changes is independent of an instance and is used to compare // two vesions of a blueprint in which // case the resource ID will be empty. ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId" json:"resource_id,omitempty"` // Holds the ID of the blueprint instance // that the current resource belongs to. InstanceId string `protobuf:"bytes,2,opt,name=instance_id,json=instanceId" json:"instance_id,omitempty"` // Holds the ID of the blueprint instance revision // that the current resource deployment belongs to. RevisionId string `protobuf:"bytes,3,opt,name=revision_id,json=revisionId" json:"revision_id,omitempty"` // The resource schema as parsed within a blueprint. SchemaResource *schemapb.Resource `protobuf:"bytes,4,opt,name=schema_resource,json=schemaResource" json:"schema_resource,omitempty"` // contains filtered or unexported fields }
ResourceInfo holds identifiers for the current resource instance along with the resource schema.
func (*ResourceInfo) Descriptor
deprecated
func (*ResourceInfo) Descriptor() ([]byte, []int)
Deprecated: Use ResourceInfo.ProtoReflect.Descriptor instead.
func (*ResourceInfo) GetInstanceId ¶
func (x *ResourceInfo) GetInstanceId() string
func (*ResourceInfo) GetResourceId ¶
func (x *ResourceInfo) GetResourceId() string
func (*ResourceInfo) GetRevisionId ¶
func (x *ResourceInfo) GetRevisionId() string
func (*ResourceInfo) GetSchemaResource ¶
func (x *ResourceInfo) GetSchemaResource() *schemapb.Resource
func (*ResourceInfo) ProtoMessage ¶
func (*ResourceInfo) ProtoMessage()
func (*ResourceInfo) ProtoReflect ¶
func (x *ResourceInfo) ProtoReflect() protoreflect.Message
func (*ResourceInfo) Reset ¶
func (x *ResourceInfo) Reset()
func (*ResourceInfo) String ¶
func (x *ResourceInfo) String() string
type ResourceType ¶
type ResourceType struct { Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` // contains filtered or unexported fields }
The type of resource to carry out an action or query some information about.
func (*ResourceType) Descriptor
deprecated
func (*ResourceType) Descriptor() ([]byte, []int)
Deprecated: Use ResourceType.ProtoReflect.Descriptor instead.
func (*ResourceType) GetType ¶
func (x *ResourceType) GetType() string
func (*ResourceType) ProtoMessage ¶
func (*ResourceType) ProtoMessage()
func (*ResourceType) ProtoReflect ¶
func (x *ResourceType) ProtoReflect() protoreflect.Message
func (*ResourceType) Reset ¶
func (x *ResourceType) Reset()
func (*ResourceType) String ¶
func (x *ResourceType) String() string
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a plugin server.
func NewServer ¶
func NewServer( pluginID string, provider ProviderServer, serviceFactory func() (pluginservice.ServiceClient, func(), error), opts ...ServerOption, ) *Server
type ServerOption ¶
type ServerOption func(*Server)
ServerOption is a function that configures a server.
func WithDebug ¶
func WithDebug() ServerOption
WithDebug is a server option that enables debug mode.
func WithTCPPort ¶
func WithTCPPort(port int) ServerOption
WithTCPPort is a server option that sets the TCP port.
func WithUnixSocket ¶
func WithUnixSocket(path string) ServerOption
WithUnixSocket is a server option that sets the Unix socket path.
type SourceMeta ¶
type SourceMeta struct { // The line number in the source blueprint. Line int32 `protobuf:"varint,1,opt,name=line" json:"line,omitempty"` // The column number in the source blueprint. Column int32 `protobuf:"varint,2,opt,name=column" json:"column,omitempty"` // contains filtered or unexported fields }
SourceMeta provides the line and column number in the source blueprint.
func (*SourceMeta) Descriptor
deprecated
func (*SourceMeta) Descriptor() ([]byte, []int)
Deprecated: Use SourceMeta.ProtoReflect.Descriptor instead.
func (*SourceMeta) GetColumn ¶
func (x *SourceMeta) GetColumn() int32
func (*SourceMeta) GetLine ¶
func (x *SourceMeta) GetLine() int32
func (*SourceMeta) ProtoMessage ¶
func (*SourceMeta) ProtoMessage()
func (*SourceMeta) ProtoReflect ¶
func (x *SourceMeta) ProtoReflect() protoreflect.Message
func (*SourceMeta) Reset ¶
func (x *SourceMeta) Reset()
func (*SourceMeta) String ¶
func (x *SourceMeta) String() string
type UnimplementedProviderServer ¶
type UnimplementedProviderServer struct{}
UnimplementedProviderServer 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 (UnimplementedProviderServer) CanLinkTo ¶
func (UnimplementedProviderServer) CanLinkTo(context.Context, *ResourceType) (*CanLinkToResponse, error)
func (UnimplementedProviderServer) GetNamespace ¶
func (UnimplementedProviderServer) ValidateResource ¶
func (UnimplementedProviderServer) ValidateResource(context.Context, *ValidateResourceRequest) (*ValidateResourceResponse, error)
type UnsafeProviderServer ¶
type UnsafeProviderServer interface {
// contains filtered or unexported methods
}
UnsafeProviderServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProviderServer will result in compilation errors.
type ValidateResourceCompleteResponse ¶
type ValidateResourceCompleteResponse struct { Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics" json:"diagnostics,omitempty"` // contains filtered or unexported fields }
ValidateResourceCompleteResponse is the response returned by the provider plugin when resource validation has been completed.
func (*ValidateResourceCompleteResponse) Descriptor
deprecated
func (*ValidateResourceCompleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use ValidateResourceCompleteResponse.ProtoReflect.Descriptor instead.
func (*ValidateResourceCompleteResponse) GetDiagnostics ¶
func (x *ValidateResourceCompleteResponse) GetDiagnostics() []*Diagnostic
func (*ValidateResourceCompleteResponse) ProtoMessage ¶
func (*ValidateResourceCompleteResponse) ProtoMessage()
func (*ValidateResourceCompleteResponse) ProtoReflect ¶
func (x *ValidateResourceCompleteResponse) ProtoReflect() protoreflect.Message
func (*ValidateResourceCompleteResponse) Reset ¶
func (x *ValidateResourceCompleteResponse) Reset()
func (*ValidateResourceCompleteResponse) String ¶
func (x *ValidateResourceCompleteResponse) String() string
type ValidateResourceRequest ¶
type ValidateResourceRequest struct { // The resource schema as parsed within a blueprint. SchemaResource *schemapb.Resource `protobuf:"bytes,1,opt,name=schema_resource,json=schemaResource" json:"schema_resource,omitempty"` // Runtime parameters for the current blueprint, // provider and context. BlueprintParams *BlueprintParams `protobuf:"bytes,2,opt,name=blueprint_params,json=blueprintParams" json:"blueprint_params,omitempty"` // contains filtered or unexported fields }
ValidateResourceRequest is the request for resource validation.
func (*ValidateResourceRequest) Descriptor
deprecated
func (*ValidateResourceRequest) Descriptor() ([]byte, []int)
Deprecated: Use ValidateResourceRequest.ProtoReflect.Descriptor instead.
func (*ValidateResourceRequest) GetBlueprintParams ¶
func (x *ValidateResourceRequest) GetBlueprintParams() *BlueprintParams
func (*ValidateResourceRequest) GetSchemaResource ¶
func (x *ValidateResourceRequest) GetSchemaResource() *schemapb.Resource
func (*ValidateResourceRequest) ProtoMessage ¶
func (*ValidateResourceRequest) ProtoMessage()
func (*ValidateResourceRequest) ProtoReflect ¶
func (x *ValidateResourceRequest) ProtoReflect() protoreflect.Message
func (*ValidateResourceRequest) Reset ¶
func (x *ValidateResourceRequest) Reset()
func (*ValidateResourceRequest) String ¶
func (x *ValidateResourceRequest) String() string
type ValidateResourceResponse ¶
type ValidateResourceResponse struct { // Types that are assignable to Response: // // *ValidateResourceResponse_CompleteResponse // *ValidateResourceResponse_ErrorResponse Response isValidateResourceResponse_Response `protobuf_oneof:"response"` // contains filtered or unexported fields }
ValidateResourceResponse is the response for resource validation, can be a validation complete response or an error response.
func (*ValidateResourceResponse) Descriptor
deprecated
func (*ValidateResourceResponse) Descriptor() ([]byte, []int)
Deprecated: Use ValidateResourceResponse.ProtoReflect.Descriptor instead.
func (*ValidateResourceResponse) GetCompleteResponse ¶
func (x *ValidateResourceResponse) GetCompleteResponse() *ValidateResourceCompleteResponse
func (*ValidateResourceResponse) GetErrorResponse ¶
func (x *ValidateResourceResponse) GetErrorResponse() *ErrorResponse
func (*ValidateResourceResponse) GetResponse ¶
func (m *ValidateResourceResponse) GetResponse() isValidateResourceResponse_Response
func (*ValidateResourceResponse) ProtoMessage ¶
func (*ValidateResourceResponse) ProtoMessage()
func (*ValidateResourceResponse) ProtoReflect ¶
func (x *ValidateResourceResponse) ProtoReflect() protoreflect.Message
func (*ValidateResourceResponse) Reset ¶
func (x *ValidateResourceResponse) Reset()
func (*ValidateResourceResponse) String ¶
func (x *ValidateResourceResponse) String() string
type ValidateResourceResponse_CompleteResponse ¶
type ValidateResourceResponse_CompleteResponse struct {
CompleteResponse *ValidateResourceCompleteResponse `protobuf:"bytes,1,opt,name=complete_response,json=completeResponse,oneof"`
}
type ValidateResourceResponse_ErrorResponse ¶
type ValidateResourceResponse_ErrorResponse struct {
ErrorResponse *ErrorResponse `protobuf:"bytes,2,opt,name=error_response,json=errorResponse,oneof"`
}