Documentation ¶
Index ¶
- func AddAndStartScheduler(ctx context.Context, v *models.TrafficLimit) error
- func AddScheduler(ctx context.Context, v *models.TrafficLimit, start ...bool) error
- func Create(ctx context.Context, r *CreateReq) (*models.TrafficLimit, error)
- func GetBySFID(ctx context.Context, id types.SFID) (*models.TrafficLimit, error)
- func Init(ctx context.Context) error
- func ListByCond(ctx context.Context, r *CondArgs) (data []models.TrafficLimit, err error)
- func Remove(ctx context.Context, r *CondArgs) error
- func RemoveBySFID(ctx context.Context, id types.SFID) error
- func RmvScheduler(ctx context.Context, id types.SFID)
- func TrafficLimit(ctx context.Context, prj types.SFID, tpe enums.TrafficLimitType) error
- func Update(ctx context.Context, id types.SFID, r *UpdateReq) (*models.TrafficLimit, error)
- type CondArgs
- type CreateReq
- type Detail
- type ListDetailRsp
- type ListReq
- type ListRsp
- type Scheduler
- type UpdateReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAndStartScheduler ¶
func AddAndStartScheduler(ctx context.Context, v *models.TrafficLimit) error
func AddScheduler ¶
func ListByCond ¶
func TrafficLimit ¶
Types ¶
type CondArgs ¶
type CondArgs struct { ProjectID types.SFID `name:"-"` ApiType enums.TrafficLimitType `in:"query" name:"apiType,omitempty"` }
func (*CondArgs) Condition ¶
func (r *CondArgs) Condition() builder.SqlCondition
type CreateReq ¶
type CreateReq struct { Threshold int `json:"threshold"` Duration types.Duration `json:"duration"` ApiType enums.TrafficLimitType `json:"apiType"` }
type Detail ¶
type Detail struct { ProjectName string `json:"projectName" db:"f_project_name"` models.TrafficLimit datatypes.OperationTimes }
type ListDetailRsp ¶
func ListDetail ¶
func ListDetail(ctx context.Context, r *ListReq) (*ListDetailRsp, error)
type ListRsp ¶
type ListRsp struct { Data []models.TrafficLimit `json:"data"` Total int64 `json:"total"` }
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
Click to show internal directories.
Click to hide internal directories.