dadago

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

README

Dada Logistics Open Platform SDK For Golang Language

Go Report Card Go Reference ImDada-CI GitHub GitHub go.mod Go version (branch)

Dada logistics information service open platform SDK for Golang language. Help you save costs and achieve efficient distribution

Installation

go get -u -v github.com/houseme/imdadago@main

Usage

package main

import (
    "context"
    "fmt"
    
    "github.com/houseme/imdadago"
)

func main()  {
    ctx := context.Background()
    d := dadago.New(ctx, dada.WithAppKey("xxxxx"), dada.WithAppSecret("xxxxx"))
    
    fmt.Println("Dada:", d)
}

License

FeiE is primarily distributed under the terms of both the Apache License (Version 2.0)

Documentation

Overview

Package dadago is the ImDaDa-go client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdultProducts

func AdultProducts() int

AdultProducts 成人用品

func AutoRepairParts

func AutoRepairParts() int

AutoRepairParts 汽修零配

func Cake

func Cake() int

Cake 蛋糕

func Campus

func Campus() int

Campus 校园

func CellPhone

func CellPhone() int

CellPhone 手机

func ChafingDish

func ChafingDish() int

ChafingDish 火锅

func Clothing

func Clothing() int

Clothing 服装

func ConvenienceStores

func ConvenienceStores() int

ConvenienceStores 便利店

func CrayfishBBQ

func CrayfishBBQ() int

CrayfishBBQ 小龙虾/烧烤

func DigitalAppliances

func DigitalAppliances() int

DigitalAppliances 数码家电

func Drink

func Drink() int

Drink 饮料

func FlowersAndGreenery

func FlowersAndGreenery() int

FlowersAndGreenery 鲜花绿植

func FoodSnacks

func FoodSnacks() int

FoodSnacks 食品小吃

func FreshFruit

func FreshFruit() int

FreshFruit 水果生鲜

func HighEndMarket

func HighEndMarket() int

HighEndMarket 高端市场

func Home

func Home() int

Home 家装

func HomeTextiles

func HomeTextiles() int

HomeTextiles 家居家纺

func IntraCityECommerce

func IntraCityECommerce() int

IntraCityECommerce 同城电商

func Medicine

func Medicine() int

Medicine 医药

func Mother

func Mother() int

Mother 母婴

func Other

func Other() int

Other 其他

func PersonalCareMakeup

func PersonalCareMakeup() int

PersonalCareMakeup 个护美妆

func PrintingTicketing

func PrintingTicketing() int

PrintingTicketing 文印票务

func RechargeCateH5

func RechargeCateH5() string

RechargeCateH5 H5充值

func RechargeCatePC

func RechargeCatePC() string

RechargeCatePC PC充值

func SmallCommodityMarkets

func SmallCommodityMarkets() int

SmallCommodityMarkets 小商品市场

func Supermarket

func Supermarket() int

Supermarket 超市

func Wine

func Wine() int

Wine 酒品

Types

type Client

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

Client is the ImDada client.

func New

func New(ctx context.Context, opts ...Option) *Client

New creates a new ImDada client.

func (*Client) AdditionalOrders

func (c *Client) AdditionalOrders(ctx context.Context, req *domain.OrdersAddAppointRequest) (resp *domain.OrdersAddAppointResponse, err error)

AdditionalOrders additional order. 增加订单 url: http://newopen.imdada.cn/#/development/file/appointOrder

func (*Client) CancelOrder

func (c *Client) CancelOrder(ctx context.Context, req *domain.OrdersCancelRequest) (resp *domain.OrdersCancelResponse, err error)

CancelOrder cancel order. 取消订单 url: http://newopen.imdada.cn/#/development/file/formalCancel

func (*Client) CancelTheAddOnOrder

func (c *Client) CancelTheAddOnOrder(ctx context.Context, req *domain.OrdersCancelAppointRequest) (resp *domain.OrdersCancelAppointResponse, err error)

CancelTheAddOnOrder cancel appoint order CancelTheAddOnOrder 取消预约单 url: http://newopen.imdada.cn/#/development/file/appointOrderCancel

func (*Client) CreateAComplaint

func (c *Client) CreateAComplaint(ctx context.Context, req *domain.ComplaintRequest) (resp *domain.ComplaintResponse, err error)

CreateAComplaint create a complaint. 创建投诉 url: http://newopen.imdada.cn/#/development/file/complaintDada

func (*Client) CreateMerchant

func (c *Client) CreateMerchant(ctx context.Context, req *domain.MerchantCreateRequest) (resp *domain.MerchantCreateResponse, err error)

CreateMerchant create merchant. 添加商户 url: http://newopen.imdada.cn/#/development/file/merchantAdd

func (*Client) CreateOrder

func (c *Client) CreateOrder(ctx context.Context, req *domain.OrdersCreateRequest) (resp *domain.OrdersCreateResponse, err error)

CreateOrder create order. 添加订单 url: http://newopen.imdada.cn/#/development/file/add

func (*Client) CreateShop

func (c *Client) CreateShop(ctx context.Context, req *domain.ShopCreateRequest) (resp *domain.ShopCreateResponse, err error)

CreateShop create shop. 添加门店 url: http://newopen.imdada.cn/#/development/file/shopAdd

func (*Client) ModifyFetchCode

ModifyFetchCode modify fetch code. 修改取货码 url: http://newopen.imdada.cn/#/development/file/modifyFetchCode

func (*Client) ModifyShop

func (c *Client) ModifyShop(ctx context.Context, req *domain.ShopUpdateRequest) (resp *domain.ShopUpdateResponse, err error)

ModifyShop modify shop. 编辑门店 url: http://newopen.imdada.cn/#/development/file/shopUpdate

func (*Client) OrderConfirmCancel

OrderConfirmCancel order confirm cancel. 商户审核骑士取消订单 url: http://newopen.imdada.cn/#/development/file/applicationCancel

func (*Client) OrderConfirmGoods

func (c *Client) OrderConfirmGoods(ctx context.Context, req *domain.OrdersConfirmGoodsRequest) (resp *domain.OrdersConfirmGoodsResponse, err error)

OrderConfirmGoods order confirm goods. 商户确认物品已返还

func (*Client) OrdersAddTip

func (c *Client) OrdersAddTip(ctx context.Context, req *domain.OrdersAddTipRequest) (resp *domain.OrdersAddTipResponse, err error)

OrdersAddTip add tip. 添加小费 url: http://newopen.imdada.cn/#/development/file/addTip

func (*Client) OrdersCreateByDeliverFeeQuery

OrdersCreateByDeliverFeeQuery create order by deliver the fee query. 通过运费接口创建订单 url: http://newopen.imdada.cn/#/development/file/addAfterQuery

func (*Client) QueriesCanAppendKnights

func (c *Client) QueriesCanAppendKnights(ctx context.Context, req *domain.OrdersAppointTransporterRequest) (resp *domain.OrdersAppointTransporterResponse, err error)

QueriesCanAppendKnights query can append knights. 查询可追加骑士 url: http://newopen.imdada.cn/#/development/file/listTransportersToAppoint

func (*Client) QueryBalance

func (c *Client) QueryBalance(ctx context.Context, req *domain.QueryBalanceRequest) (resp *domain.QueryBalanceResponse, err error)

QueryBalance query balance. 查询账户余额 url: http://newopen.imdada.cn/#/development/file/balanceQuery

func (*Client) QueryCity

func (c *Client) QueryCity(ctx context.Context, req *domain.CityListQueryRequest) (resp *domain.CityListQueryResponse, err error)

QueryCity query city list 获取城市信息列表 http://newopen.imdada.cn/#/development/file/cityList

func (*Client) QueryComplaint

func (c *Client) QueryComplaint(ctx context.Context, req *domain.ComplaintReasonRequest) (resp *domain.ComplaintReasonResponse, err error)

QueryComplaint query complaint. 查询投诉 url: http://newopen.imdada.cn/#/development/file/queryComplaintDada

func (*Client) QueryDeliverFee

func (c *Client) QueryDeliverFee(ctx context.Context, req *domain.DeliverFeeQueryRequest) (resp *domain.DeliverFeeQueryResponse, err error)

QueryDeliverFee query deliver fee. 订单运费查询 url: http://newopen.imdada.cn/#/development/file/readyAdd

func (*Client) QueryOrderStatus

func (c *Client) QueryOrderStatus(ctx context.Context, req *domain.OrdersQueryRequest) (resp *domain.OrdersQueryResponse, err error)

QueryOrderStatus query order status. 订单详情查询 url: http://newopen.imdada.cn/#/development/file/statusQuery

func (*Client) QueryShop

func (c *Client) QueryShop(ctx context.Context, req *domain.ShopQueryRequest) (resp *domain.ShopQueryResponse, err error)

QueryShop query shop. 门店详情 url: http://newopen.imdada.cn/#/development/file/shopDetail

func (*Client) QueryTransporterPosition

func (c *Client) QueryTransporterPosition(ctx context.Context, req *domain.OrdersTransporterPositionRequest) (resp *domain.OrdersTransporterPositionResponse, err error)

QueryTransporterPosition query transporter position. 查询骑士位置 url: http://newopen.imdada.cn/#/development/file/queryLocation

func (*Client) QueryTransporterTrack

func (c *Client) QueryTransporterTrack(ctx context.Context, req *domain.OrdersTransporterTrackRequest) (resp *domain.OrdersTransporterTrackResponse, err error)

QueryTransporterTrack query transporter track. 查询骑士轨迹 url: http://newopen.imdada.cn/#/development/file/queryDeliverTrack

func (*Client) ReCreateOrder

func (c *Client) ReCreateOrder(ctx context.Context, req *domain.OrdersCreateRequest) (resp *domain.OrdersCreateResponse, err error)

ReCreateOrder recreate order. 重新发布订单 url: http://newopen.imdada.cn/#/development/file/reAdd

func (*Client) Recharge

func (c *Client) Recharge(ctx context.Context, req *domain.RechargeRequest) (resp *domain.RechargeResponse, err error)

Recharge account recharge. 获取充值链接 url: http://newopen.imdada.cn/#/development/file/recharge

func (*Client) VerifySignature

func (c *Client) VerifySignature(_ context.Context, updateTime int64, clientID, orderID, signature string) (err error)

VerifySignature verify signature.

type Level

type Level hlog.Level

Level is the log level.

type Logger

type Logger hlog.FullLogger

Logger is the logger.

type Option

type Option func(o *options)

Option the option is an ImDada option.

func WithAppKey

func WithAppKey(appKey string) Option

WithAppKey sets the app key.

func WithAppSecret

func WithAppSecret(appSecret string) Option

WithAppSecret sets the app secret.

func WithCallback

func WithCallback(callback string) Option

WithCallback sets the callback.

func WithDebug

func WithDebug(debug bool) Option

WithDebug sets the debug.

func WithGateway

func WithGateway(gateway string) Option

WithGateway sets the gateway.

func WithLevel

func WithLevel(level Level) Option

WithLevel sets the log level.

func WithLogPath

func WithLogPath(logPath string) Option

WithLogPath sets the log path.

func WithShopNo

func WithShopNo(shopNo string) Option

WithShopNo sets the shop no.

func WithSourceID

func WithSourceID(sourceID string) Option

WithSourceID sets the source id.

func WithTimeOut

func WithTimeOut(timeout time.Duration) Option

WithTimeOut sets the timeout.

func WithUserAgent

func WithUserAgent(userAgent []byte) Option

WithUserAgent sets the user agent.

Directories

Path Synopsis
Package domain is the ImDaDaGo client.
Package domain is the ImDaDaGo client.
internal
log

Jump to

Keyboard shortcuts

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