Documentation ¶
Index ¶
- func ApplyOperation(s *AnnotatedSchema, op scoop_protocol.Operation) error
- func ApplyOperations(s *AnnotatedSchema, operations []scoop_protocol.Operation) error
- type ActiveUser
- type AllEventMetadata
- type AnnotatedSchema
- type BpKinesisConfigBackend
- type BpSchemaBackend
- type Bpdb
- type DailyChange
- type EventMetadata
- type EventMetadataRow
- type MaintenanceMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyOperation ¶
func ApplyOperation(s *AnnotatedSchema, op scoop_protocol.Operation) error
ApplyOperation applies a single operation to the schema, migrating the schema to a new state
func ApplyOperations ¶
func ApplyOperations(s *AnnotatedSchema, operations []scoop_protocol.Operation) error
ApplyOperations applies the list of operations in order to the schema, migrating the schema to a new state
Types ¶
type ActiveUser ¶
ActiveUser is a count of the number of changes a user has made.
type AllEventMetadata ¶
type AllEventMetadata struct {
Metadata map[string](map[string]EventMetadataRow)
}
AllEventMetadata is the metadata for all events
type AnnotatedSchema ¶
type AnnotatedSchema struct { EventName string Columns []scoop_protocol.ColumnDefinition Version int CreatedTS time.Time TS time.Time UserName string Dropped bool DropRequested bool Reason string }
AnnotatedSchema is a schema annotated with modification information.
type BpKinesisConfigBackend ¶
type BpKinesisConfigBackend interface { AllKinesisConfigs() ([]scoop_protocol.AnnotatedKinesisConfig, error) KinesisConfig(account int64, streamType string, name string) (*scoop_protocol.AnnotatedKinesisConfig, error) UpdateKinesisConfig(update *scoop_protocol.AnnotatedKinesisConfig, user string) *core.WebError CreateKinesisConfig(config *scoop_protocol.AnnotatedKinesisConfig, user string) *core.WebError DropKinesisConfig(config *scoop_protocol.AnnotatedKinesisConfig, reason string, user string) error }
BpKinesisConfigBackend is the interface of the blueprint db backend that stores kinesis config state
func NewKinesisConfigBackend ¶
func NewKinesisConfigBackend(db *sql.DB, filters []string) BpKinesisConfigBackend
NewKinesisConfigBackend creates a postgres bpdb backend to interface with the kinesis configuration store
type BpSchemaBackend ¶
type BpSchemaBackend interface { AllSchemas() ([]AnnotatedSchema, error) Schema(name string, version *int) (*AnnotatedSchema, error) UpdateSchema(update *core.ClientUpdateSchemaRequest, user string) *core.WebError CreateSchema(schema *scoop_protocol.Config, user string) *core.WebError Migration(table string, from int, to int) ([]*scoop_protocol.Operation, error) DropSchema(schema *AnnotatedSchema, reason string, exists bool, user string) error AllEventMetadata() (*AllEventMetadata, error) UpdateEventMetadata(req *core.ClientUpdateEventMetadataRequest, user string) *core.WebError }
BpSchemaBackend is the interface of the blueprint db backend that stores schema state
func NewSchemaBackend ¶
func NewSchemaBackend(db *sql.DB) (BpSchemaBackend, error)
NewSchemaBackend creates a postgres bpdb backend to interface with the kinesis configuration store
type Bpdb ¶
type Bpdb interface { GetMaintenanceMode() MaintenanceMode SetMaintenanceMode(switchingOn bool, user, reason string) error ActiveUsersLast30Days() ([]*ActiveUser, error) DailyChangesLast30Days() ([]*DailyChange, error) GetSchemaMaintenanceMode(string) (MaintenanceMode, error) SetSchemaMaintenanceMode(schema string, switchingOn bool, user, reason string) error }
Bpdb is the interface of the blueprint db backend that interacts with global maintenance mode and stats
type DailyChange ¶
DailyChange is a count of changes by users on a day.
type EventMetadata ¶
type EventMetadata struct { EventName string Metadata map[string]EventMetadataRow // The key in the map is a MetadataType }
EventMetadata is the metadata associated with an event schema
type EventMetadataRow ¶
EventMetadataRow stores the data of one row of event_metadata (excluding EventName and MetadataType)
type MaintenanceMode ¶
MaintenanceMode represents a maintenance mode state and user that created that state