Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterSourceServer(s grpc.ServiceRegistrar, srv SourceServer)
- type DiscoverRequest
- type DiscoverResponse
- type FetchSampleDataRequest
- func (*FetchSampleDataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FetchSampleDataRequest) GetAssetJson() []byte
- func (x *FetchSampleDataRequest) GetConfigJson() []byte
- func (*FetchSampleDataRequest) ProtoMessage()
- func (x *FetchSampleDataRequest) ProtoReflect() protoreflect.Message
- func (x *FetchSampleDataRequest) Reset()
- func (x *FetchSampleDataRequest) String() string
- type FetchSampleDataResponse
- func (*FetchSampleDataResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FetchSampleDataResponse) GetResultJson() []byte
- func (*FetchSampleDataResponse) ProtoMessage()
- func (x *FetchSampleDataResponse) ProtoReflect() protoreflect.Message
- func (x *FetchSampleDataResponse) Reset()
- func (x *FetchSampleDataResponse) String() string
- type GetMetaRequest
- type GetMetaResponse
- type SourceClient
- type SourceServer
- type UnimplementedSourceServer
- func (UnimplementedSourceServer) Discover(context.Context, *DiscoverRequest) (*DiscoverResponse, error)
- func (UnimplementedSourceServer) FetchSampleData(context.Context, *FetchSampleDataRequest) (*FetchSampleDataResponse, error)
- func (UnimplementedSourceServer) GetMeta(context.Context, *GetMetaRequest) (*GetMetaResponse, error)
- func (UnimplementedSourceServer) Validate(context.Context, *ValidateRequest) (*ValidateResponse, error)
- type UnsafeSourceServer
- type ValidateRequest
- type ValidateResponse
Constants ¶
const ( Source_GetMeta_FullMethodName = "/marmot.plugin.v1.Source/GetMeta" Source_Validate_FullMethodName = "/marmot.plugin.v1.Source/Validate" Source_Discover_FullMethodName = "/marmot.plugin.v1.Source/Discover" Source_FetchSampleData_FullMethodName = "/marmot.plugin.v1.Source/FetchSampleData" )
Variables ¶
var File_proto_plugin_proto protoreflect.FileDescriptor
var Source_ServiceDesc = grpc.ServiceDesc{ ServiceName: "marmot.plugin.v1.Source", HandlerType: (*SourceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetMeta", Handler: _Source_GetMeta_Handler, }, { MethodName: "Validate", Handler: _Source_Validate_Handler, }, { MethodName: "Discover", Handler: _Source_Discover_Handler, }, { MethodName: "FetchSampleData", Handler: _Source_FetchSampleData_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/plugin.proto", }
Source_ServiceDesc is the grpc.ServiceDesc for Source service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSourceServer ¶
func RegisterSourceServer(s grpc.ServiceRegistrar, srv SourceServer)
Types ¶
type DiscoverRequest ¶
type DiscoverRequest struct {
// JSON-encoded raw plugin config
ConfigJson []byte `protobuf:"bytes,1,opt,name=config_json,json=configJson,proto3" json:"config_json,omitempty"`
// contains filtered or unexported fields
}
func (*DiscoverRequest) Descriptor
deprecated
func (*DiscoverRequest) Descriptor() ([]byte, []int)
Deprecated: Use DiscoverRequest.ProtoReflect.Descriptor instead.
func (*DiscoverRequest) GetConfigJson ¶
func (x *DiscoverRequest) GetConfigJson() []byte
func (*DiscoverRequest) ProtoMessage ¶
func (*DiscoverRequest) ProtoMessage()
func (*DiscoverRequest) ProtoReflect ¶
func (x *DiscoverRequest) ProtoReflect() protoreflect.Message
func (*DiscoverRequest) Reset ¶
func (x *DiscoverRequest) Reset()
func (*DiscoverRequest) String ¶
func (x *DiscoverRequest) String() string
type DiscoverResponse ¶
type DiscoverResponse struct {
// JSON-encoded pluginsdk.DiscoveryResult
ResultJson []byte `protobuf:"bytes,1,opt,name=result_json,json=resultJson,proto3" json:"result_json,omitempty"`
// contains filtered or unexported fields
}
func (*DiscoverResponse) Descriptor
deprecated
func (*DiscoverResponse) Descriptor() ([]byte, []int)
Deprecated: Use DiscoverResponse.ProtoReflect.Descriptor instead.
func (*DiscoverResponse) GetResultJson ¶
func (x *DiscoverResponse) GetResultJson() []byte
func (*DiscoverResponse) ProtoMessage ¶
func (*DiscoverResponse) ProtoMessage()
func (*DiscoverResponse) ProtoReflect ¶
func (x *DiscoverResponse) ProtoReflect() protoreflect.Message
func (*DiscoverResponse) Reset ¶
func (x *DiscoverResponse) Reset()
func (*DiscoverResponse) String ¶
func (x *DiscoverResponse) String() string
type FetchSampleDataRequest ¶
type FetchSampleDataRequest struct {
// JSON-encoded raw plugin config
ConfigJson []byte `protobuf:"bytes,1,opt,name=config_json,json=configJson,proto3" json:"config_json,omitempty"`
// JSON-encoded pluginsdk.Asset to fetch sample data for
AssetJson []byte `protobuf:"bytes,2,opt,name=asset_json,json=assetJson,proto3" json:"asset_json,omitempty"`
// contains filtered or unexported fields
}
func (*FetchSampleDataRequest) Descriptor
deprecated
func (*FetchSampleDataRequest) Descriptor() ([]byte, []int)
Deprecated: Use FetchSampleDataRequest.ProtoReflect.Descriptor instead.
func (*FetchSampleDataRequest) GetAssetJson ¶
func (x *FetchSampleDataRequest) GetAssetJson() []byte
func (*FetchSampleDataRequest) GetConfigJson ¶
func (x *FetchSampleDataRequest) GetConfigJson() []byte
func (*FetchSampleDataRequest) ProtoMessage ¶
func (*FetchSampleDataRequest) ProtoMessage()
func (*FetchSampleDataRequest) ProtoReflect ¶
func (x *FetchSampleDataRequest) ProtoReflect() protoreflect.Message
func (*FetchSampleDataRequest) Reset ¶
func (x *FetchSampleDataRequest) Reset()
func (*FetchSampleDataRequest) String ¶
func (x *FetchSampleDataRequest) String() string
type FetchSampleDataResponse ¶
type FetchSampleDataResponse struct {
// JSON-encoded pluginsdk.SampleData
ResultJson []byte `protobuf:"bytes,1,opt,name=result_json,json=resultJson,proto3" json:"result_json,omitempty"`
// contains filtered or unexported fields
}
func (*FetchSampleDataResponse) Descriptor
deprecated
func (*FetchSampleDataResponse) Descriptor() ([]byte, []int)
Deprecated: Use FetchSampleDataResponse.ProtoReflect.Descriptor instead.
func (*FetchSampleDataResponse) GetResultJson ¶
func (x *FetchSampleDataResponse) GetResultJson() []byte
func (*FetchSampleDataResponse) ProtoMessage ¶
func (*FetchSampleDataResponse) ProtoMessage()
func (*FetchSampleDataResponse) ProtoReflect ¶
func (x *FetchSampleDataResponse) ProtoReflect() protoreflect.Message
func (*FetchSampleDataResponse) Reset ¶
func (x *FetchSampleDataResponse) Reset()
func (*FetchSampleDataResponse) String ¶
func (x *FetchSampleDataResponse) String() string
type GetMetaRequest ¶
type GetMetaRequest struct {
// contains filtered or unexported fields
}
func (*GetMetaRequest) Descriptor
deprecated
func (*GetMetaRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetMetaRequest.ProtoReflect.Descriptor instead.
func (*GetMetaRequest) ProtoMessage ¶
func (*GetMetaRequest) ProtoMessage()
func (*GetMetaRequest) ProtoReflect ¶
func (x *GetMetaRequest) ProtoReflect() protoreflect.Message
func (*GetMetaRequest) Reset ¶
func (x *GetMetaRequest) Reset()
func (*GetMetaRequest) String ¶
func (x *GetMetaRequest) String() string
type GetMetaResponse ¶
type GetMetaResponse struct {
// JSON-encoded pluginsdk.Meta
MetaJson []byte `protobuf:"bytes,1,opt,name=meta_json,json=metaJson,proto3" json:"meta_json,omitempty"`
// contains filtered or unexported fields
}
func (*GetMetaResponse) Descriptor
deprecated
func (*GetMetaResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetMetaResponse.ProtoReflect.Descriptor instead.
func (*GetMetaResponse) GetMetaJson ¶
func (x *GetMetaResponse) GetMetaJson() []byte
func (*GetMetaResponse) ProtoMessage ¶
func (*GetMetaResponse) ProtoMessage()
func (*GetMetaResponse) ProtoReflect ¶
func (x *GetMetaResponse) ProtoReflect() protoreflect.Message
func (*GetMetaResponse) Reset ¶
func (x *GetMetaResponse) Reset()
func (*GetMetaResponse) String ¶
func (x *GetMetaResponse) String() string
type SourceClient ¶
type SourceClient interface {
GetMeta(ctx context.Context, in *GetMetaRequest, opts ...grpc.CallOption) (*GetMetaResponse, error)
Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error)
Discover(ctx context.Context, in *DiscoverRequest, opts ...grpc.CallOption) (*DiscoverResponse, error)
// FetchSampleData is optional; plugins whose source does not implement
// DataFetcher respond with UNIMPLEMENTED.
FetchSampleData(ctx context.Context, in *FetchSampleDataRequest, opts ...grpc.CallOption) (*FetchSampleDataResponse, error)
}
SourceClient is the client API for Source 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.
Source is the gRPC service every Marmot plugin exposes over go-plugin. Config, metadata, and discovery payloads are JSON-encoded so the wire protocol stays stable while plugin-facing Go types evolve.
func NewSourceClient ¶
func NewSourceClient(cc grpc.ClientConnInterface) SourceClient
type SourceServer ¶
type SourceServer interface {
GetMeta(context.Context, *GetMetaRequest) (*GetMetaResponse, error)
Validate(context.Context, *ValidateRequest) (*ValidateResponse, error)
Discover(context.Context, *DiscoverRequest) (*DiscoverResponse, error)
// FetchSampleData is optional; plugins whose source does not implement
// DataFetcher respond with UNIMPLEMENTED.
FetchSampleData(context.Context, *FetchSampleDataRequest) (*FetchSampleDataResponse, error)
// contains filtered or unexported methods
}
SourceServer is the server API for Source service. All implementations must embed UnimplementedSourceServer for forward compatibility.
Source is the gRPC service every Marmot plugin exposes over go-plugin. Config, metadata, and discovery payloads are JSON-encoded so the wire protocol stays stable while plugin-facing Go types evolve.
type UnimplementedSourceServer ¶
type UnimplementedSourceServer struct{}
UnimplementedSourceServer 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 (UnimplementedSourceServer) Discover ¶
func (UnimplementedSourceServer) Discover(context.Context, *DiscoverRequest) (*DiscoverResponse, error)
func (UnimplementedSourceServer) FetchSampleData ¶
func (UnimplementedSourceServer) FetchSampleData(context.Context, *FetchSampleDataRequest) (*FetchSampleDataResponse, error)
func (UnimplementedSourceServer) GetMeta ¶
func (UnimplementedSourceServer) GetMeta(context.Context, *GetMetaRequest) (*GetMetaResponse, error)
func (UnimplementedSourceServer) Validate ¶
func (UnimplementedSourceServer) Validate(context.Context, *ValidateRequest) (*ValidateResponse, error)
type UnsafeSourceServer ¶
type UnsafeSourceServer interface {
// contains filtered or unexported methods
}
UnsafeSourceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SourceServer will result in compilation errors.
type ValidateRequest ¶
type ValidateRequest struct {
// JSON-encoded raw plugin config
ConfigJson []byte `protobuf:"bytes,1,opt,name=config_json,json=configJson,proto3" json:"config_json,omitempty"`
// contains filtered or unexported fields
}
func (*ValidateRequest) Descriptor
deprecated
func (*ValidateRequest) Descriptor() ([]byte, []int)
Deprecated: Use ValidateRequest.ProtoReflect.Descriptor instead.
func (*ValidateRequest) GetConfigJson ¶
func (x *ValidateRequest) GetConfigJson() []byte
func (*ValidateRequest) ProtoMessage ¶
func (*ValidateRequest) ProtoMessage()
func (*ValidateRequest) ProtoReflect ¶
func (x *ValidateRequest) ProtoReflect() protoreflect.Message
func (*ValidateRequest) Reset ¶
func (x *ValidateRequest) Reset()
func (*ValidateRequest) String ¶
func (x *ValidateRequest) String() string
type ValidateResponse ¶
type ValidateResponse struct {
// JSON-encoded validated config
ConfigJson []byte `protobuf:"bytes,1,opt,name=config_json,json=configJson,proto3" json:"config_json,omitempty"`
// contains filtered or unexported fields
}
func (*ValidateResponse) Descriptor
deprecated
func (*ValidateResponse) Descriptor() ([]byte, []int)
Deprecated: Use ValidateResponse.ProtoReflect.Descriptor instead.
func (*ValidateResponse) GetConfigJson ¶
func (x *ValidateResponse) GetConfigJson() []byte
func (*ValidateResponse) ProtoMessage ¶
func (*ValidateResponse) ProtoMessage()
func (*ValidateResponse) ProtoReflect ¶
func (x *ValidateResponse) ProtoReflect() protoreflect.Message
func (*ValidateResponse) Reset ¶
func (x *ValidateResponse) Reset()
func (*ValidateResponse) String ¶
func (x *ValidateResponse) String() string