Skip to content

Commit

Permalink
Merge pull request #163 from illacloud/beta
Browse files Browse the repository at this point in the history
Release: v2.3.1
  • Loading branch information
naj1n authored Apr 26, 2023
2 parents 4150313 + e3baab7 commit 27886b7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
3 changes: 2 additions & 1 deletion pkg/action/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ var (
ORACLE_ACTION = "oracle"
APPWRITE_ACTION = "appwrite"
GOOGLESHEETS_ACTION = "googlesheets"
NEON_ACTION = "neon"
)

type AbstractActionFactory interface {
Expand All @@ -81,7 +82,7 @@ func (f *Factory) Build() common.DataConnector {
case MYSQL_ACTION, MARIADB_ACTION, TIDB_ACTION:
sqlAction := &mysql.MySQLConnector{}
return sqlAction
case POSTGRESQL_ACTION, SUPABASEDB_ACTION:
case POSTGRESQL_ACTION, SUPABASEDB_ACTION, NEON_ACTION:
pgsAction := &postgresql.Connector{}
return pgsAction
case REDIS_ACTION:
Expand Down
9 changes: 5 additions & 4 deletions pkg/action/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"go.uber.org/zap"
)

var type_array = [24]string{"transformer", "restapi", "graphql", "redis", "mysql", "mariadb", "postgresql", "mongodb",
var type_array = [25]string{"transformer", "restapi", "graphql", "redis", "mysql", "mariadb", "postgresql", "mongodb",
"tidb", "elasticsearch", "s3", "smtp", "supabasedb", "firebase", "clickhouse", "mssql", "huggingface", "dynamodb",
"snowflake", "couchdb", "hfendpoint", "oracle", "appwrite", "googlesheets"}
"snowflake", "couchdb", "hfendpoint", "oracle", "appwrite", "googlesheets", "neon"}
var type_map = map[string]int{
"transformer": 0,
"restapi": 1,
Expand All @@ -53,6 +53,7 @@ var type_map = map[string]int{
"oracle": 21,
"appwrite": 22,
"googlesheets": 23,
"neon": 24,
}

type ActionService interface {
Expand All @@ -75,7 +76,7 @@ type ActionDto struct {
Version int `json:"-"`
Resource int `json:"resourceId,omitempty"`
DisplayName string `json:"displayName" validate:"required"`
Type string `json:"actionType" validate:"oneof=transformer restapi graphql redis mysql mariadb postgresql mongodb tidb elasticsearch s3 smtp supabasedb firebase clickhouse mssql huggingface dynamodb snowflake couchdb hfendpoint oracle appwrite googlesheets"`
Type string `json:"actionType" validate:"oneof=transformer restapi graphql redis mysql mariadb postgresql mongodb tidb elasticsearch s3 smtp supabasedb firebase clickhouse mssql huggingface dynamodb snowflake couchdb hfendpoint oracle appwrite googlesheets neon"`
Template map[string]interface{} `json:"content" validate:"required"`
Transformer map[string]interface{} `json:"transformer" validate:"required"`
TriggerMode string `json:"triggerMode" validate:"oneof=manually automate"`
Expand All @@ -94,7 +95,7 @@ type ActionDtoForExport struct {
Version int `json:"-"`
Resource string `json:"resourceId,omitempty"`
DisplayName string `json:"displayName" validate:"required"`
Type string `json:"actionType" validate:"oneof=transformer restapi graphql redis mysql mariadb postgresql mongodb tidb elasticsearch s3 smtp supabasedb firebase clickhouse mssql huggingface dynamodb snowflake couchdb hfendpoint oracle appwrite"`
Type string `json:"actionType" validate:"oneof=transformer restapi graphql redis mysql mariadb postgresql mongodb tidb elasticsearch s3 smtp supabasedb firebase clickhouse mssql huggingface dynamodb snowflake couchdb hfendpoint oracle appwrite googlesheets neon"`
Template map[string]interface{} `json:"content" validate:"required"`
Transformer map[string]interface{} `json:"transformer" validate:"required"`
TriggerMode string `json:"triggerMode" validate:"oneof=manually automate"`
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ type AppServiceImpl struct {
actionRepository repository.ActionRepository
}

var type_array = [24]string{"transformer", "restapi", "graphql", "redis", "mysql", "mariadb", "postgresql", "mongodb",
var type_array = [25]string{"transformer", "restapi", "graphql", "redis", "mysql", "mariadb", "postgresql", "mongodb",
"tidb", "elasticsearch", "s3", "smtp", "supabasedb", "firebase", "clickhouse", "mssql", "huggingface", "dynamodb",
"snowflake", "couchdb", "hfendpoint", "oracle", "appwrite", "googlesheets"}
"snowflake", "couchdb", "hfendpoint", "oracle", "appwrite", "googlesheets", "neon"}

type AppDto struct {
ID int `json:"appId"` // generated by database primary key serial
Expand Down
3 changes: 2 additions & 1 deletion pkg/resource/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ var (
ORACLE_RESOURCE = "oracle"
APPWRITE_RESOURCE = "appwrite"
GOOGLESHEETS_RESOURCE = "googlesheets"
NEON_RESOURCE = "neon"
)

type AbstractResourceFactory interface {
Expand All @@ -80,7 +81,7 @@ func (f *Factory) Generate() common.DataConnector {
case MYSQL_RESOURCE, MARIADB_RESOURCE, TIDB_RESOURCE:
sqlRsc := &mysql.MySQLConnector{}
return sqlRsc
case POSTGRES_RESOURCE, SUPABASEDB_RESOURCE:
case POSTGRES_RESOURCE, SUPABASEDB_RESOURCE, NEON_RESOURCE:
pgsRsc := &postgresql.Connector{}
return pgsRsc
case REDIS_RESOURCE:
Expand Down
9 changes: 5 additions & 4 deletions pkg/resource/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"go.uber.org/zap"
)

var type_array = [23]string{"restapi", "graphql", "redis", "mysql", "mariadb", "postgresql", "mongodb", "tidb",
var type_array = [24]string{"restapi", "graphql", "redis", "mysql", "mariadb", "postgresql", "mongodb", "tidb",
"elasticsearch", "s3", "smtp", "supabasedb", "firebase", "clickhouse", "mssql", "huggingface", "dynamodb", "snowflake",
"couchdb", "hfendpoint", "oracle", "appwrite", "googlesheets"}
"couchdb", "hfendpoint", "oracle", "appwrite", "googlesheets", "neon"}
var type_map = map[string]int{
"restapi": 1,
"graphql": 2,
Expand All @@ -52,6 +52,7 @@ var type_map = map[string]int{
"oracle": 21,
"appwrite": 22,
"googlesheets": 23,
"neon": 24,
}

type ResourceService interface {
Expand All @@ -70,7 +71,7 @@ type ResourceDto struct {
UID uuid.UUID `json:"uid"`
TeamID int `json:"teamID"`
Name string `json:"resourceName" validate:"required,min=1,max=128"`
Type string `json:"resourceType" validate:"oneof=restapi graphql redis mysql mariadb postgresql mongodb tidb elasticsearch s3 smtp supabasedb firebase clickhouse mssql huggingface dynamodb snowflake couchdb hfendpoint oracle appwrite googlesheets"`
Type string `json:"resourceType" validate:"oneof=restapi graphql redis mysql mariadb postgresql mongodb tidb elasticsearch s3 smtp supabasedb firebase clickhouse mssql huggingface dynamodb snowflake couchdb hfendpoint oracle appwrite googlesheets neon"`
Options map[string]interface{} `json:"content" validate:"required"`
CreatedAt time.Time `json:"createdAt,omitempty"`
CreatedBy int `json:"createdBy,omitempty"`
Expand All @@ -83,7 +84,7 @@ type ResourceDtoForExport struct {
UID uuid.UUID `json:"uid"`
TeamID string `json:"teamID"`
Name string `json:"resourceName" validate:"required"`
Type string `json:"resourceType" validate:"oneof=restapi graphql redis mysql mariadb postgresql mongodb tidb elasticsearch s3 smtp supabasedb firebase clickhouse mssql huggingface dynamodb snowflake couchdb hfendpoint oracle appwrite googlesheets"`
Type string `json:"resourceType" validate:"oneof=restapi graphql redis mysql mariadb postgresql mongodb tidb elasticsearch s3 smtp supabasedb firebase clickhouse mssql huggingface dynamodb snowflake couchdb hfendpoint oracle appwrite googlesheets neon"`
Options map[string]interface{} `json:"content" validate:"required"`
CreatedAt time.Time `json:"createdAt,omitempty"`
CreatedBy string `json:"createdBy,omitempty"`
Expand Down

0 comments on commit 27886b7

Please sign in to comment.