Documentation ¶
Index ¶
- Variables
- type AbstractActionFactory
- type ActionDto
- type ActionDtoForExport
- type ActionService
- type ActionServiceImpl
- func (impl *ActionServiceImpl) CreateAction(action ActionDto) (*ActionDtoForExport, error)
- func (impl *ActionServiceImpl) DeleteAction(teamID int, actionID int) error
- func (impl *ActionServiceImpl) FindActionsByAppVersion(teamID int, appID int, version int) ([]*ActionDtoForExport, error)
- func (impl *ActionServiceImpl) GetAction(teamID int, actionID int) (*ActionDtoForExport, error)
- func (impl *ActionServiceImpl) IsPublicAction(teamID int, actionID int) bool
- func (impl *ActionServiceImpl) RunAction(teamID int, action ActionDto) (interface{}, error)
- func (impl *ActionServiceImpl) UpdateAction(action ActionDto) (*ActionDtoForExport, error)
- func (impl *ActionServiceImpl) UpdatePublic(teamID int, appID int, userID int, actionConfig *repository.ActionConfig) error
- func (impl *ActionServiceImpl) ValidateActionOptions(actionType string, options map[string]interface{}) error
- type Factory
Constants ¶
This section is empty.
Variables ¶
View Source
var ( REST_ACTION = "restapi" MYSQL_ACTION = "mysql" MARIADB_ACTION = "mariadb" TIDB_ACTION = "tidb" TRANSFORMER_ACTION = "transformer" POSTGRESQL_ACTION = "postgresql" REDIS_ACTION = "redis" MONGODB_ACTION = "mongodb" ELASTICSEARCH_ACTION = "elasticsearch" S3_ACTION = "s3" SMTP_ACTION = "smtp" SUPABASEDB_ACTION = "supabasedb" FIREBASE_ACTION = "firebase" CLICKHOUSE_ACTION = "clickhouse" GRAPHQL_ACTION = "graphql" MSSQL_ACTION = "mssql" HUGGINGFACE_ACTION = "huggingface" DYNAMODB_ACTION = "dynamodb" SNOWFLAKE_ACTION = "snowflake" COUCHDB_ACTION = "couchdb" HFENDPOINT_ACTION = "hfendpoint" ORACLE_ACTION = "oracle" )
Functions ¶
This section is empty.
Types ¶
type AbstractActionFactory ¶
type AbstractActionFactory interface {
Build() common.DataConnector
}
type ActionDto ¶
type ActionDto struct { ID int `json:"actionId"` UID uuid.UUID `json:"uid"` TeamID int `json:"teamID"` App int `json:"-"` Version int `json:"-"` Resource int `json:"resourceId,omitempty"` DisplayName string `json:"displayName" validate:"required"` Type string `` /* 222-byte string literal not displayed */ Template map[string]interface{} `json:"content" validate:"required"` Transformer map[string]interface{} `json:"transformer" validate:"required"` TriggerMode string `json:"triggerMode" validate:"oneof=manually automate"` Config *repository.ActionConfig `json:"config"` CreatedAt time.Time `json:"createdAt,omitempty"` CreatedBy int `json:"createdBy,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` UpdatedBy int `json:"updatedBy,omitempty"` }
func (*ActionDto) SetPublicStatus ¶ added in v1.9.0
type ActionDtoForExport ¶ added in v1.9.0
type ActionDtoForExport struct { ID string `json:"actionId"` UID uuid.UUID `json:"uid"` TeamID string `json:"teamID"` App string `json:"-"` Version int `json:"-"` Resource string `json:"resourceId,omitempty"` DisplayName string `json:"displayName" validate:"required"` Type string `` /* 204-byte string literal not displayed */ Template map[string]interface{} `json:"content" validate:"required"` Transformer map[string]interface{} `json:"transformer" validate:"required"` TriggerMode string `json:"triggerMode" validate:"oneof=manually automate"` Config *repository.ActionConfig `json:"config"` CreatedAt time.Time `json:"createdAt,omitempty"` CreatedBy string `json:"createdBy,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` UpdatedBy string `json:"updatedBy,omitempty"` }
func NewActionDtoForExport ¶ added in v1.9.0
func NewActionDtoForExport(a *ActionDto) *ActionDtoForExport
func (*ActionDtoForExport) ExportActionDto ¶ added in v1.9.0
func (resp *ActionDtoForExport) ExportActionDto() ActionDto
func (*ActionDtoForExport) ExportForFeedback ¶ added in v1.9.0
func (resp *ActionDtoForExport) ExportForFeedback() interface{}
type ActionService ¶
type ActionService interface { IsPublicAction(teamID int, actionID int) bool CreateAction(action ActionDto) (*ActionDtoForExport, error) DeleteAction(teamID int, id int) error UpdateAction(action ActionDto) (*ActionDtoForExport, error) UpdatePublic(teamID int, appID int, userID int, actionConfig *repository.ActionConfig) error GetAction(teamID int, id int) (*ActionDtoForExport, error) FindActionsByAppVersion(teamID int, app, version int) ([]*ActionDtoForExport, error) RunAction(teamID int, action ActionDto) (interface{}, error) ValidateActionOptions(actionType string, options map[string]interface{}) error }
type ActionServiceImpl ¶
type ActionServiceImpl struct {
// contains filtered or unexported fields
}
func NewActionServiceImpl ¶
func NewActionServiceImpl(logger *zap.SugaredLogger, appRepository repository.AppRepository, actionRepository repository.ActionRepository, resourceRepository repository.ResourceRepository) *ActionServiceImpl
func (*ActionServiceImpl) CreateAction ¶
func (impl *ActionServiceImpl) CreateAction(action ActionDto) (*ActionDtoForExport, error)
func (*ActionServiceImpl) DeleteAction ¶
func (impl *ActionServiceImpl) DeleteAction(teamID int, actionID int) error
func (*ActionServiceImpl) FindActionsByAppVersion ¶
func (impl *ActionServiceImpl) FindActionsByAppVersion(teamID int, appID int, version int) ([]*ActionDtoForExport, error)
func (*ActionServiceImpl) GetAction ¶
func (impl *ActionServiceImpl) GetAction(teamID int, actionID int) (*ActionDtoForExport, error)
func (*ActionServiceImpl) IsPublicAction ¶ added in v1.9.0
func (impl *ActionServiceImpl) IsPublicAction(teamID int, actionID int) bool
func (*ActionServiceImpl) RunAction ¶
func (impl *ActionServiceImpl) RunAction(teamID int, action ActionDto) (interface{}, error)
func (*ActionServiceImpl) UpdateAction ¶
func (impl *ActionServiceImpl) UpdateAction(action ActionDto) (*ActionDtoForExport, error)
func (*ActionServiceImpl) UpdatePublic ¶ added in v1.9.0
func (impl *ActionServiceImpl) UpdatePublic(teamID int, appID int, userID int, actionConfig *repository.ActionConfig) error
func (*ActionServiceImpl) ValidateActionOptions ¶
func (impl *ActionServiceImpl) ValidateActionOptions(actionType string, options map[string]interface{}) error
Click to show internal directories.
Click to hide internal directories.