Documentation ¶
Index ¶
- type CQPlugin
- type CQProvider
- type CQProviderServer
- type ConfigureProviderRequest
- type ConfigureProviderResponse
- type ConnectionDetails
- type FetchResourcesRequest
- type FetchResourcesResponse
- type FetchResourcesSender
- type FetchResourcesStream
- type GRPCClient
- func (g GRPCClient) ConfigureProvider(ctx context.Context, request *ConfigureProviderRequest) (*ConfigureProviderResponse, error)
- func (g GRPCClient) FetchResources(ctx context.Context, request *FetchResourcesRequest) (FetchResourcesStream, error)
- func (g GRPCClient) GetProviderConfig(ctx context.Context, _ *GetProviderConfigRequest) (*GetProviderConfigResponse, error)
- func (g GRPCClient) GetProviderSchema(ctx context.Context, _ *GetProviderSchemaRequest) (*GetProviderSchemaResponse, error)
- type GRPCFetchResourcesServer
- type GRPCFetchResponseStream
- type GRPCServer
- func (g *GRPCServer) ConfigureProvider(ctx context.Context, request *internal.ConfigureProvider_Request) (*internal.ConfigureProvider_Response, error)
- func (g *GRPCServer) FetchResources(request *internal.FetchResources_Request, ...) error
- func (g *GRPCServer) GetProviderConfig(ctx context.Context, _ *internal.GetProviderConfig_Request) (*internal.GetProviderConfig_Response, error)
- func (g *GRPCServer) GetProviderSchema(ctx context.Context, _ *internal.GetProviderSchema_Request) (*internal.GetProviderSchema_Response, error)
- type GetProviderConfigRequest
- type GetProviderConfigResponse
- type GetProviderSchemaRequest
- type GetProviderSchemaResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CQPlugin ¶
type CQPlugin struct { // GRPCPlugin must still implement the Stub interface plugin.Plugin // Concrete implementation, written in Go. This is only used for plugins // that are written in Go. Impl CQProviderServer }
CQPlugin This is the implementation of plugin.GRPCServer so we can serve/consume this.
func (*CQPlugin) GRPCClient ¶
type CQProvider ¶
type CQProvider interface { // GetProviderSchema is called when CloudQuery needs to know what the // provider's tables and version GetProviderSchema(context.Context, *GetProviderSchemaRequest) (*GetProviderSchemaResponse, error) // GetProviderConfig is called when CloudQuery wants to generate a configuration example for a provider GetProviderConfig(context.Context, *GetProviderConfigRequest) (*GetProviderConfigResponse, error) // ConfigureProvider is called to pass the user-specified provider // configuration to the provider. ConfigureProvider(context.Context, *ConfigureProviderRequest) (*ConfigureProviderResponse, error) // FetchResources is called when CloudQuery requests to fetch one or more resources from the provider // The provider reports back status updates on the resources fetching progress. FetchResources(context.Context, *FetchResourcesRequest) (FetchResourcesStream, error) }
type CQProviderServer ¶
type CQProviderServer interface { // GetProviderSchema is called when CloudQuery needs to know what the // provider's tables and version GetProviderSchema(context.Context, *GetProviderSchemaRequest) (*GetProviderSchemaResponse, error) // GetProviderConfig is called when CloudQuery wants to generate a configuration example for a provider GetProviderConfig(context.Context, *GetProviderConfigRequest) (*GetProviderConfigResponse, error) // ConfigureProvider is called to pass the user-specified provider // configuration to the provider. ConfigureProvider(context.Context, *ConfigureProviderRequest) (*ConfigureProviderResponse, error) // FetchResources is called when CloudQuery requests to fetch one or more resources from the provider // The provider reports back status updates on the resources fetching progress. FetchResources(context.Context, *FetchResourcesRequest, FetchResourcesSender) error }
type ConfigureProviderRequest ¶
type ConfigureProviderRequest struct { // CloudQueryVersion is the version of CloudQuery executing the request. CloudQueryVersion string // ConnectionDetails holds information regarding connection to the CloudQuery database Connection ConnectionDetails // Config is the configuration the user supplied for the provider Config []byte }
type ConfigureProviderResponse ¶
type ConfigureProviderResponse struct { // Error should be set to a string describing the error. // The error can be either from malformed configuration or failure to setup Error string }
type ConnectionDetails ¶
type FetchResourcesRequest ¶
type FetchResourcesRequest struct {
Resources []string
}
FetchResourcesRequest represents a CloudQuery RPC request of one or more resources
type FetchResourcesResponse ¶
type FetchResourcesResponse struct { // map of resources that have finished fetching FinishedResources map[string]bool // Amount of resources collected so far ResourceCount uint64 // Error value if any, if returned the stream will be canceled Error string }
FetchResourcesResponse represents a CloudQuery RPC response of the current fetch progress of the provider
type FetchResourcesSender ¶
type FetchResourcesSender interface {
Send(*FetchResourcesResponse) error
}
FetchResourcesSender represents a CloudQuery RPC stream of fetch updates from the provider
type FetchResourcesStream ¶
type FetchResourcesStream interface {
Recv() (*FetchResourcesResponse, error)
}
FetchResourcesStream represents a CloudQuery RPC stream of fetch updates from the provider
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
func (GRPCClient) ConfigureProvider ¶
func (g GRPCClient) ConfigureProvider(ctx context.Context, request *ConfigureProviderRequest) (*ConfigureProviderResponse, error)
func (GRPCClient) FetchResources ¶
func (g GRPCClient) FetchResources(ctx context.Context, request *FetchResourcesRequest) (FetchResourcesStream, error)
func (GRPCClient) GetProviderConfig ¶
func (g GRPCClient) GetProviderConfig(ctx context.Context, _ *GetProviderConfigRequest) (*GetProviderConfigResponse, error)
func (GRPCClient) GetProviderSchema ¶
func (g GRPCClient) GetProviderSchema(ctx context.Context, _ *GetProviderSchemaRequest) (*GetProviderSchemaResponse, error)
type GRPCFetchResourcesServer ¶
type GRPCFetchResourcesServer struct {
// contains filtered or unexported fields
}
func (GRPCFetchResourcesServer) Send ¶
func (g GRPCFetchResourcesServer) Send(response *FetchResourcesResponse) error
type GRPCFetchResponseStream ¶
type GRPCFetchResponseStream struct {
// contains filtered or unexported fields
}
func (GRPCFetchResponseStream) Recv ¶
func (g GRPCFetchResponseStream) Recv() (*FetchResourcesResponse, error)
type GRPCServer ¶
type GRPCServer struct { // This is the real implementation Impl CQProviderServer internal.UnimplementedProviderServer }
func (*GRPCServer) ConfigureProvider ¶
func (g *GRPCServer) ConfigureProvider(ctx context.Context, request *internal.ConfigureProvider_Request) (*internal.ConfigureProvider_Response, error)
func (*GRPCServer) FetchResources ¶
func (g *GRPCServer) FetchResources(request *internal.FetchResources_Request, server internal.Provider_FetchResourcesServer) error
func (*GRPCServer) GetProviderConfig ¶
func (g *GRPCServer) GetProviderConfig(ctx context.Context, _ *internal.GetProviderConfig_Request) (*internal.GetProviderConfig_Response, error)
func (*GRPCServer) GetProviderSchema ¶
func (g *GRPCServer) GetProviderSchema(ctx context.Context, _ *internal.GetProviderSchema_Request) (*internal.GetProviderSchema_Response, error)
type GetProviderConfigRequest ¶
type GetProviderConfigRequest struct{}
GetProviderConfigRequest represents a CloudQuery RPC request for provider's config
type GetProviderConfigResponse ¶
type GetProviderConfigResponse struct {
Config []byte
}
type GetProviderSchemaRequest ¶
type GetProviderSchemaRequest struct{}
GetProviderSchemaRequest represents a CloudQuery RPC request for provider's schemas
Click to show internal directories.
Click to hide internal directories.