rpc

package
v0.0.0-...-47b8e0f Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JumeiURL = "https://jmisbn.market.alicloudapi.com"
)

Variables

This section is empty.

Functions

func GetAllDNSRecord

func GetAllDNSRecord(ctx context.Context, zone string) ([]cloudflare.DNSRecord, error)

func GetBookInfoByISBN

func GetBookInfoByISBN(ctx context.Context, isbn string) (*model.BookInfo, error)

func GetDefaultIpv4

func GetDefaultIpv4(ctx context.Context) (string, error)

func GetDefaultIpv6

func GetDefaultIpv6(ctx context.Context) (string, error)

func JumeiToModel

func JumeiToModel(jumei *JumeiBookModel) *model.BookInfo

Types

type JumeiBookModel

type JumeiBookModel struct {
	Series    string `json:"series"`
	Title     string `json:"title"`
	Author    string `json:"author"`
	Publisher string `json:"publisher"`
	PubDate   string `json:"pubDate"`
	Isbn      string `json:"isbn"`
	Isbn10    string `json:"isbn10"`
	Price     string `json:"price"`
	Format    string `json:"format"`
	Binding   string `json:"binding"`
	Page      string `json:"page"`
	Img       string `json:"img"`
	Gist      string `json:"gist"`
}

type JumeiResponse

type JumeiResponse struct {
	Data struct {
		Details []*JumeiBookModel `json:"details"`
	} `json:"data"`

	Msg     string `json:"msg"`
	Success bool   `json:"success"`
	Code    int    `json:"code"`
	TaskNo  string `json:"taskNo"`
}

JumeiResponse 聚美的基本返回结构

Jump to

Keyboard shortcuts

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