Documentation
¶
Index ¶
- type Classifier
- type Column
- type Connection
- type Crawler
- type CrawlerTargets
- type Database
- type GlueService
- type Job
- type JobCommand
- type JobRun
- type LastCrawlInfo
- type Partition
- type PhysicalConnectionRequirements
- type S3Target
- type ServiceLocator
- type StorageDescriptor
- type Store
- func (s *Store) BatchCreatePartitions(dbName, tableName string, partitions []*Partition) []*Partition
- func (s *Store) CreateClassifier(classifier *Classifier) bool
- func (s *Store) CreateConnection(conn *Connection) bool
- func (s *Store) CreateCrawler(name, role, dbName, description, schedule string, targets CrawlerTargets, ...) (*Crawler, bool)
- func (s *Store) CreateDatabase(name, description, locationURI string) (*Database, bool)
- func (s *Store) CreateJob(job *Job) bool
- func (s *Store) CreatePartition(dbName, tableName string, partition *Partition) bool
- func (s *Store) CreateTable(dbName string, table *Table) bool
- func (s *Store) CreateTrigger(trigger *Trigger) bool
- func (s *Store) DeleteClassifier(name string) bool
- func (s *Store) DeleteConnection(name string) bool
- func (s *Store) DeleteCrawler(name string) bool
- func (s *Store) DeleteDatabase(name string) bool
- func (s *Store) DeleteJob(name string) bool
- func (s *Store) DeletePartition(dbName, tableName string, values []string) bool
- func (s *Store) DeleteTable(dbName, tableName string) bool
- func (s *Store) DeleteTrigger(name string) bool
- func (s *Store) GetClassifier(name string) (*Classifier, bool)
- func (s *Store) GetConnection(name string) (*Connection, bool)
- func (s *Store) GetCrawler(name string) (*Crawler, bool)
- func (s *Store) GetDatabase(name string) (*Database, bool)
- func (s *Store) GetJob(name string) (*Job, bool)
- func (s *Store) GetJobRun(jobName, runID string) (*JobRun, bool)
- func (s *Store) GetPartitions(dbName, tableName string) []*Partition
- func (s *Store) GetTable(dbName, tableName string) (*Table, bool)
- func (s *Store) GetTags(arn string) map[string]string
- func (s *Store) GetTrigger(name string) (*Trigger, bool)
- func (s *Store) ListClassifiers() []*Classifier
- func (s *Store) ListConnections() []*Connection
- func (s *Store) ListCrawlers() []*Crawler
- func (s *Store) ListDatabases() []*Database
- func (s *Store) ListJobRuns(jobName string) []*JobRun
- func (s *Store) ListJobs() []*Job
- func (s *Store) ListTables(dbName string) []*Table
- func (s *Store) ListTriggers() []*Trigger
- func (s *Store) SetLocator(locator ServiceLocator)
- func (s *Store) StartCrawler(name string) bool
- func (s *Store) StartJobRun(jobName string) (*JobRun, bool)
- func (s *Store) StopCrawler(name string) bool
- func (s *Store) StopJobRun(jobName, runID string) bool
- func (s *Store) TagResource(arn string, tags map[string]string)
- func (s *Store) UntagResource(arn string, keys []string)
- func (s *Store) UpdateCrawler(name, role, description, schedule string) bool
- func (s *Store) UpdateDatabase(name, description, locationURI string) bool
- func (s *Store) UpdateJob(name, role, description string, maxRetries int) bool
- func (s *Store) UpdateTable(dbName string, table *Table) bool
- func (s *Store) UpdateTrigger(name, description, schedule string) bool
- type Table
- type Trigger
- type TriggerAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Classifier ¶
type Classifier struct {
Name string
Type string // GROK, XML, JSON, CSV
GrokPattern string
CustomPatterns string
CreateTime time.Time
LastUpdated time.Time
}
Classifier represents a Glue classifier.
type Connection ¶
type Connection struct {
Name string
Description string
ConnectionType string
ConnectionProperties map[string]string
PhysicalConnectionRequirements *PhysicalConnectionRequirements
CreateTime time.Time
}
Connection represents a Glue connection.
type Crawler ¶
type Crawler struct {
Name string
Role string
DatabaseName string
Description string
Targets CrawlerTargets
Schedule string
State string
Lifecycle *lifecycle.Machine
CreateTime time.Time
LastUpdated time.Time
Tags map[string]string
LastCrawl *LastCrawlInfo
}
Crawler represents a Glue crawler.
type CrawlerTargets ¶
type CrawlerTargets struct {
S3Targets []S3Target
}
CrawlerTargets holds crawler target configuration.
type Database ¶
type Database struct {
Name string
Description string
LocationURI string
CreateTime time.Time
Parameters map[string]string
}
Database represents a Glue catalog database.
type GlueService ¶
type GlueService struct {
// contains filtered or unexported fields
}
GlueService is the cloudmock implementation of the AWS Glue API.
func New ¶
func New(accountID, region string) *GlueService
New returns a new GlueService for the given AWS account ID and region.
func (*GlueService) Actions ¶
func (s *GlueService) Actions() []service.Action
Actions returns the list of Glue API actions supported by this service.
func (*GlueService) HandleRequest ¶
func (s *GlueService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
HandleRequest routes an incoming Glue request to the appropriate handler.
func (*GlueService) HealthCheck ¶
func (s *GlueService) HealthCheck() error
HealthCheck always returns nil (no external dependencies).
func (*GlueService) Name ¶
func (s *GlueService) Name() string
Name returns the AWS service name used for routing.
func (*GlueService) SetLocator ¶
func (s *GlueService) SetLocator(locator ServiceLocator)
SetLocator sets the service locator for cross-service lookups (e.g., S3 for crawlers).
type Job ¶
type Job struct {
Name string
Role string
Command JobCommand
Description string
MaxRetries int
MaxCapacity float64
GlueVersion string
NumberOfWorkers int
WorkerType string
CreateTime time.Time
Tags map[string]string
}
Job represents a Glue ETL job.
type JobCommand ¶
JobCommand holds the script location and language.
type JobRun ¶
type JobRun struct {
ID string
JobName string
State string
StartedOn time.Time
CompletedOn *time.Time
Lifecycle *lifecycle.Machine
ErrorMessage string
Attempt int
ExecutionTime int
}
JobRun represents a single execution of a job.
type LastCrawlInfo ¶
type LastCrawlInfo struct {
Status string // SUCCEEDED, FAILED
ErrorMessage string
LogGroup string
LogStream string
MessagePrefix string
StartTime time.Time
TablesCreated int
TablesUpdated int
}
LastCrawlInfo holds metadata about the most recent crawler run.
type Partition ¶
type Partition struct {
DatabaseName string
TableName string
Values []string
StorageDesc StorageDescriptor
Parameters map[string]string
CreateTime time.Time
}
Partition represents a table partition.
type PhysicalConnectionRequirements ¶
type PhysicalConnectionRequirements struct {
SubnetID string
SecurityGroupIDList []string
AvailabilityZone string
}
PhysicalConnectionRequirements holds network config.
type ServiceLocator ¶
ServiceLocator resolves other services by name.
type StorageDescriptor ¶
type StorageDescriptor struct {
Location string
InputFormat string
OutputFormat string
Columns []Column
}
StorageDescriptor holds storage info for a table.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages all Glue resources in memory.
func (*Store) BatchCreatePartitions ¶
func (*Store) CreateClassifier ¶
func (s *Store) CreateClassifier(classifier *Classifier) bool
func (*Store) CreateConnection ¶
func (s *Store) CreateConnection(conn *Connection) bool
func (*Store) CreateCrawler ¶
func (*Store) CreateDatabase ¶
func (*Store) CreatePartition ¶
func (*Store) CreateTrigger ¶
func (*Store) DeleteClassifier ¶
func (*Store) DeleteConnection ¶
func (*Store) DeleteCrawler ¶
func (*Store) DeleteDatabase ¶
func (*Store) DeletePartition ¶
func (*Store) DeleteTable ¶
func (*Store) DeleteTrigger ¶
func (*Store) GetClassifier ¶
func (s *Store) GetClassifier(name string) (*Classifier, bool)
func (*Store) GetConnection ¶
func (s *Store) GetConnection(name string) (*Connection, bool)
func (*Store) GetPartitions ¶
func (*Store) ListClassifiers ¶
func (s *Store) ListClassifiers() []*Classifier
func (*Store) ListConnections ¶
func (s *Store) ListConnections() []*Connection
func (*Store) ListCrawlers ¶
func (*Store) ListDatabases ¶
func (*Store) ListJobRuns ¶
func (*Store) ListTables ¶
func (*Store) ListTriggers ¶
func (*Store) SetLocator ¶
func (s *Store) SetLocator(locator ServiceLocator)
SetLocator sets the service locator for cross-service lookups.
func (*Store) StartCrawler ¶
func (*Store) StopCrawler ¶
func (*Store) StopJobRun ¶
func (*Store) UntagResource ¶
func (*Store) UpdateCrawler ¶
UpdateCrawler updates crawler settings.
func (*Store) UpdateDatabase ¶
UpdateDatabase updates a database's description and location.
func (*Store) UpdateTrigger ¶
type Table ¶
type Table struct {
Name string
DatabaseName string
Description string
StorageDesc StorageDescriptor
Parameters map[string]string
CreateTime time.Time
UpdateTime time.Time
}
Table represents a Glue catalog table.
type Trigger ¶
type Trigger struct {
Name string
Type string // SCHEDULED, CONDITIONAL, ON_DEMAND
State string // CREATED, ACTIVATED, DEACTIVATED
Description string
Schedule string
Actions []TriggerAction
CreateTime time.Time
Tags map[string]string
}
Trigger represents a Glue trigger.
type TriggerAction ¶
TriggerAction describes what the trigger does.