Documentation ¶
Index ¶
- type AliOss
- func (a AliOss) DeleteObjects(objects []string) error
- func (a AliOss) GetPolicyToken(expireSeconds int64, ossHost string, directoryPrefix string, ...) ([]byte, error)
- func (a AliOss) GetSignUrl(objectName string) (string, error)
- func (a AliOss) ListObjects(prefix string) ([]oss.ObjectProperties, error)
- func (a AliOss) MakePublicURL(domain, key string) (finalUrl string)
- func (a AliOss) Move(srcObjectKey, destObjectKey string, options ...oss.Option) error
- func (a AliOss) PutObject(objectName string, reader io.Reader, options ...oss.Option) error
- func (a AliOss) SignUrl(req *SignUrlRequest) (string, error)
- func (a AliOss) VerifyCallbackSignature(r *http.Request) error
- type CallbackParam
- type CdnClient
- func (c CdnClient) DescribeCdnDomainDetail(req *cdn20180510.DescribeCdnDomainDetailRequest, runtime *util.RuntimeOptions) (*cdn20180510.DescribeCdnDomainDetailResponse, error)
- func (c CdnClient) DescribeDomainCertificateInfoWithOptions(req *cdn20180510.DescribeDomainCertificateInfoRequest, ...) (*cdn20180510.DescribeDomainCertificateInfoResponse, error)
- func (c CdnClient) DescribeUserDomainsWithOptions(req *cdn20180510.DescribeUserDomainsRequest, runtime *util.RuntimeOptions) (*cdn20180510.DescribeUserDomainsResponse, error)
- func (c CdnClient) SetCdnDomainSSLCertificate(req *cdn20180510.SetCdnDomainSSLCertificateRequest, ...) (*cdn20180510.SetCdnDomainSSLCertificateResponse, error)
- type ConfigStruct
- type DCdnClient
- func (c DCdnClient) DescribeDcdnDomainCertificateInfoWithOptions(req *dcdn20180115.DescribeDcdnDomainCertificateInfoRequest, ...) (*dcdn20180115.DescribeDcdnDomainCertificateInfoResponse, error)
- func (c DCdnClient) DescribeDcdnDomainDetailWithOptions(req *dcdn20180115.DescribeDcdnDomainDetailRequest, ...) (*dcdn20180115.DescribeDcdnDomainDetailResponse, error)
- func (c DCdnClient) DescribeDcdnUserDomainsWithOptions(req *dcdn20180115.DescribeDcdnUserDomainsRequest, runtime *util.RuntimeOptions) (*dcdn20180115.DescribeDcdnUserDomainsResponse, error)
- func (c DCdnClient) SetDcdnDomainSSLCertificate(req *dcdn20180115.SetDcdnDomainSSLCertificateRequest, ...) (*dcdn20180115.SetDcdnDomainSSLCertificateResponse, error)
- type DnsClient
- type DocMindClient
- type GreenClient
- type ImageModerationInfo
- type ImageModerationRequest
- type PolicyToken
- type SegmentationClient
- func (s SegmentationClient) SegmentBody(req *imageseg20191230.SegmentBodyRequest) (*imageseg20191230.SegmentBodyResponse, error)
- func (s SegmentationClient) SegmentCommodity(req *imageseg20191230.SegmentCommodityRequest) (*imageseg20191230.SegmentCommodityResponse, error)
- func (s SegmentationClient) SegmentCommodityAdvance(req *imageseg20191230.SegmentCommodityAdvanceRequest, ...) (*imageseg20191230.SegmentCommodityResponse, error)
- func (s SegmentationClient) SegmentCommonImage(req *imageseg20191230.SegmentCommonImageRequest) (*imageseg20191230.SegmentCommonImageResponse, error)
- func (s SegmentationClient) SegmentCommonImageAdvance(req *imageseg20191230.SegmentCommonImageAdvanceRequest, ...) (*imageseg20191230.SegmentCommonImageResponse, error)
- func (s SegmentationClient) SegmentHDBody(req *imageseg20191230.SegmentHDBodyRequest) (*imageseg20191230.SegmentHDBodyResponse, error)
- func (s SegmentationClient) SegmentHDCommonImage(req *imageseg20191230.SegmentHDCommonImageRequest) (*imageseg20191230.SegmentHDCommonImageResponse, error)
- type SignUrlRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliOss ¶
type AliOss struct {
// contains filtered or unexported fields
}
AliOss is a struct that holds the client and bucket information for interacting with Aliyun OSS.
func NewAliOss ¶
NewAliOss creates a new instance of AliOss. It takes the endpoint, accessKeyId, accessKeySecret, and bucketName as parameters. It returns a pointer to the created AliOss instance and an error if any occurred during the creation.
func (AliOss) DeleteObjects ¶
DeleteObjects deletes files from the OSS bucket. It takes a list of object names as a parameter and returns an error if the delete operation fails.
func (AliOss) GetPolicyToken ¶ added in v0.0.25
func (a AliOss) GetPolicyToken(expireSeconds int64, ossHost string, directoryPrefix string, callBackUrl string) ([]byte, error)
GetPolicyToken generates a policy token for uploading files to the OSS bucket. expireSeconds Token有效期,单位秒. ossHost OSS域名,"http://bucket-name.oss-cn-hangzhou.aliyuncs.com" directoryPrefix 上传目录前缀. callBackUrl 上传回调地址.
func (AliOss) GetSignUrl ¶
GetSignUrl generates a signed URL for a file in the OSS bucket. It takes the objectName as a parameter and returns the signed URL and an error if the operation fails.
func (AliOss) ListObjects ¶
func (a AliOss) ListObjects(prefix string) ([]oss.ObjectProperties, error)
ListObjects lists the files in the OSS bucket. It takes a prefix as a parameter and returns a list of ObjectProperties and an error if the operation fails.
func (AliOss) MakePublicURL ¶
MakePublicURL generates a public URL for a file in the OSS bucket. It takes the domain and key as parameters and returns the generated URL.
func (AliOss) Move ¶ added in v0.0.24
Move moves a file within the OSS bucket. It takes the source object key, destination object key, and options as parameters. It returns an error if the move operation fails.
func (AliOss) PutObject ¶
PutObject uploads a file to OSS. It takes the objectName, reader, and options as parameters. It returns an error if the upload operation fails.
type CallbackParam ¶ added in v0.0.25
type CdnClient ¶ added in v0.0.29
type CdnClient struct {
// contains filtered or unexported fields
}
func (CdnClient) DescribeCdnDomainDetail ¶ added in v0.0.29
func (c CdnClient) DescribeCdnDomainDetail(req *cdn20180510.DescribeCdnDomainDetailRequest, runtime *util.RuntimeOptions) (*cdn20180510.DescribeCdnDomainDetailResponse, error)
DescribeCdnDomainDetail 查询指定加速域名的基本配置
func (CdnClient) DescribeDomainCertificateInfoWithOptions ¶ added in v0.0.29
func (c CdnClient) DescribeDomainCertificateInfoWithOptions(req *cdn20180510.DescribeDomainCertificateInfoRequest, runtime *util.RuntimeOptions) (*cdn20180510.DescribeDomainCertificateInfoResponse, error)
DescribeDomainCertificateInfoWithOptions 查询域名证书信息
func (CdnClient) DescribeUserDomainsWithOptions ¶ added in v0.0.29
func (c CdnClient) DescribeUserDomainsWithOptions(req *cdn20180510.DescribeUserDomainsRequest, runtime *util.RuntimeOptions) (*cdn20180510.DescribeUserDomainsResponse, error)
DescribeUserDomainsWithOptions 查询用户名下所有的域名与状态,支持域名模糊匹配过滤和域名状态过滤
func (CdnClient) SetCdnDomainSSLCertificate ¶ added in v0.0.29
func (c CdnClient) SetCdnDomainSSLCertificate(req *cdn20180510.SetCdnDomainSSLCertificateRequest, runtime *util.RuntimeOptions) (*cdn20180510.SetCdnDomainSSLCertificateResponse, error)
type ConfigStruct ¶ added in v0.0.25
type DCdnClient ¶ added in v0.0.29
type DCdnClient struct {
// contains filtered or unexported fields
}
func NewDCdnClient ¶ added in v0.0.29
func NewDCdnClient(config *openapi.Config) (*DCdnClient, error)
func (DCdnClient) DescribeDcdnDomainCertificateInfoWithOptions ¶ added in v0.0.29
func (c DCdnClient) DescribeDcdnDomainCertificateInfoWithOptions(req *dcdn20180115.DescribeDcdnDomainCertificateInfoRequest, runtime *util.RuntimeOptions) (*dcdn20180115.DescribeDcdnDomainCertificateInfoResponse, error)
DescribeDcdnDomainCertificateInfoWithOptions 查询指定域名证书信息
func (DCdnClient) DescribeDcdnDomainDetailWithOptions ¶ added in v0.0.29
func (c DCdnClient) DescribeDcdnDomainDetailWithOptions(req *dcdn20180115.DescribeDcdnDomainDetailRequest, runtime *util.RuntimeOptions) (*dcdn20180115.DescribeDcdnDomainDetailResponse, error)
DescribeDcdnDomainDetailWithOptions 获取指定加速域名配置的基本信息
func (DCdnClient) DescribeDcdnUserDomainsWithOptions ¶ added in v0.0.29
func (c DCdnClient) DescribeDcdnUserDomainsWithOptions(req *dcdn20180115.DescribeDcdnUserDomainsRequest, runtime *util.RuntimeOptions) (*dcdn20180115.DescribeDcdnUserDomainsResponse, error)
DescribeDcdnUserDomainsWithOptions 查询用户名下所有的DCDN域名,支持域名模糊匹配过滤和域名状态过滤
func (DCdnClient) SetDcdnDomainSSLCertificate ¶ added in v0.0.29
func (c DCdnClient) SetDcdnDomainSSLCertificate(req *dcdn20180115.SetDcdnDomainSSLCertificateRequest, runtime *util.RuntimeOptions) (*dcdn20180115.SetDcdnDomainSSLCertificateResponse, error)
type DnsClient ¶ added in v0.0.29
type DnsClient struct {
// contains filtered or unexported fields
}
func (DnsClient) DescribeDomains ¶ added in v0.0.29
func (d DnsClient) DescribeDomains(describeDomainsRequest *alidns20150109.DescribeDomainsRequest, runtime *util.RuntimeOptions) (*alidns20150109.DescribeDomainsResponse, error)
DescribeDomains 获取域名列表
type DocMindClient ¶ added in v0.0.24
type DocMindClient struct {
// contains filtered or unexported fields
}
DocMindClient is a struct that holds a client instance for interacting with the DocMind API.
func NewDocMindClient ¶ added in v0.0.24
func NewDocMindClient(accessKeyId, accessKeySecret, endpoint string) (*DocMindClient, error)
NewDocMindClient is a function that initializes a new DocMindClient. It takes in an accessKeyId, accessKeySecret, and endpoint as parameters. It returns a pointer to a DocMindClient and an error.
func (DocMindClient) GetDocumentConvertResult ¶ added in v0.0.24
func (d DocMindClient) GetDocumentConvertResult(requestId string) (*client.GetDocumentConvertResultResponse, error)
GetDocumentConvertResult is a method on the DocMindClient struct that retrieves the result of a document conversion job. It takes in a requestId as a parameter, which is the ID of the job to retrieve the result for. It returns a pointer to a GetDocumentConvertResultResponse and an error. https://help.aliyun.com/zh/document-mind/developer-reference/convertpdftoword?spm=a2c4g.11186623.0.0.778453cedQWluW#fba5587e2duz1
func (DocMindClient) SubmitConvertPdfToWordJobAdvance ¶ added in v0.0.24
func (d DocMindClient) SubmitConvertPdfToWordJobAdvance(fileName string, reader io.Reader) (*client.SubmitConvertPdfToWordJobResponse, error)
SubmitConvertPdfToWordJobAdvance is a method on the DocMindClient struct that submits a job to convert a PDF to a Word document. It takes in a fileName and a reader as parameters. The reader is expected to be a stream of the PDF file. It returns a pointer to a SubmitConvertPdfToWordJobResponse and an error.
type GreenClient ¶
type GreenClient struct {
// contains filtered or unexported fields
}
GreenClient is a struct that holds the client information for interacting with Alibaba Cloud's Green service.
func NewGreenClient ¶
func NewGreenClient(accessKeyId, accessKeySecret, endpoint string) (*GreenClient, error)
NewGreenClient creates a new instance of GreenClient. It takes the accessKeyId, accessKeySecret, and endpoint as parameters. It returns a pointer to the created GreenClient instance and an error if any occurred during the creation. The created client should be reused as much as possible to avoid repeatedly establishing connections and improve detection performance.
func (GreenClient) ImageModeration ¶
func (c GreenClient) ImageModeration(req *ImageModerationRequest) (info *ImageModerationInfo, err error)
ImageModeration performs image moderation. It takes an ImageModerationRequest as a parameter and returns an error if the moderation operation fails.
func (GreenClient) ImageModerationAdvance ¶ added in v0.0.28
func (c GreenClient) ImageModerationAdvance(req *ImageModerationRequest) (list []*ImageModerationInfo, err error)
ImageModerationAdvance is a method on the GreenClient struct. It performs advanced image moderation by checking the image against a set of predefined labels. The method takes an ImageModerationRequest as a parameter, which includes the image URL or OSS details and the labels to check against. The method returns a list of ImageModerationInfo instances, each representing a label that the image was found to match with a confidence score higher than the predefined score. The method also returns an error if the image moderation operation fails. The method uses the Alibaba Cloud's Green service for image moderation.
type ImageModerationInfo ¶ added in v0.0.25
ImageModerationRequest is a struct that holds the information needed for image moderation.
type ImageModerationRequest ¶
type ImageModerationRequest struct { // The URL of the image to be checked, which must be publicly accessible. ImageUrl *string // To use OSS authorization for detection, ossBucketName, ossObjectName, and ossRegionId must be passed in at the same time. // The name of the authorized OSS space, for example: bucket001 OssBucketName *string // The file name of the authorized OSS space, for example: image/001.jpg OssObjectName *string // The region where the OSS Bucket is located, such as oss-cn-hangzhou. OssRegionID *string // Risk labels, where the key is the value of the risk label and the value is the corresponding score, ranging from 0-100. The higher the score, the higher the risk level. // https://help.aliyun.com/document_detail/467829.html?spm=a2c4g.467828.0.0.2fd42592WnfIdf Labels map[string]float32 // 检测规则,可选值:baselineCheck(基础版检测) Service *string }
ImageModerationRequest is a struct that holds the information needed for image moderation.
type PolicyToken ¶ added in v0.0.25
type SegmentationClient ¶ added in v0.0.27
type SegmentationClient struct {
// contains filtered or unexported fields
}
func NewSegmentationClient ¶ added in v0.0.27
func NewSegmentationClient(accessKeyId, accessKeySecret, endpoint string) (*SegmentationClient, error)
func (SegmentationClient) SegmentBody ¶ added in v0.0.27
func (s SegmentationClient) SegmentBody(req *imageseg20191230.SegmentBodyRequest) (*imageseg20191230.SegmentBodyResponse, error)
SegmentBody 人体分割
func (SegmentationClient) SegmentCommodity ¶ added in v0.0.27
func (s SegmentationClient) SegmentCommodity(req *imageseg20191230.SegmentCommodityRequest) (*imageseg20191230.SegmentCommodityResponse, error)
SegmentCommodity 商品分割
func (SegmentationClient) SegmentCommodityAdvance ¶ added in v0.0.28
func (s SegmentationClient) SegmentCommodityAdvance(req *imageseg20191230.SegmentCommodityAdvanceRequest, runtime *util.RuntimeOptions) (*imageseg20191230.SegmentCommodityResponse, error)
func (SegmentationClient) SegmentCommonImage ¶ added in v0.0.27
func (s SegmentationClient) SegmentCommonImage(req *imageseg20191230.SegmentCommonImageRequest) (*imageseg20191230.SegmentCommonImageResponse, error)
SegmentCommonImage 通用分割
func (SegmentationClient) SegmentCommonImageAdvance ¶ added in v0.0.28
func (s SegmentationClient) SegmentCommonImageAdvance(req *imageseg20191230.SegmentCommonImageAdvanceRequest, runtime *util.RuntimeOptions) (*imageseg20191230.SegmentCommonImageResponse, error)
SegmentCommonImage 通用分割
func (SegmentationClient) SegmentHDBody ¶ added in v0.0.27
func (s SegmentationClient) SegmentHDBody(req *imageseg20191230.SegmentHDBodyRequest) (*imageseg20191230.SegmentHDBodyResponse, error)
SegmentHDBody 高清人体分割
func (SegmentationClient) SegmentHDCommonImage ¶ added in v0.0.27
func (s SegmentationClient) SegmentHDCommonImage(req *imageseg20191230.SegmentHDCommonImageRequest) (*imageseg20191230.SegmentHDCommonImageResponse, error)
SegmentHDCommonImage 通用高清分割
type SignUrlRequest ¶
type SignUrlRequest struct { ObjectKey string // The object key Method oss.HTTPMethod // The HTTP method ExpiredInSec int64 // The expiration time in seconds CdnDomain *string // The CDN domain Options []oss.Option // The options }
SignUrlRequest is a struct that holds the information needed to generate a signed URL.