client

package
v0.0.0-...-09fb60c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAliyunRegion = "cn-shenzhen"
	FormatTypeText      = "text"
	FormatTypeHTML      = "html"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AliyunClient

type AliyunClient struct {
	Client *alimt.Client
}

func NewAliyunClient

func NewAliyunClient(opts AliyunOptions) (*AliyunClient, error)

func (*AliyunClient) ListSupportedLanguages

func (c *AliyunClient) ListSupportedLanguages()

func (*AliyunClient) Translate

func (c *AliyunClient) Translate(original map[string]string, sl, tl string) (map[string]string, error)

type AliyunOptions

type AliyunOptions struct {
	RegionID     string
	AccessKeyID  string
	AccessSecret string
}

type Client

type Client interface {
	Translate(original map[string]string, sl, tl string) (map[string]string, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL