baidu

package module
v0.0.0-...-2fb99e4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 11 Imported by: 0

README

baidu

百度AI的GoSDK

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SDK

type SDK struct {
	// contains filtered or unexported fields
}

func New

func New(apiKey, secretKey string, storage TokenStorage) *SDK

func (*SDK) Body

func (sdk *SDK) Body() body.SDK

func (*SDK) Face

func (sdk *SDK) Face() face.SDK

func (*SDK) Ocr

func (sdk *SDK) Ocr() ocr.SDK

func (*SDK) Rni

func (sdk *SDK) Rni() rni.SDK

func (*SDK) Ugc

func (sdk *SDK) Ugc() ugc.SDK

type TokenStorage

type TokenStorage interface {
	Store(key, value string, ttl time.Duration) error
	Fetch(key string) (string, error)
}

TokenStorage TOKEN持久化

func RedisStorage

func RedisStorage(client *redigo.Client) TokenStorage

Directories

Path Synopsis
pkg
ocr
rni
ugc

Jump to

Keyboard shortcuts

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