internal

package
v0.3.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColumnType_name = map[int32]string{
		0:  "INVALID",
		1:  "BOOL",
		2:  "SMALLINT",
		3:  "INT",
		4:  "BIGINT",
		5:  "FLOAT",
		6:  "UUID",
		7:  "STRING",
		8:  "BYTE_ARRAY",
		9:  "STRING_ARRAY",
		10: "INT_ARRAY",
		11: "TIMESTAMP",
		12: "JSON",
		13: "UUID_ARRAY",
		14: "INET",
		15: "INET_ARRAY",
		16: "CIDR",
		17: "CIDR_ARRAY",
		18: "MAC_ADDR",
		19: "MAC_ADDR_ARRAY",
	}
	ColumnType_value = map[string]int32{
		"INVALID":        0,
		"BOOL":           1,
		"SMALLINT":       2,
		"INT":            3,
		"BIGINT":         4,
		"FLOAT":          5,
		"UUID":           6,
		"STRING":         7,
		"BYTE_ARRAY":     8,
		"STRING_ARRAY":   9,
		"INT_ARRAY":      10,
		"TIMESTAMP":      11,
		"JSON":           12,
		"UUID_ARRAY":     13,
		"INET":           14,
		"INET_ARRAY":     15,
		"CIDR":           16,
		"CIDR_ARRAY":     17,
		"MAC_ADDR":       18,
		"MAC_ADDR_ARRAY": 19,
	}
)

Enum value maps for ColumnType.

View Source
var (
	ConnectionType_name = map[int32]string{
		0: "POSTGRES",
	}
	ConnectionType_value = map[string]int32{
		"POSTGRES": 0,
	}
)

Enum value maps for ConnectionType.

View Source
var File_internal_plugin_proto protoreflect.FileDescriptor

Functions

func RegisterProviderServer

func RegisterProviderServer(s *grpc.Server, srv ProviderServer)

Types

type Column

type Column struct {
	Name        string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string     `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Type        ColumnType `protobuf:"varint,3,opt,name=type,proto3,enum=proto.ColumnType" json:"type,omitempty"` // TODO: add creation options i.e isUnique, isNull etc'
	// contains filtered or unexported fields
}

func (*Column) Descriptor deprecated

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

Deprecated: Use Column.ProtoReflect.Descriptor instead.

func (*Column) GetDescription

func (x *Column) GetDescription() string

func (*Column) GetName

func (x *Column) GetName() string

func (*Column) GetType

func (x *Column) GetType() ColumnType

func (*Column) ProtoMessage

func (*Column) ProtoMessage()

func (*Column) ProtoReflect

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

func (*Column) Reset

func (x *Column) Reset()

func (*Column) String

func (x *Column) String() string

type ColumnType

type ColumnType int32
const (
	ColumnType_INVALID        ColumnType = 0
	ColumnType_BOOL           ColumnType = 1
	ColumnType_SMALLINT       ColumnType = 2
	ColumnType_INT            ColumnType = 3
	ColumnType_BIGINT         ColumnType = 4
	ColumnType_FLOAT          ColumnType = 5
	ColumnType_UUID           ColumnType = 6
	ColumnType_STRING         ColumnType = 7
	ColumnType_BYTE_ARRAY     ColumnType = 8
	ColumnType_STRING_ARRAY   ColumnType = 9
	ColumnType_INT_ARRAY      ColumnType = 10
	ColumnType_TIMESTAMP      ColumnType = 11
	ColumnType_JSON           ColumnType = 12
	ColumnType_UUID_ARRAY     ColumnType = 13
	ColumnType_INET           ColumnType = 14
	ColumnType_INET_ARRAY     ColumnType = 15
	ColumnType_CIDR           ColumnType = 16
	ColumnType_CIDR_ARRAY     ColumnType = 17
	ColumnType_MAC_ADDR       ColumnType = 18
	ColumnType_MAC_ADDR_ARRAY ColumnType = 19
)

func (ColumnType) Descriptor

func (ColumnType) Descriptor() protoreflect.EnumDescriptor

func (ColumnType) Enum

func (x ColumnType) Enum() *ColumnType

func (ColumnType) EnumDescriptor deprecated

func (ColumnType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ColumnType.Descriptor instead.

func (ColumnType) Number

func (x ColumnType) Number() protoreflect.EnumNumber

func (ColumnType) String

func (x ColumnType) String() string

func (ColumnType) Type

type ConfigureProvider

type ConfigureProvider struct {
	// contains filtered or unexported fields
}

func (*ConfigureProvider) Descriptor deprecated

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

Deprecated: Use ConfigureProvider.ProtoReflect.Descriptor instead.

func (*ConfigureProvider) ProtoMessage

func (*ConfigureProvider) ProtoMessage()

func (*ConfigureProvider) ProtoReflect

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

func (*ConfigureProvider) Reset

func (x *ConfigureProvider) Reset()

func (*ConfigureProvider) String

func (x *ConfigureProvider) String() string

type ConfigureProvider_Request

type ConfigureProvider_Request struct {

	// Version of cloudquery executing this plugin
	CloudqueryVersion string `protobuf:"bytes,1,opt,name=cloudquery_version,json=cloudqueryVersion,proto3" json:"cloudquery_version,omitempty"`
	// Connection details for connecting to the database
	Connection *ConnectionDetails `protobuf:"bytes,2,opt,name=connection,proto3" json:"connection,omitempty"`
	// Holds information such as credentials, regions, accounts, etc'
	Config []byte `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
	// Disables auto delete of table data before fetch of resources
	DisableDelete bool `protobuf:"varint,4,opt,name=disableDelete,proto3" json:"disableDelete,omitempty"`
	// Allows to inject & override fields into resource tables, use this carefully to override fields
	ExtraFields []byte `protobuf:"bytes,5,opt,name=extraFields,proto3" json:"extraFields,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigureProvider_Request) Descriptor deprecated

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

Deprecated: Use ConfigureProvider_Request.ProtoReflect.Descriptor instead.

func (*ConfigureProvider_Request) GetCloudqueryVersion

func (x *ConfigureProvider_Request) GetCloudqueryVersion() string

func (*ConfigureProvider_Request) GetConfig

func (x *ConfigureProvider_Request) GetConfig() []byte

func (*ConfigureProvider_Request) GetConnection

func (x *ConfigureProvider_Request) GetConnection() *ConnectionDetails

func (*ConfigureProvider_Request) GetDisableDelete added in v0.3.0

func (x *ConfigureProvider_Request) GetDisableDelete() bool

func (*ConfigureProvider_Request) GetExtraFields added in v0.3.0

func (x *ConfigureProvider_Request) GetExtraFields() []byte

func (*ConfigureProvider_Request) ProtoMessage

func (*ConfigureProvider_Request) ProtoMessage()

func (*ConfigureProvider_Request) ProtoReflect

func (*ConfigureProvider_Request) Reset

func (x *ConfigureProvider_Request) Reset()

func (*ConfigureProvider_Request) String

func (x *ConfigureProvider_Request) String() string

type ConfigureProvider_Response

type ConfigureProvider_Response struct {
	Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigureProvider_Response) Descriptor deprecated

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

Deprecated: Use ConfigureProvider_Response.ProtoReflect.Descriptor instead.

func (*ConfigureProvider_Response) GetError

func (x *ConfigureProvider_Response) GetError() string

func (*ConfigureProvider_Response) ProtoMessage

func (*ConfigureProvider_Response) ProtoMessage()

func (*ConfigureProvider_Response) ProtoReflect

func (*ConfigureProvider_Response) Reset

func (x *ConfigureProvider_Response) Reset()

func (*ConfigureProvider_Response) String

func (x *ConfigureProvider_Response) String() string

type ConnectionDetails

type ConnectionDetails struct {
	Type ConnectionType `protobuf:"varint,1,opt,name=type,proto3,enum=proto.ConnectionType" json:"type,omitempty"`
	Dsn  string         `protobuf:"bytes,2,opt,name=dsn,proto3" json:"dsn,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectionDetails) Descriptor deprecated

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

Deprecated: Use ConnectionDetails.ProtoReflect.Descriptor instead.

func (*ConnectionDetails) GetDsn

func (x *ConnectionDetails) GetDsn() string

func (*ConnectionDetails) GetType

func (x *ConnectionDetails) GetType() ConnectionType

func (*ConnectionDetails) ProtoMessage

func (*ConnectionDetails) ProtoMessage()

func (*ConnectionDetails) ProtoReflect

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

func (*ConnectionDetails) Reset

func (x *ConnectionDetails) Reset()

func (*ConnectionDetails) String

func (x *ConnectionDetails) String() string

type ConnectionType

type ConnectionType int32
const (
	ConnectionType_POSTGRES ConnectionType = 0
)

func (ConnectionType) Descriptor

func (ConnectionType) Enum

func (x ConnectionType) Enum() *ConnectionType

func (ConnectionType) EnumDescriptor deprecated

func (ConnectionType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConnectionType.Descriptor instead.

func (ConnectionType) Number

func (ConnectionType) String

func (x ConnectionType) String() string

func (ConnectionType) Type

type FetchResources

type FetchResources struct {
	// contains filtered or unexported fields
}

func (*FetchResources) Descriptor deprecated

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

Deprecated: Use FetchResources.ProtoReflect.Descriptor instead.

func (*FetchResources) ProtoMessage

func (*FetchResources) ProtoMessage()

func (*FetchResources) ProtoReflect

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

func (*FetchResources) Reset

func (x *FetchResources) Reset()

func (*FetchResources) String

func (x *FetchResources) String() string

type FetchResources_Request

type FetchResources_Request struct {

	// list of resources provider is requested to fetch
	Resources []string `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchResources_Request) Descriptor deprecated

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

Deprecated: Use FetchResources_Request.ProtoReflect.Descriptor instead.

func (*FetchResources_Request) GetResources

func (x *FetchResources_Request) GetResources() []string

func (*FetchResources_Request) ProtoMessage

func (*FetchResources_Request) ProtoMessage()

func (*FetchResources_Request) ProtoReflect

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

func (*FetchResources_Request) Reset

func (x *FetchResources_Request) Reset()

func (*FetchResources_Request) String

func (x *FetchResources_Request) String() string

type FetchResources_Response

type FetchResources_Response struct {

	// map of resources that have finished fetching
	FinishedResources map[string]bool `` /* 201-byte string literal not displayed */
	// Amount of resources collected so far
	ResourceCount uint64 `protobuf:"varint,2,opt,name=resource_count,json=resourceCount,proto3" json:"resource_count,omitempty"`
	// Error value if any, if returned the stream will be canceled
	Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchResources_Response) Descriptor deprecated

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

Deprecated: Use FetchResources_Response.ProtoReflect.Descriptor instead.

func (*FetchResources_Response) GetError

func (x *FetchResources_Response) GetError() string

func (*FetchResources_Response) GetFinishedResources

func (x *FetchResources_Response) GetFinishedResources() map[string]bool

func (*FetchResources_Response) GetResourceCount

func (x *FetchResources_Response) GetResourceCount() uint64

func (*FetchResources_Response) ProtoMessage

func (*FetchResources_Response) ProtoMessage()

func (*FetchResources_Response) ProtoReflect

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

func (*FetchResources_Response) Reset

func (x *FetchResources_Response) Reset()

func (*FetchResources_Response) String

func (x *FetchResources_Response) String() string

type GetProviderConfig

type GetProviderConfig struct {
	// contains filtered or unexported fields
}

func (*GetProviderConfig) Descriptor deprecated

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

Deprecated: Use GetProviderConfig.ProtoReflect.Descriptor instead.

func (*GetProviderConfig) ProtoMessage

func (*GetProviderConfig) ProtoMessage()

func (*GetProviderConfig) ProtoReflect

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

func (*GetProviderConfig) Reset

func (x *GetProviderConfig) Reset()

func (*GetProviderConfig) String

func (x *GetProviderConfig) String() string

type GetProviderConfig_Request

type GetProviderConfig_Request struct {
	// contains filtered or unexported fields
}

func (*GetProviderConfig_Request) Descriptor deprecated

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

Deprecated: Use GetProviderConfig_Request.ProtoReflect.Descriptor instead.

func (*GetProviderConfig_Request) ProtoMessage

func (*GetProviderConfig_Request) ProtoMessage()

func (*GetProviderConfig_Request) ProtoReflect

func (*GetProviderConfig_Request) Reset

func (x *GetProviderConfig_Request) Reset()

func (*GetProviderConfig_Request) String

func (x *GetProviderConfig_Request) String() string

type GetProviderConfig_Response

type GetProviderConfig_Response struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	Config  []byte `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*GetProviderConfig_Response) Descriptor deprecated

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

Deprecated: Use GetProviderConfig_Response.ProtoReflect.Descriptor instead.

func (*GetProviderConfig_Response) GetConfig

func (x *GetProviderConfig_Response) GetConfig() []byte

func (*GetProviderConfig_Response) GetName

func (x *GetProviderConfig_Response) GetName() string

func (*GetProviderConfig_Response) GetVersion

func (x *GetProviderConfig_Response) GetVersion() string

func (*GetProviderConfig_Response) ProtoMessage

func (*GetProviderConfig_Response) ProtoMessage()

func (*GetProviderConfig_Response) ProtoReflect

func (*GetProviderConfig_Response) Reset

func (x *GetProviderConfig_Response) Reset()

func (*GetProviderConfig_Response) String

func (x *GetProviderConfig_Response) String() string

type GetProviderSchema

type GetProviderSchema struct {
	// contains filtered or unexported fields
}

func (*GetProviderSchema) Descriptor deprecated

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

Deprecated: Use GetProviderSchema.ProtoReflect.Descriptor instead.

func (*GetProviderSchema) ProtoMessage

func (*GetProviderSchema) ProtoMessage()

func (*GetProviderSchema) ProtoReflect

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

func (*GetProviderSchema) Reset

func (x *GetProviderSchema) Reset()

func (*GetProviderSchema) String

func (x *GetProviderSchema) String() string

type GetProviderSchema_Request

type GetProviderSchema_Request struct {
	// contains filtered or unexported fields
}

func (*GetProviderSchema_Request) Descriptor deprecated

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

Deprecated: Use GetProviderSchema_Request.ProtoReflect.Descriptor instead.

func (*GetProviderSchema_Request) ProtoMessage

func (*GetProviderSchema_Request) ProtoMessage()

func (*GetProviderSchema_Request) ProtoReflect

func (*GetProviderSchema_Request) Reset

func (x *GetProviderSchema_Request) Reset()

func (*GetProviderSchema_Request) String

func (x *GetProviderSchema_Request) String() string

type GetProviderSchema_Response

type GetProviderSchema_Response struct {
	Name           string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Version        string            `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	ResourceTables map[string]*Table `` /* 191-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetProviderSchema_Response) Descriptor deprecated

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

Deprecated: Use GetProviderSchema_Response.ProtoReflect.Descriptor instead.

func (*GetProviderSchema_Response) GetName

func (x *GetProviderSchema_Response) GetName() string

func (*GetProviderSchema_Response) GetResourceTables

func (x *GetProviderSchema_Response) GetResourceTables() map[string]*Table

func (*GetProviderSchema_Response) GetVersion

func (x *GetProviderSchema_Response) GetVersion() string

func (*GetProviderSchema_Response) ProtoMessage

func (*GetProviderSchema_Response) ProtoMessage()

func (*GetProviderSchema_Response) ProtoReflect

func (*GetProviderSchema_Response) Reset

func (x *GetProviderSchema_Response) Reset()

func (*GetProviderSchema_Response) String

func (x *GetProviderSchema_Response) String() string

type ProviderClient

type ProviderClient interface {
	// Information about what a provider supports/expects
	GetProviderSchema(ctx context.Context, in *GetProviderSchema_Request, opts ...grpc.CallOption) (*GetProviderSchema_Response, error)
	// Gets a provider's configuration example
	GetProviderConfig(ctx context.Context, in *GetProviderConfig_Request, opts ...grpc.CallOption) (*GetProviderConfig_Response, error)
	// One-time initialization, called before other functions below
	ConfigureProvider(ctx context.Context, in *ConfigureProvider_Request, opts ...grpc.CallOption) (*ConfigureProvider_Response, error)
	// Fetch Provider Resources
	FetchResources(ctx context.Context, in *FetchResources_Request, opts ...grpc.CallOption) (Provider_FetchResourcesClient, error)
}

ProviderClient is the client API for Provider service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewProviderClient

func NewProviderClient(cc grpc.ClientConnInterface) ProviderClient

type ProviderServer

type ProviderServer interface {
	// Information about what a provider supports/expects
	GetProviderSchema(context.Context, *GetProviderSchema_Request) (*GetProviderSchema_Response, error)
	// Gets a provider's configuration example
	GetProviderConfig(context.Context, *GetProviderConfig_Request) (*GetProviderConfig_Response, error)
	// One-time initialization, called before other functions below
	ConfigureProvider(context.Context, *ConfigureProvider_Request) (*ConfigureProvider_Response, error)
	// Fetch Provider Resources
	FetchResources(*FetchResources_Request, Provider_FetchResourcesServer) error
}

ProviderServer is the server API for Provider service.

type Provider_FetchResourcesClient

type Provider_FetchResourcesClient interface {
	Recv() (*FetchResources_Response, error)
	grpc.ClientStream
}

type Provider_FetchResourcesServer

type Provider_FetchResourcesServer interface {
	Send(*FetchResources_Response) error
	grpc.ServerStream
}

type Table

type Table struct {
	Name        string                `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string                `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Columns     []*Column             `protobuf:"bytes,3,rep,name=columns,proto3" json:"columns,omitempty"`
	Relations   []*Table              `protobuf:"bytes,4,rep,name=relations,proto3" json:"relations,omitempty"`
	Options     *TableCreationOptions `protobuf:"bytes,5,opt,name=options,proto3,oneof" json:"options,omitempty"`
	// contains filtered or unexported fields
}

Table is the definition of how a table is defined in a provider

func (*Table) Descriptor deprecated

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

Deprecated: Use Table.ProtoReflect.Descriptor instead.

func (*Table) GetColumns

func (x *Table) GetColumns() []*Column

func (*Table) GetDescription

func (x *Table) GetDescription() string

func (*Table) GetName

func (x *Table) GetName() string

func (*Table) GetOptions added in v0.3.0

func (x *Table) GetOptions() *TableCreationOptions

func (*Table) GetRelations

func (x *Table) GetRelations() []*Table

func (*Table) ProtoMessage

func (*Table) ProtoMessage()

func (*Table) ProtoReflect

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

func (*Table) Reset

func (x *Table) Reset()

func (*Table) String

func (x *Table) String() string

type TableCreationOptions added in v0.3.0

type TableCreationOptions struct {
	PrimaryKeys []string `protobuf:"bytes,1,rep,name=PrimaryKeys,proto3" json:"PrimaryKeys,omitempty"`
	// contains filtered or unexported fields
}

func (*TableCreationOptions) Descriptor deprecated added in v0.3.0

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

Deprecated: Use TableCreationOptions.ProtoReflect.Descriptor instead.

func (*TableCreationOptions) GetPrimaryKeys added in v0.3.0

func (x *TableCreationOptions) GetPrimaryKeys() []string

func (*TableCreationOptions) ProtoMessage added in v0.3.0

func (*TableCreationOptions) ProtoMessage()

func (*TableCreationOptions) ProtoReflect added in v0.3.0

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

func (*TableCreationOptions) Reset added in v0.3.0

func (x *TableCreationOptions) Reset()

func (*TableCreationOptions) String added in v0.3.0

func (x *TableCreationOptions) String() string

type UnimplementedProviderServer

type UnimplementedProviderServer struct {
}

UnimplementedProviderServer can be embedded to have forward compatible implementations.

func (*UnimplementedProviderServer) ConfigureProvider

func (*UnimplementedProviderServer) FetchResources

func (*UnimplementedProviderServer) GetProviderConfig

func (*UnimplementedProviderServer) GetProviderSchema

Jump to

Keyboard shortcuts

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