mirror of
https://github.com/certimate-go/certimate.git
synced 2026-06-22 21:05:48 +08:00
refactor: clean code
This commit is contained in:
parent
37d52b265e
commit
69af915147
@ -15,7 +15,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
querystring "github.com/google/go-querystring/query"
|
||||
qs "github.com/google/go-querystring/query"
|
||||
"golang.org/x/text/encoding"
|
||||
"golang.org/x/text/encoding/simplifiedchinese"
|
||||
"golang.org/x/text/transform"
|
||||
@ -75,7 +75,7 @@ type DnsRecordID struct {
|
||||
}
|
||||
|
||||
func (c *DnsClient) AddRecord(ctx context.Context, record DnsRecord) (int, error) {
|
||||
values, err := querystring.Values(record)
|
||||
values, err := qs.Values(record)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
@ -6,8 +6,8 @@ import (
|
||||
)
|
||||
|
||||
type GetDomainConfigRequest struct {
|
||||
Domains *string `json:"domains,omitempty"`
|
||||
Config *[]string `json:"config,omitempty"`
|
||||
Domains *string `json:"domains,omitempty" url:"domains,omitempty"`
|
||||
Config *[]string `json:"config,omitempty" url:"config,omitempty"`
|
||||
}
|
||||
|
||||
type GetDomainConfigResponse struct {
|
||||
|
||||
@ -3,14 +3,15 @@ package baishan
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type GetDomainListRequest struct {
|
||||
PageNumber *int32 `json:"page_number,omitempty"`
|
||||
PageSize *int32 `json:"page_size,omitempty"`
|
||||
DomainStatus *string `json:"domain_status,omitempty"`
|
||||
PageNumber *int32 `json:"page_number,omitempty" url:"page_number,omitempty"`
|
||||
PageSize *int32 `json:"page_size,omitempty" url:"page_size,omitempty"`
|
||||
DomainStatus *string `json:"domain_status,omitempty" url:"domain_status,omitempty"`
|
||||
}
|
||||
|
||||
type GetDomainListResponse struct {
|
||||
@ -33,16 +34,12 @@ func (c *Client) GetDomainListWithContext(ctx context.Context, req *GetDomainLis
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.PageNumber != nil {
|
||||
httpreq.SetQueryParam("page_number", fmt.Sprintf("%d", *req.PageNumber))
|
||||
}
|
||||
if req.PageSize != nil {
|
||||
httpreq.SetQueryParam("page_number", fmt.Sprintf("%d", *req.PageSize))
|
||||
}
|
||||
if req.DomainStatus != nil {
|
||||
httpreq.SetQueryParam("domain_status", *req.DomainStatus)
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,13 +3,14 @@ package ao
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type ListCertsRequest struct {
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
PerPage *int32 `json:"per_page,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty"`
|
||||
Page *int32 `json:"page,omitempty" url:"page,omitempty"`
|
||||
PerPage *int32 `json:"per_page,omitempty" url:"per_page,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty" url:"usage_mode,omitempty"`
|
||||
}
|
||||
|
||||
type ListCertsResponse struct {
|
||||
@ -33,16 +34,12 @@ func (c *Client) ListCertsWithContext(ctx context.Context, req *ListCertsRequest
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Page != nil {
|
||||
httpreq.SetQueryParam("page", strconv.Itoa(int(*req.Page)))
|
||||
}
|
||||
if req.PerPage != nil {
|
||||
httpreq.SetQueryParam("per_page", strconv.Itoa(int(*req.PerPage)))
|
||||
}
|
||||
if req.UsageMode != nil {
|
||||
httpreq.SetQueryParam("usage_mode", strconv.Itoa(int(*req.UsageMode)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,13 +3,14 @@ package ao
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryCertRequest struct {
|
||||
Id *int64 `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty"`
|
||||
Id *int64 `json:"id,omitempty" url:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty" url:"name,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty" url:"usage_mode,omitempty"`
|
||||
}
|
||||
|
||||
type QueryCertResponse struct {
|
||||
@ -29,16 +30,12 @@ func (c *Client) QueryCertWithContext(ctx context.Context, req *QueryCertRequest
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Id != nil {
|
||||
httpreq.SetQueryParam("id", strconv.Itoa(int(*req.Id)))
|
||||
}
|
||||
if req.Name != nil {
|
||||
httpreq.SetQueryParam("name", *req.Name)
|
||||
}
|
||||
if req.UsageMode != nil {
|
||||
httpreq.SetQueryParam("usage_mode", strconv.Itoa(int(*req.UsageMode)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,16 +3,17 @@ package ao
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryDomainsRequest struct {
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
PageSize *int32 `json:"page_size,omitempty"`
|
||||
Domain *string `json:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty"`
|
||||
Status *int32 `json:"status,omitempty"`
|
||||
AreaScope *int32 `json:"area_scope,omitempty"`
|
||||
Page *int32 `json:"page,omitempty" url:"page,omitempty"`
|
||||
PageSize *int32 `json:"page_size,omitempty" url:"page_size,omitempty"`
|
||||
Domain *string `json:"domain,omitempty" url:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty" url:"product_code,omitempty"`
|
||||
Status *int32 `json:"status,omitempty" url:"status,omitempty"`
|
||||
AreaScope *int32 `json:"area_scope,omitempty" url:"area_scope,omitempty"`
|
||||
}
|
||||
|
||||
type QueryDomainsResponse struct {
|
||||
@ -36,25 +37,12 @@ func (c *Client) QueryDomainsWithContext(ctx context.Context, req *QueryDomainsR
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Page != nil {
|
||||
httpreq.SetQueryParam("page", strconv.Itoa(int(*req.Page)))
|
||||
}
|
||||
if req.PageSize != nil {
|
||||
httpreq.SetQueryParam("page_size", strconv.Itoa(int(*req.PageSize)))
|
||||
}
|
||||
if req.Domain != nil {
|
||||
httpreq.SetQueryParam("domain", *req.Domain)
|
||||
}
|
||||
if req.ProductCode != nil {
|
||||
httpreq.SetQueryParam("product_code", *req.ProductCode)
|
||||
}
|
||||
if req.Status != nil {
|
||||
httpreq.SetQueryParam("status", strconv.Itoa(int(*req.Status)))
|
||||
}
|
||||
if req.AreaScope != nil {
|
||||
httpreq.SetQueryParam("area_scope", strconv.Itoa(int(*req.AreaScope)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,13 +3,14 @@ package cdn
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryCertDetailRequest struct {
|
||||
Id *int64 `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty"`
|
||||
Id *int64 `json:"id,omitempty" url:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty" url:"name,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty" url:"usage_mode,omitempty"`
|
||||
}
|
||||
|
||||
type QueryCertDetailResponse struct {
|
||||
@ -29,16 +30,12 @@ func (c *Client) QueryCertDetailWithContext(ctx context.Context, req *QueryCertD
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Id != nil {
|
||||
httpreq.SetQueryParam("id", strconv.Itoa(int(*req.Id)))
|
||||
}
|
||||
if req.Name != nil {
|
||||
httpreq.SetQueryParam("name", *req.Name)
|
||||
}
|
||||
if req.UsageMode != nil {
|
||||
httpreq.SetQueryParam("usage_mode", strconv.Itoa(int(*req.UsageMode)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,13 +3,14 @@ package cdn
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryCertListRequest struct {
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
PerPage *int32 `json:"per_page,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty"`
|
||||
Page *int32 `json:"page,omitempty" url:"page,omitempty"`
|
||||
PerPage *int32 `json:"per_page,omitempty" url:"per_page,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty" url:"usage_mode,omitempty"`
|
||||
}
|
||||
|
||||
type QueryCertListResponse struct {
|
||||
@ -33,16 +34,12 @@ func (c *Client) QueryCertListWithContext(ctx context.Context, req *QueryCertLis
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Page != nil {
|
||||
httpreq.SetQueryParam("page", strconv.Itoa(int(*req.Page)))
|
||||
}
|
||||
if req.PerPage != nil {
|
||||
httpreq.SetQueryParam("per_page", strconv.Itoa(int(*req.PerPage)))
|
||||
}
|
||||
if req.UsageMode != nil {
|
||||
httpreq.SetQueryParam("usage_mode", strconv.Itoa(int(*req.UsageMode)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,12 +3,14 @@ package cdn
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryDomainDetailRequest struct {
|
||||
Domain *string `json:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty"`
|
||||
FunctionNames *string `json:"function_names,omitempty"`
|
||||
Domain *string `json:"domain,omitempty" url:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty" url:"product_code,omitempty"`
|
||||
FunctionNames *string `json:"function_names,omitempty" url:"function_names,omitempty"`
|
||||
}
|
||||
|
||||
type QueryDomainDetailResponse struct {
|
||||
@ -26,16 +28,12 @@ func (c *Client) QueryDomainDetailWithContext(ctx context.Context, req *QueryDom
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Domain != nil {
|
||||
httpreq.SetQueryParam("domain", *req.Domain)
|
||||
}
|
||||
if req.ProductCode != nil {
|
||||
httpreq.SetQueryParam("product_code", *req.ProductCode)
|
||||
}
|
||||
if req.FunctionNames != nil {
|
||||
httpreq.SetQueryParam("function_names", *req.FunctionNames)
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,16 +3,17 @@ package cdn
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryDomainListRequest struct {
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
PageSize *int32 `json:"page_size,omitempty"`
|
||||
Domain *string `json:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty"`
|
||||
Status *int32 `json:"status,omitempty"`
|
||||
AreaScope *int32 `json:"area_scope,omitempty"`
|
||||
Page *int32 `json:"page,omitempty" url:"page,omitempty"`
|
||||
PageSize *int32 `json:"page_size,omitempty" url:"page_size,omitempty"`
|
||||
Domain *string `json:"domain,omitempty" url:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty" url:"product_code,omitempty"`
|
||||
Status *int32 `json:"status,omitempty" url:"status,omitempty"`
|
||||
AreaScope *int32 `json:"area_scope,omitempty" url:"area_scope,omitempty"`
|
||||
}
|
||||
|
||||
type QueryDomainListResponse struct {
|
||||
@ -36,25 +37,12 @@ func (c *Client) QueryDomainListWithContext(ctx context.Context, req *QueryDomai
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Page != nil {
|
||||
httpreq.SetQueryParam("page", strconv.Itoa(int(*req.Page)))
|
||||
}
|
||||
if req.PageSize != nil {
|
||||
httpreq.SetQueryParam("page_size", strconv.Itoa(int(*req.PageSize)))
|
||||
}
|
||||
if req.Domain != nil {
|
||||
httpreq.SetQueryParam("domain", *req.Domain)
|
||||
}
|
||||
if req.ProductCode != nil {
|
||||
httpreq.SetQueryParam("product_code", *req.ProductCode)
|
||||
}
|
||||
if req.Status != nil {
|
||||
httpreq.SetQueryParam("status", strconv.Itoa(int(*req.Status)))
|
||||
}
|
||||
if req.AreaScope != nil {
|
||||
httpreq.SetQueryParam("area_scope", strconv.Itoa(int(*req.AreaScope)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,16 +3,17 @@ package dns
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryRecordListRequest struct {
|
||||
Domain *string `json:"domain,omitempty"`
|
||||
Host *string `json:"host,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
LineCode *string `json:"lineCode,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
State *int32 `json:"state,omitempty"`
|
||||
Domain *string `json:"domain,omitempty" url:"domain,omitempty"`
|
||||
Host *string `json:"host,omitempty" url:"host,omitempty"`
|
||||
Type *string `json:"type,omitempty" url:"type,omitempty"`
|
||||
LineCode *string `json:"lineCode,omitempty" url:"lineCode,omitempty"`
|
||||
Value *string `json:"value,omitempty" url:"value,omitempty"`
|
||||
State *int32 `json:"state,omitempty" url:"state,omitempty"`
|
||||
}
|
||||
|
||||
type QueryRecordListResponse struct {
|
||||
@ -32,26 +33,12 @@ func (c *Client) QueryRecordListWithContext(ctx context.Context, req *QueryRecor
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Domain != nil {
|
||||
httpreq.SetQueryParam("domain", *req.Domain)
|
||||
}
|
||||
if req.Host != nil {
|
||||
httpreq.SetQueryParam("host", *req.Host)
|
||||
}
|
||||
if req.Type != nil {
|
||||
httpreq.SetQueryParam("type", *req.Type)
|
||||
}
|
||||
if req.LineCode != nil {
|
||||
httpreq.SetQueryParam("lineCode", *req.LineCode)
|
||||
}
|
||||
if req.Value != nil {
|
||||
httpreq.SetQueryParam("value", *req.Value)
|
||||
}
|
||||
if req.State != nil {
|
||||
httpreq.SetQueryParam("state", strconv.Itoa(int(*req.State)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetBody(req)
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,14 +3,16 @@ package elb
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type ListCertificatesRequest struct {
|
||||
ClientToken *string `json:"clientToken,omitempty"`
|
||||
RegionID *string `json:"regionID,omitempty"`
|
||||
IDs *string `json:"IDs,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
ClientToken *string `json:"clientToken,omitempty" url:"clientToken,omitempty"`
|
||||
RegionID *string `json:"regionID,omitempty" url:"regionID,omitempty"`
|
||||
IDs *string `json:"IDs,omitempty" url:"IDs,omitempty"`
|
||||
Name *string `json:"name,omitempty" url:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty" url:"type,omitempty"`
|
||||
}
|
||||
|
||||
type ListCertificatesResponse struct {
|
||||
@ -28,22 +30,12 @@ func (c *Client) ListCertificatesWithContext(ctx context.Context, req *ListCerti
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.ClientToken != nil {
|
||||
httpreq.SetQueryParam("clientToken", *req.ClientToken)
|
||||
}
|
||||
if req.RegionID != nil {
|
||||
httpreq.SetQueryParam("regionID", *req.RegionID)
|
||||
}
|
||||
if req.IDs != nil {
|
||||
httpreq.SetQueryParam("IDs", *req.IDs)
|
||||
}
|
||||
if req.Name != nil {
|
||||
httpreq.SetQueryParam("name", *req.Name)
|
||||
}
|
||||
if req.Type != nil {
|
||||
httpreq.SetQueryParam("type", *req.Type)
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,16 +3,18 @@ package elb
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type ListListenersRequest struct {
|
||||
ClientToken *string `json:"clientToken,omitempty"`
|
||||
RegionID *string `json:"regionID,omitempty"`
|
||||
ProjectID *string `json:"projectID,omitempty"`
|
||||
IDs *string `json:"IDs,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
LoadBalancerID *string `json:"loadBalancerID,omitempty"`
|
||||
AccessControlID *string `json:"accessControlID,omitempty"`
|
||||
ClientToken *string `json:"clientToken,omitempty" url:"clientToken,omitempty"`
|
||||
RegionID *string `json:"regionID,omitempty" url:"regionID,omitempty"`
|
||||
ProjectID *string `json:"projectID,omitempty" url:"projectID,omitempty"`
|
||||
IDs *string `json:"IDs,omitempty" url:"IDs,omitempty"`
|
||||
Name *string `json:"name,omitempty" url:"name,omitempty"`
|
||||
LoadBalancerID *string `json:"loadBalancerID,omitempty" url:"loadBalancerID,omitempty"`
|
||||
AccessControlID *string `json:"accessControlID,omitempty" url:"accessControlID,omitempty"`
|
||||
}
|
||||
|
||||
type ListListenersResponse struct {
|
||||
@ -30,28 +32,12 @@ func (c *Client) ListListenersWithContext(ctx context.Context, req *ListListener
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.ClientToken != nil {
|
||||
httpreq.SetQueryParam("clientToken", *req.ClientToken)
|
||||
}
|
||||
if req.RegionID != nil {
|
||||
httpreq.SetQueryParam("regionID", *req.RegionID)
|
||||
}
|
||||
if req.ProjectID != nil {
|
||||
httpreq.SetQueryParam("projectID", *req.ProjectID)
|
||||
}
|
||||
if req.IDs != nil {
|
||||
httpreq.SetQueryParam("IDs", *req.IDs)
|
||||
}
|
||||
if req.Name != nil {
|
||||
httpreq.SetQueryParam("name", *req.Name)
|
||||
}
|
||||
if req.LoadBalancerID != nil {
|
||||
httpreq.SetQueryParam("loadBalancerID", *req.LoadBalancerID)
|
||||
}
|
||||
if req.LoadBalancerID != nil {
|
||||
httpreq.SetQueryParam("accessControlID", *req.AccessControlID)
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,12 +3,14 @@ package elb
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type ShowListenerRequest struct {
|
||||
ClientToken *string `json:"clientToken,omitempty"`
|
||||
RegionID *string `json:"regionID,omitempty"`
|
||||
ListenerID *string `json:"listenerID,omitempty"`
|
||||
ClientToken *string `json:"clientToken,omitempty" url:"clientToken,omitempty"`
|
||||
RegionID *string `json:"regionID,omitempty" url:"regionID,omitempty"`
|
||||
ListenerID *string `json:"listenerID,omitempty" url:"listenerID,omitempty"`
|
||||
}
|
||||
|
||||
type ShowListenerResponse struct {
|
||||
@ -26,16 +28,12 @@ func (c *Client) ShowListenerWithContext(ctx context.Context, req *ShowListenerR
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.ClientToken != nil {
|
||||
httpreq.SetQueryParam("clientToken", *req.ClientToken)
|
||||
}
|
||||
if req.RegionID != nil {
|
||||
httpreq.SetQueryParam("regionID", *req.RegionID)
|
||||
}
|
||||
if req.ListenerID != nil {
|
||||
httpreq.SetQueryParam("listenerID", *req.ListenerID)
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,13 +3,14 @@ package icdn
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryCertDetailRequest struct {
|
||||
Id *int64 `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty"`
|
||||
Id *int64 `json:"id,omitempty" url:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty" url:"name,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty" url:"usage_mode,omitempty"`
|
||||
}
|
||||
|
||||
type QueryCertDetailResponse struct {
|
||||
@ -29,16 +30,12 @@ func (c *Client) QueryCertDetailWithContext(ctx context.Context, req *QueryCertD
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Id != nil {
|
||||
httpreq.SetQueryParam("id", strconv.Itoa(int(*req.Id)))
|
||||
}
|
||||
if req.Name != nil {
|
||||
httpreq.SetQueryParam("name", *req.Name)
|
||||
}
|
||||
if req.UsageMode != nil {
|
||||
httpreq.SetQueryParam("usage_mode", strconv.Itoa(int(*req.UsageMode)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,13 +3,14 @@ package icdn
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryCertListRequest struct {
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
PerPage *int32 `json:"per_page,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty"`
|
||||
Page *int32 `json:"page,omitempty" url:"page,omitempty"`
|
||||
PerPage *int32 `json:"per_page,omitempty" url:"per_page,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty" url:"usage_mode,omitempty"`
|
||||
}
|
||||
|
||||
type QueryCertListResponse struct {
|
||||
@ -33,16 +34,12 @@ func (c *Client) QueryCertListWithContext(ctx context.Context, req *QueryCertLis
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Page != nil {
|
||||
httpreq.SetQueryParam("page", strconv.Itoa(int(*req.Page)))
|
||||
}
|
||||
if req.PerPage != nil {
|
||||
httpreq.SetQueryParam("per_page", strconv.Itoa(int(*req.PerPage)))
|
||||
}
|
||||
if req.UsageMode != nil {
|
||||
httpreq.SetQueryParam("usage_mode", strconv.Itoa(int(*req.UsageMode)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,12 +3,14 @@ package icdn
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryDomainDetailRequest struct {
|
||||
Domain *string `json:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty"`
|
||||
FunctionNames *string `json:"function_names,omitempty"`
|
||||
Domain *string `json:"domain,omitempty" url:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty" url:"product_code,omitempty"`
|
||||
FunctionNames *string `json:"function_names,omitempty" url:"function_names,omitempty"`
|
||||
}
|
||||
|
||||
type QueryDomainDetailResponse struct {
|
||||
@ -26,16 +28,12 @@ func (c *Client) QueryDomainDetailWithContext(ctx context.Context, req *QueryDom
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Domain != nil {
|
||||
httpreq.SetQueryParam("domain", *req.Domain)
|
||||
}
|
||||
if req.ProductCode != nil {
|
||||
httpreq.SetQueryParam("product_code", *req.ProductCode)
|
||||
}
|
||||
if req.FunctionNames != nil {
|
||||
httpreq.SetQueryParam("function_names", *req.FunctionNames)
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,16 +3,17 @@ package icdn
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryDomainListRequest struct {
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
PageSize *int32 `json:"page_size,omitempty"`
|
||||
Domain *string `json:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty"`
|
||||
Status *int32 `json:"status,omitempty"`
|
||||
AreaScope *int32 `json:"area_scope,omitempty"`
|
||||
Page *int32 `json:"page,omitempty" url:"page,omitempty"`
|
||||
PageSize *int32 `json:"page_size,omitempty" url:"page_size,omitempty"`
|
||||
Domain *string `json:"domain,omitempty" url:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty" url:"product_code,omitempty"`
|
||||
Status *int32 `json:"status,omitempty" url:"status,omitempty"`
|
||||
AreaScope *int32 `json:"area_scope,omitempty" url:"area_scope,omitempty"`
|
||||
}
|
||||
|
||||
type QueryDomainListResponse struct {
|
||||
@ -36,25 +37,12 @@ func (c *Client) QueryDomainListWithContext(ctx context.Context, req *QueryDomai
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Page != nil {
|
||||
httpreq.SetQueryParam("page", strconv.Itoa(int(*req.Page)))
|
||||
}
|
||||
if req.PageSize != nil {
|
||||
httpreq.SetQueryParam("page_size", strconv.Itoa(int(*req.PageSize)))
|
||||
}
|
||||
if req.Domain != nil {
|
||||
httpreq.SetQueryParam("domain", *req.Domain)
|
||||
}
|
||||
if req.ProductCode != nil {
|
||||
httpreq.SetQueryParam("product_code", *req.ProductCode)
|
||||
}
|
||||
if req.Status != nil {
|
||||
httpreq.SetQueryParam("status", strconv.Itoa(int(*req.Status)))
|
||||
}
|
||||
if req.AreaScope != nil {
|
||||
httpreq.SetQueryParam("area_scope", strconv.Itoa(int(*req.AreaScope)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,13 +3,14 @@ package lvdn
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryCertDetailRequest struct {
|
||||
Id *int64 `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty"`
|
||||
Id *int64 `json:"id,omitempty" url:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty" url:"name,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty" url:"usage_mode,omitempty"`
|
||||
}
|
||||
|
||||
type QueryCertDetailResponse struct {
|
||||
@ -29,16 +30,12 @@ func (c *Client) QueryCertDetailWithContext(ctx context.Context, req *QueryCertD
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Id != nil {
|
||||
httpreq.SetQueryParam("id", strconv.Itoa(int(*req.Id)))
|
||||
}
|
||||
if req.Name != nil {
|
||||
httpreq.SetQueryParam("name", *req.Name)
|
||||
}
|
||||
if req.UsageMode != nil {
|
||||
httpreq.SetQueryParam("usage_mode", strconv.Itoa(int(*req.UsageMode)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,13 +3,14 @@ package lvdn
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryCertListRequest struct {
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
PerPage *int32 `json:"per_page,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty"`
|
||||
Page *int32 `json:"page,omitempty" url:"page,omitempty"`
|
||||
PerPage *int32 `json:"per_page,omitempty" url:"per_page,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty" url:"usage_mode,omitempty"`
|
||||
}
|
||||
|
||||
type QueryCertListResponse struct {
|
||||
@ -33,16 +34,12 @@ func (c *Client) QueryCertListWithContext(ctx context.Context, req *QueryCertLis
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Page != nil {
|
||||
httpreq.SetQueryParam("page", strconv.Itoa(int(*req.Page)))
|
||||
}
|
||||
if req.PerPage != nil {
|
||||
httpreq.SetQueryParam("per_page", strconv.Itoa(int(*req.PerPage)))
|
||||
}
|
||||
if req.UsageMode != nil {
|
||||
httpreq.SetQueryParam("usage_mode", strconv.Itoa(int(*req.UsageMode)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,11 +3,13 @@ package lvdn
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryDomainDetailRequest struct {
|
||||
Domain *string `json:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty"`
|
||||
Domain *string `json:"domain,omitempty" url:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty" url:"product_code,omitempty"`
|
||||
}
|
||||
|
||||
type QueryDomainDetailResponse struct {
|
||||
@ -25,13 +27,12 @@ func (c *Client) QueryDomainDetailWithContext(ctx context.Context, req *QueryDom
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Domain != nil {
|
||||
httpreq.SetQueryParam("domain", *req.Domain)
|
||||
}
|
||||
if req.ProductCode != nil {
|
||||
httpreq.SetQueryParam("product_code", *req.ProductCode)
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,16 +3,17 @@ package lvdn
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type QueryDomainListRequest struct {
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
PageSize *int32 `json:"page_size,omitempty"`
|
||||
Domain *string `json:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty"`
|
||||
Status *int32 `json:"status,omitempty"`
|
||||
AreaScope *int32 `json:"area_scope,omitempty"`
|
||||
Page *int32 `json:"page,omitempty" url:"page,omitempty"`
|
||||
PageSize *int32 `json:"page_size,omitempty" url:"page_size,omitempty"`
|
||||
Domain *string `json:"domain,omitempty" url:"domain,omitempty"`
|
||||
ProductCode *string `json:"product_code,omitempty" url:"product_code,omitempty"`
|
||||
Status *int32 `json:"status,omitempty" url:"status,omitempty"`
|
||||
AreaScope *int32 `json:"area_scope,omitempty" url:"area_scope,omitempty"`
|
||||
}
|
||||
|
||||
type QueryDomainListResponse struct {
|
||||
@ -36,25 +37,12 @@ func (c *Client) QueryDomainListWithContext(ctx context.Context, req *QueryDomai
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.Page != nil {
|
||||
httpreq.SetQueryParam("page", strconv.Itoa(int(*req.Page)))
|
||||
}
|
||||
if req.PageSize != nil {
|
||||
httpreq.SetQueryParam("page_size", strconv.Itoa(int(*req.PageSize)))
|
||||
}
|
||||
if req.Domain != nil {
|
||||
httpreq.SetQueryParam("domain", *req.Domain)
|
||||
}
|
||||
if req.ProductCode != nil {
|
||||
httpreq.SetQueryParam("product_code", *req.ProductCode)
|
||||
}
|
||||
if req.Status != nil {
|
||||
httpreq.SetQueryParam("status", strconv.Itoa(int(*req.Status)))
|
||||
}
|
||||
if req.AreaScope != nil {
|
||||
httpreq.SetQueryParam("area_scope", strconv.Itoa(int(*req.AreaScope)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,13 +3,14 @@ package dnsla
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type ListDomainsRequest struct {
|
||||
GroupId *string `json:"groupId,omitempty"`
|
||||
PageIndex *int32 `json:"pageIndex,omitempty"`
|
||||
PageSize *int32 `json:"pageSize,omitempty"`
|
||||
GroupId *string `json:"groupId,omitempty" url:"groupId,omitempty"`
|
||||
PageIndex *int32 `json:"pageIndex,omitempty" url:"pageIndex,omitempty"`
|
||||
PageSize *int32 `json:"pageSize,omitempty" url:"pageSize,omitempty"`
|
||||
}
|
||||
|
||||
type ListDomainsResponse struct {
|
||||
@ -29,16 +30,12 @@ func (c *Client) ListDomainsWithContext(ctx context.Context, req *ListDomainsReq
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.GroupId != nil {
|
||||
httpreq.SetQueryParam("groupId", *req.GroupId)
|
||||
}
|
||||
if req.PageIndex != nil {
|
||||
httpreq.SetQueryParam("pageIndex", strconv.Itoa(int(*req.PageIndex)))
|
||||
}
|
||||
if req.PageSize != nil {
|
||||
httpreq.SetQueryParam("pageSize", strconv.Itoa(int(*req.PageSize)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -3,18 +3,19 @@ package dnsla
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type ListRecordsRequest struct {
|
||||
DomainId *string `json:"domainId,omitempty"`
|
||||
GroupId *string `json:"groupId,omitempty"`
|
||||
LineId *string `json:"lineId,omitempty"`
|
||||
Type *int32 `json:"type,omitempty"`
|
||||
Host *string `json:"host,omitempty"`
|
||||
Data *string `json:"data,omitempty"`
|
||||
PageIndex *int32 `json:"pageIndex,omitempty"`
|
||||
PageSize *int32 `json:"pageSize,omitempty"`
|
||||
DomainId *string `json:"domainId,omitempty" url:"domainId,omitempty"`
|
||||
GroupId *string `json:"groupId,omitempty" url:"groupId,omitempty"`
|
||||
LineId *string `json:"lineId,omitempty" url:"lineId,omitempty"`
|
||||
Type *int32 `json:"type,omitempty" url:"type,omitempty"`
|
||||
Host *string `json:"host,omitempty" url:"host,omitempty"`
|
||||
Data *string `json:"data,omitempty" url:"data,omitempty"`
|
||||
PageIndex *int32 `json:"pageIndex,omitempty" url:"pageIndex,omitempty"`
|
||||
PageSize *int32 `json:"pageSize,omitempty" url:"pageSize,omitempty"`
|
||||
}
|
||||
|
||||
type ListRecordsResponse struct {
|
||||
@ -34,31 +35,12 @@ func (c *Client) ListRecordsWithContext(ctx context.Context, req *ListRecordsReq
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
if req.DomainId != nil {
|
||||
httpreq.SetQueryParam("domainId", *req.DomainId)
|
||||
}
|
||||
if req.GroupId != nil {
|
||||
httpreq.SetQueryParam("groupId", *req.GroupId)
|
||||
}
|
||||
if req.LineId != nil {
|
||||
httpreq.SetQueryParam("lineId", *req.LineId)
|
||||
}
|
||||
if req.Type != nil {
|
||||
httpreq.SetQueryParam("type", strconv.Itoa(int(*req.Type)))
|
||||
}
|
||||
if req.Host != nil {
|
||||
httpreq.SetQueryParam("host", *req.Host)
|
||||
}
|
||||
if req.Data != nil {
|
||||
httpreq.SetQueryParam("data", *req.Data)
|
||||
}
|
||||
if req.PageIndex != nil {
|
||||
httpreq.SetQueryParam("pageIndex", strconv.Itoa(int(*req.PageIndex)))
|
||||
}
|
||||
if req.PageSize != nil {
|
||||
httpreq.SetQueryParam("pageSize", strconv.Itoa(int(*req.PageSize)))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -2,20 +2,21 @@ package console
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type GetBucketsRequest struct {
|
||||
BucketName string `json:"status"`
|
||||
BusinessType string `json:"business_type"`
|
||||
Type string `json:"type"`
|
||||
Status string `json:"state"`
|
||||
Tag string `json:"tag"`
|
||||
IsSecurityCDN bool `json:"security_cdn"`
|
||||
WithDomains bool `json:"with_domains"`
|
||||
Page int32 `json:"page"`
|
||||
PerPage int32 `json:"perPage"`
|
||||
BucketName string `json:"status" url:"bucket_name"`
|
||||
BusinessType string `json:"business_type" url:"business_type"`
|
||||
Type string `json:"type" url:"type"`
|
||||
Status string `json:"state" url:"state"`
|
||||
Tag string `json:"tag" url:"tag"`
|
||||
IsSecurityCDN bool `json:"security_cdn" url:"security_cdn"`
|
||||
WithDomains bool `json:"with_domains" url:"with_domains"`
|
||||
Page int32 `json:"page" url:"page"`
|
||||
PerPage int32 `json:"perPage" url:"perPage"`
|
||||
}
|
||||
|
||||
type GetBucketsResponse struct {
|
||||
@ -64,15 +65,12 @@ func (c *Client) GetBucketsWithContext(ctx context.Context, req *GetBucketsReque
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
httpreq.SetQueryParam("bucket_name", req.BucketName)
|
||||
httpreq.SetQueryParam("business_type", req.BusinessType)
|
||||
httpreq.SetQueryParam("type", req.Type)
|
||||
httpreq.SetQueryParam("state", req.Status)
|
||||
httpreq.SetQueryParam("tag", req.Tag)
|
||||
httpreq.SetQueryParam("security_cdn", fmt.Sprintf("%v", req.IsSecurityCDN))
|
||||
httpreq.SetQueryParam("with_domains", fmt.Sprintf("%v", req.WithDomains))
|
||||
httpreq.SetQueryParam("page", fmt.Sprintf("%d", req.Page))
|
||||
httpreq.SetQueryParam("perPage", fmt.Sprintf("%d", req.PerPage))
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -108,10 +108,11 @@ const SettingsAccountUsername = ({ className, style }: { className?: string; sty
|
||||
<div className="mb-2">
|
||||
<Typography.Text type="secondary">{t("settings.account.username.tips")}</Typography.Text>
|
||||
</div>
|
||||
<Flex align="center" gap="small">
|
||||
<div className="mb-2">
|
||||
<Typography.Text>{getAuthStore().record?.email}</Typography.Text>
|
||||
<Button onClick={handleEditClick}>{t("settings.account.username.button.label")}</Button>
|
||||
</Flex>
|
||||
</div>
|
||||
|
||||
<Button onClick={handleEditClick}>{t("settings.account.username.button.label")}</Button>
|
||||
</>
|
||||
)}
|
||||
</Form>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user