Documentation ¶
Index ¶
- func BatchCreate(ctx context.Context, sty []models.Strategy) error
- func Create(ctx context.Context, r *CreateReq) (*models.Strategy, error)
- func FilterByProjectAndEvent(ctx context.Context, id types.SFID, tpe string) ([]*types.StrategyResult, error)
- func GetBySFID(ctx context.Context, id types.SFID) (*models.Strategy, error)
- func ListByCond(ctx context.Context, r *CondArgs, adds ...builder.Addition) ([]models.Strategy, error)
- func Remove(ctx context.Context, r *CondArgs) error
- func RemoveBySFID(ctx context.Context, id types.SFID) error
- func Update(ctx context.Context, id types.SFID, r *UpdateReq) (err error)
- type BatchCreateReq
- type CondArgs
- type CreateReq
- type Detail
- type ListDetailRsp
- type ListReq
- type ListRsp
- type UpdateReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchCreate ¶ added in v1.1.0
func FilterByProjectAndEvent ¶ added in v1.1.0
func ListByCond ¶ added in v1.1.0
Types ¶
type BatchCreateReq ¶ added in v1.1.0
type BatchCreateReq struct {
Strategies []CreateReq `json:"strategies"`
}
type CondArgs ¶ added in v1.1.0
type CondArgs struct { ProjectID types.SFID `name:"-"` AppletIDs []types.SFID `in:"query" name:"appletID,omitempty"` StrategyIDs []types.SFID `in:"query" name:"strategyID,omitempty"` EventTypes []string `in:"query" name:"eventType,omitempty"` Handlers []string `in:"query" name:"handler,omitempty"` }
func (*CondArgs) Condition ¶ added in v1.1.0
func (r *CondArgs) Condition() builder.SqlCondition
type Detail ¶
type Detail struct { types.StrategyResult datatypes.OperationTimes }
type ListDetailRsp ¶ added in v1.1.0
type ListDetailRsp struct { Data []*Detail `json:"data"` // Data strategy data list Total int64 `json:"total"` // Total strategy count under current projectID }
func ListDetail ¶ added in v1.1.0
func ListDetail(ctx context.Context, r *ListReq) (*ListDetailRsp, error)
Click to show internal directories.
Click to hide internal directories.