Skip to content

Commit

Permalink
Bring back GetRequestType()
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha committed Nov 1, 2023
1 parent f684560 commit 558e6c4
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apis/ops/v1alpha1/elasticsearch_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func (e *ElasticsearchOpsRequest) GetDBRefName() string {
return e.Spec.DatabaseRef.Name
}

func (e *ElasticsearchOpsRequest) GetRequestType() any {
return e.Spec.Type
}

func (e *ElasticsearchOpsRequest) GetStatus() OpsRequestStatus {
return e.Status
}
Expand Down
4 changes: 4 additions & 0 deletions apis/ops/v1alpha1/etcd_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func (e *EtcdOpsRequest) GetDBRefName() string {
return e.Spec.DatabaseRef.Name
}

func (e *EtcdOpsRequest) GetRequestType() any {
return e.Spec.Type
}

func (e *EtcdOpsRequest) GetStatus() OpsRequestStatus {
return e.Status
}
Expand Down
4 changes: 4 additions & 0 deletions apis/ops/v1alpha1/kafka_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ func (k *KafkaOpsRequest) GetDBRefName() string {
return k.Spec.DatabaseRef.Name
}

func (k *KafkaOpsRequest) GetRequestType() any {
return k.Spec.Type
}

func (k *KafkaOpsRequest) GetStatus() OpsRequestStatus {
return k.Status
}
Expand Down
4 changes: 4 additions & 0 deletions apis/ops/v1alpha1/mariadb_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ func (m *MariaDBOpsRequest) GetDBRefName() string {
return m.Spec.DatabaseRef.Name
}

func (m *MariaDBOpsRequest) GetRequestType() any {
return m.Spec.Type
}

func (m *MariaDBOpsRequest) GetStatus() OpsRequestStatus {
return m.Status
}
Expand Down
4 changes: 4 additions & 0 deletions apis/ops/v1alpha1/memcached_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func (m *MemcachedOpsRequest) GetDBRefName() string {
return m.Spec.DatabaseRef.Name
}

func (m *MemcachedOpsRequest) GetRequestType() any {
return m.Spec.Type
}

func (m *MemcachedOpsRequest) GetStatus() OpsRequestStatus {
return m.Status
}
Expand Down
4 changes: 4 additions & 0 deletions apis/ops/v1alpha1/mongodb_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func (m *MongoDBOpsRequest) GetDBRefName() string {
return m.Spec.DatabaseRef.Name
}

func (m *MongoDBOpsRequest) GetRequestType() any {
return m.Spec.Type
}

func (m *MongoDBOpsRequest) GetStatus() OpsRequestStatus {
return m.Status
}
Expand Down
4 changes: 4 additions & 0 deletions apis/ops/v1alpha1/mysql_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ func (m *MySQLOpsRequest) GetDBRefName() string {
return m.Spec.DatabaseRef.Name
}

func (m *MySQLOpsRequest) GetRequestType() any {
return m.Spec.Type
}

func (m *MySQLOpsRequest) GetStatus() OpsRequestStatus {
return m.Status
}
Expand Down
4 changes: 4 additions & 0 deletions apis/ops/v1alpha1/perconaxtradb_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func (p *PerconaXtraDBOpsRequest) GetDBRefName() string {
return p.Spec.DatabaseRef.Name
}

func (p *PerconaXtraDBOpsRequest) GetRequestType() any {
return p.Spec.Type
}

func (p *PerconaXtraDBOpsRequest) GetStatus() OpsRequestStatus {
return p.Status
}
Expand Down
4 changes: 4 additions & 0 deletions apis/ops/v1alpha1/pgbouncer_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func (p *PgBouncerOpsRequest) GetDBRefName() string {
return p.Spec.ServerRef.Name
}

func (p *PgBouncerOpsRequest) GetRequestType() any {
return p.Spec.Type
}

func (p *PgBouncerOpsRequest) GetStatus() OpsRequestStatus {
return p.Status
}
Expand Down
4 changes: 4 additions & 0 deletions apis/ops/v1alpha1/postgres_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func (p *PostgresOpsRequest) GetDBRefName() string {
return p.Spec.DatabaseRef.Name
}

func (p *PostgresOpsRequest) GetRequestType() any {
return p.Spec.Type
}

func (p *PostgresOpsRequest) GetStatus() OpsRequestStatus {
return p.Status
}
Expand Down
4 changes: 4 additions & 0 deletions apis/ops/v1alpha1/proxysql_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ func (p *ProxySQLOpsRequest) GetDBRefName() string {
return p.Spec.ProxyRef.Name
}

func (p *ProxySQLOpsRequest) GetRequestType() any {
return p.Spec.Type
}

func (p *ProxySQLOpsRequest) GetStatus() OpsRequestStatus {
return p.Status
}
Expand Down
4 changes: 4 additions & 0 deletions apis/ops/v1alpha1/redis_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func (r *RedisOpsRequest) GetDBRefName() string {
return r.Spec.DatabaseRef.Name
}

func (r *RedisOpsRequest) GetRequestType() any {
return r.Spec.Type
}

func (r *RedisOpsRequest) GetStatus() OpsRequestStatus {
return r.Status
}
Expand Down
4 changes: 4 additions & 0 deletions apis/ops/v1alpha1/redis_sentinel_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func (r *RedisSentinelOpsRequest) GetDBRefName() string {
return r.Spec.DatabaseRef.Name
}

func (r *RedisSentinelOpsRequest) GetRequestType() any {
return r.Spec.Type
}

func (r *RedisSentinelOpsRequest) GetStatus() OpsRequestStatus {
return r.Status
}
Expand Down
1 change: 1 addition & 0 deletions apis/ops/v1alpha1/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const (
type Accessor interface {
GetObjectMeta() metav1.ObjectMeta
GetDBRefName() string
GetRequestType() any
GetStatus() OpsRequestStatus
SetStatus(_ OpsRequestStatus)
}

0 comments on commit 558e6c4

Please sign in to comment.