Documentation
¶
Index ¶
- func Delete(access string, secret string, bucket string, fileKey string) error
- func GetDownloadURL(access string, secret string, domain string, fileKey string, deadline int64) string
- func Upload(ctx context.Context, access string, secret string, zone *storage.Zone, ...) error
- func UploadImg(ctx context.Context, access string, secret string, bucket string, ...) error
- func UploadToken(access string, secret string, bucket string) string
- type StRespImageCensor
- type StRespTextCensor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDownloadURL ¶
func GetDownloadURL(access string, secret string, domain string, fileKey string, deadline int64) string
GetDownloadURL 获取私有下载链接
func Upload ¶
func Upload(ctx context.Context, access string, secret string, zone *storage.Zone, bucket string, fileKey string, bs []byte) error
Upload 上传到qiniu
Types ¶
type StRespImageCensor ¶ added in v0.0.28
type StRespImageCensor struct {
Code int `json:"code"`
Message string `json:"message"`
Error string `json:"error"`
EntryID string `json:"entry_id"`
Result struct {
Suggestion string `json:"suggestion"`
Scenes struct {
Ads struct {
Suggestion string `json:"suggestion"`
Details []struct {
Suggestion string `json:"suggestion"`
Label string `json:"label"`
Score float64 `json:"score"`
} `json:"details"`
} `json:"ads"`
Politician struct {
Suggestion string `json:"suggestion"`
Details []struct {
Suggestion string `json:"suggestion"`
Label string `json:"label"`
Score float64 `json:"score"`
} `json:"details"`
} `json:"politician"`
Pulp struct {
Suggestion string `json:"suggestion"`
Details []struct {
Suggestion string `json:"suggestion"`
Label string `json:"label"`
Score float64 `json:"score"`
} `json:"details"`
} `json:"pulp"`
Terror struct {
Suggestion string `json:"suggestion"`
Details []struct {
Suggestion string `json:"suggestion"`
Label string `json:"label"`
Score float64 `json:"score"`
} `json:"details"`
} `json:"terror"`
} `json:"scenes"`
} `json:"result"`
}
func ImageCensor ¶ added in v0.0.28
func ImageCensor(access string, secret string, uri string) (*StRespImageCensor, error)
ImageCensor 脏字过滤
type StRespTextCensor ¶ added in v0.0.28
type StRespTextCensor struct {
Code int `json:"code"`
Message string `json:"message"`
Error string `json:"error"`
Result struct {
Suggestion string `json:"suggestion"`
Scenes struct {
Antispam struct {
Suggestion string `json:"suggestion"`
Details []struct {
Label string `json:"label"`
Score float64 `json:"score"`
} `json:"details"`
} `json:"antispam"`
} `json:"scenes"`
} `json:"result"`
}
func TextCensor ¶ added in v0.0.28
func TextCensor(access string, secret string, text string) (*StRespTextCensor, error)
TextCensor 脏字过滤
Click to show internal directories.
Click to hide internal directories.