Skip to content

Commit

Permalink
feat:remove unused css watermark rule code. (#2150)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyu571 authored and hellertang committed Oct 10, 2023
1 parent 30cc348 commit 6392e30
Showing 1 changed file with 0 additions and 61 deletions.
61 changes: 0 additions & 61 deletions tencentcloud/service_tencentcloud_css.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,67 +101,6 @@ func (me *CssService) DeleteCssWatermarkById(ctx context.Context, watermarkId *i
return
}

func (me *CssService) DescribeCssWatermarkRuleAttachment(ctx context.Context, domainName, appName, streamName, watermarkId string) (watermarkRuleAttachment *css.RuleInfo, errRet error) {
var (
logId = getLogId(ctx)
request = css.NewDescribeLiveWatermarkRulesRequest()
)

defer func() {
if errRet != nil {
log.Printf("[CRITICAL]%s api[%s] fail, request body [%s], reason[%s]\n",
logId, "query object", request.ToJsonString(), errRet.Error())
}
}()
// request.DomainName = &domainName
// request.AppName = &appName
// request.StreamName = &streamName
// request.WatermarkId = &watermarkId

response, err := me.client.UseCssClient().DescribeLiveWatermarkRules(request)
if err != nil {
log.Printf("[CRITICAL]%s api[%s] fail, request body [%s], reason[%s]\n",
logId, request.GetAction(), request.ToJsonString(), err.Error())
errRet = err
return
}
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
if len(response.Response.Rules) < 1 {
return
}
watermarkRuleAttachment = response.Response.Rules[0]
return
}

func (me *CssService) DetachCssWatermarkRuleAttachment(ctx context.Context, domainName, appName, streamName string) (errRet error) {
logId := getLogId(ctx)

request := css.NewDeleteLiveWatermarkRuleRequest()

request.DomainName = helper.String(domainName)
request.AppName = helper.String(appName)
request.StreamName = helper.String(streamName)

defer func() {
if errRet != nil {
log.Printf("[CRITICAL]%s api[%s] fail, request body [%s], reason[%s]\n",
logId, "delete object", request.ToJsonString(), errRet.Error())
}
}()

ratelimit.Check(request.GetAction())
response, err := me.client.UseCssClient().DeleteLiveWatermarkRule(request)
if err != nil {
errRet = err
return err
}
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())

return
}

func (me *CssService) DescribeCssPullStreamTask(ctx context.Context, taskId string) (tasks []*css.PullStreamTaskInfo, errRet error) {
var (
logId = getLogId(ctx)
Expand Down

0 comments on commit 6392e30

Please sign in to comment.