Help us shape the future of Go! Take the 2026 Go Developer Survey

tencent

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Provides = wire.NewSet(
	wire.Struct(new(Controller), "*"),
	wire.Struct(new(Service), "*"),
)

Functions

This section is empty.

Types

type CityResult added in v0.1.0

type CityResult struct {
	Msg     string `json:"msg"`
	Success bool   `json:"success"`
	Code    int    `json:"code"`
	Data    struct {
		OrderNo string `json:"orderNo"`
		Result  Detail `json:"result"`
	} `json:"data"`
}

func (*CityResult) GetDetail added in v0.1.0

func (x *CityResult) GetDetail() Detail

type Controller

type Controller struct {
	TencentService *Service
}

func (*Controller) CosImageInfo added in v0.1.0

func (x *Controller) CosImageInfo(ctx context.Context, c *app.RequestContext)

func (*Controller) CosPresigned

func (x *Controller) CosPresigned(_ context.Context, c *app.RequestContext)

type CosImageInfoDto added in v0.1.0

type CosImageInfoDto struct {
	Url string `query:"url,required"`
}

type Detail added in v0.1.0

type Detail struct {
	Continent string `bson:"continent" json:"continent"`
	Country   string `bson:"country" json:"country"`
	Prov      string `bson:"prov" json:"prov"`
	City      string `bson:"city" json:"city"`
	Owner     string `bson:"owner" json:"owner"`
	ISP       string `bson:"isp" json:"isp"`
	Areacode  string `bson:"areacode" json:"areacode"`
	Asnumber  string `bson:"asnumber" json:"asnumber"`
	Adcode    string `bson:"adcode" json:"adcode"`
	Zipcode   string `bson:"zipcode" json:"zipcode"`
	Timezone  string `bson:"timezone" json:"timezone"`
	Accuracy  string `bson:"accuracy" json:"accuracy"`
	Lat       string `bson:"lat" json:"lat"`
	Lng       string `bson:"lng" json:"lng"`
	Radius    string `bson:"radius" json:"radius"`
	Source    string `bson:"source" json:"source"`
}

type KeyAuthResult added in v0.1.0

type KeyAuthResult struct {
	Date string
	Txt  string
}

type M added in v0.1.0

type M map[string]interface{}

type Service

type Service struct {
	*common.Inject
}

func (*Service) Cos added in v0.1.0

func (x *Service) Cos() (_ *cos.Client)

func (*Service) CosImageInfo added in v0.1.0

func (x *Service) CosImageInfo(ctx context.Context, url string) (r M, err error)

func (*Service) CosPresigned

func (x *Service) CosPresigned() (_ M, err error)

func (*Service) GetIpv4 added in v0.1.9

func (x *Service) GetIpv4(ctx context.Context, ip string) (r *CityResult, err error)

func (*Service) GetIpv6 added in v0.1.9

func (x *Service) GetIpv6(ctx context.Context, ip string) (r *CityResult, err error)

func (*Service) KeyAuth added in v0.1.0

func (x *Service) KeyAuth(source string, id string, key string) (r *KeyAuthResult, err error)

func (*Service) SmsSend added in v0.1.0

func (x *Service) SmsSend(ctx context.Context, sign string, tid string, params []string, phone []string) (err error)

Jump to

Keyboard shortcuts

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