Documentation ¶
Index ¶
- Variables
- func ConvertValuesTo[T any](input interface{}) (T, error)
- type EventContent
- type EventMessage
- type EventPlaintext
- type Request
- type URLRootResponse
- type Values
- func (vals Values) Delete(key string)
- func (vals Values) Get(key string) interface{}
- func (vals Values) GetResult(resType interface{}) (interface{}, error)
- func (vals Values) Set(key string, value interface{})
- func (vals Values) String() string
- func (vals Values) ToQueryParams() (map[string]string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCallYonSuiteAPIFailed = errors.New("call yonsuite api failed") // 查询API未正确返回 ErrYonSuiteAPIBizError = errors.New("call yonsuite api biz error") // 查询API正常返回,但是结果不正确 ErrAPILimit = errors.New("reached yonsuite api limit") // API限流 ErrAPITooManyCalls = errors.New("too many yonsuite api calls") // 操作过于频繁 ErrNotFound = errors.New("not found") )
View Source
var AdminDeptTreeURL = URLRoot + "/yonbip/digitalModel/admindept/tree"
View Source
var CurrencyDetailURL = URLRoot + "/yonbip/digitalModel/currency/detail"
View Source
var CurrencyListURL = URLRoot + "/yonbip/digitalModel/currency/list"
digitalModel
View Source
var ExchangeRateListURL = URLRoot + "/yonbip/digitalModel/exchangerate/list"
View Source
var ExchangeRateTypeListURL = URLRoot + "/yonbip/digitalModel/exchangeratetype/list"
View Source
var GoodsPositionTree = URLRoot + "/yonbip/digitalModel/goodsposition/tree"
View Source
var GoodsProductSKUProList = URLRoot + "/yonbip/digitalModel/goodsproductskupro/list"
View Source
var LocationStockAnalysisList = URLRoot + "/yonbip/scm/locationstockanalysis/list"
View Source
var MerchantDetailURL = URLRoot + "/yonbip/digitalModel/merchant/detail"
View Source
var MerchantListURL = URLRoot + "/yonbip/digitalModel/merchant/list"
View Source
var MerchantProductPriceURL = URLRoot + "/yonbip/sd/goods/price/customerproduct/list"
sd
View Source
var MorphologyConversionBatchAuditURL = URLRoot + "/yonbip/scm/morphologyconversion/batchaudit"
View Source
var MorphologyConversionSaveURL = URLRoot + "/yonbip/scm/morphologyconversion/save"
View Source
var OrgUnitTreeURL = URLRoot + "/yonbip/digitalModel/orgunit/querytree"
View Source
var OthInRecordDetailURL = URLRoot + "/yonbip/scm/othinrecord/detail"
View Source
var OthInRecordListURL = URLRoot + "/yonbip/scm/othinrecord/list"
scm
View Source
var OthOutRecordDetailURL = URLRoot + "/yonbip/scm/othoutrecord/detail"
View Source
var OthOutRecordListURL = URLRoot + "/yonbip/scm/othoutrecord/list"
View Source
var ProductDetailURL = URLRoot + "/yonbip/digitalModel/product/detail"
View Source
var ProductListURL = URLRoot + "/yonbip/digitalModel/product/list"
View Source
var PurInRecordDetailURL = URLRoot + "/yonbip/scm/purinrecord/detail"
View Source
var PurInRecordListURL = URLRoot + "/yonbip/scm/purinrecord/list"
View Source
var QueryCurrentStocksByConditionURL = URLRoot + "/yonbip/scm/stock/QueryCurrentStocksByCondition"
View Source
var SNFlowDirectionListURL = URLRoot + "/yonbip/scm/snflowdirection/list"
View Source
var SNQuerySNStateListURL = URLRoot + "/yonbip/scm/snQuerysnstate/list"
View Source
var SalesOutDetailURL = URLRoot + "/yonbip/scm/salesout/detail"
View Source
var SalesOutListURL = URLRoot + "/yonbip/scm/salesout/list"
View Source
var StaffDetailURL = URLRoot + "/yonbip/digitalModel/staff/detail"
View Source
var StaffListURL = URLRoot + "/yonbip/digitalModel/staff/list"
View Source
var StockAnalysisList = URLRoot + "/yonbip/scm/stockanalysis/list"
View Source
var StoreInDetailURL = URLRoot + "/yonbip/scm/storein/detail"
View Source
var StoreInListURL = URLRoot + "/yonbip/scm/storein/list"
View Source
var StoreOutDetailURL = URLRoot + "/yonbip/scm/storeout/detail"
View Source
var StoreOutListURL = URLRoot + "/yonbip/scm/storeout/list"
View Source
var StoreTransferListURL = URLRoot + "/yonbip/scm/storetransfer/list"
View Source
var SuitGoodsQueryURL = URLRoot + "/yonbip/sd/dst/suitgoods/query"
View Source
var TradeOrderHoldURL = URLRoot + "/yonbip/sd/dst/tradeorder/tradehold"
View Source
var TradeOrderQueryURL = URLRoot + "/yonbip/sd/dst/tradeorder/query"
View Source
var TradeVouchImportURL = URLRoot + "/yonbip/sd/dst/tradevouch/import"
dst
View Source
var TradeVouchQueryURL = URLRoot + "/yonbip/sd/dst/tradevouch/query"
View Source
var TransactionListURL = URLRoot + "/yonbip/digitalModel/transtype/list"
View Source
var TransactionTreeURL = URLRoot + "/yonbip/digitalModel/transtype/tree"
View Source
var TransferApplyBatchAuditURL = URLRoot + "/yonbip/scm/transferapply/batchaudit"
View Source
var TransferApplyListURL = URLRoot + "/yonbip/scm/transferapply/list"
View Source
var TransferApplySaveURL = URLRoot + "/yonbip/scm/transferapply/save"
View Source
var TransferReqBatchAuditURL = URLRoot + "/yonbip/scm/transferreq/batchaudit"
View Source
var TransferReqListURL = URLRoot + "/yonbip/scm/transferreq/list"
View Source
var TransferReqSaveURL = URLRoot + "/yonbip/scm/transferreq/save"
View Source
var URLRoot = "https://c2.yonyoucloud.com/iuap-api-gateway"
View Source
var VoucherDeliveryBatchDeleteURL = URLRoot + "/yonbip/sd/voucherdelivery/batchdelete"
View Source
var VoucherDeliveryListURL = URLRoot + "/yonbip/sd/voucherdelivery/list"
View Source
var VoucherDeliveryUnauditURL = URLRoot + "/yonbip/sd/voucherdelivery/unaudit"
View Source
var VoucherOrderBatchAuditURL = URLRoot + "/yonbip/sd/voucherorder/batchaudit"
View Source
var VoucherOrderCloseURL = URLRoot + "/yonbip/sd/voucherorder/close"
View Source
var VoucherOrderDetailURL = URLRoot + "/yonbip/sd/voucherorder/detail"
View Source
var VoucherOrderListURL = URLRoot + "/yonbip/sd/voucherorder/list"
View Source
var VoucherOrderSaveURL = URLRoot + "/yonbip/sd/voucherorder/save"
View Source
var VoucherSaleReturnDetailURL = URLRoot + "/yonbip/sd/vouchersalereturn/detail"
View Source
var VoucherSaleReturnListURL = URLRoot + "/yonbip/sd/vouchersalereturn/list"
View Source
var WarehouseDetailURL = URLRoot + "/yonbip/digitalModel/warehouse/detail"
View Source
var WarehouseListURL = URLRoot + "/yonbip/digitalModel/warehouse/list"
Functions ¶
func ConvertValuesTo ¶
Types ¶
type EventContent ¶
type EventContent struct { AccessToken string `json:"access_token"` YHTUser string `json:"yhtUser"` TenantId string `json:"tenantId"` Archive string `json:"archive"` YHTAccessToken string `json:"yht_access_token"` Fullname string `json:"fullname"` Id json.Number `json:"id"` EventParams struct { Data []Values `json:"data"` } `json:"eventParams"` // 库存分配事件的数据在这里 EventParam struct { Data []Values `json:"data"` } `json:"eventParam"` // sn状态变更事件的数据在这里 }
func (EventContent) String ¶
func (e EventContent) String() string
func (EventContent) UnmarshalArchive ¶
func (e EventContent) UnmarshalArchive() (Values, error)
type EventMessage ¶
type EventMessage struct { Signature string `json:"msgSignature"` Timestamp int64 `json:"timestamp"` Nonce string `json:"nonce"` Ciphertext string `json:"encrypt"` }
func ParseEventMessage ¶
func ParseEventMessage(message string) (EventMessage, error)
func (EventMessage) Decrypt ¶
func (e EventMessage) Decrypt(appKey, appSecret string) (EventPlaintext, error)
func (EventMessage) String ¶
func (e EventMessage) String() string
type EventPlaintext ¶
type EventPlaintext struct { EventType string `json:"type"` EventId string `json:"eventId"` Timestamp int64 `json:"timestamp"` TenantId string `json:"tenantId"` StaffIds []string `json:"staffId"` DepartmentIds []string `json:"deptId"` UserIds []string `json:"userId"` Content string `json:"content"` }
func (EventPlaintext) String ¶
func (e EventPlaintext) String() string
func (EventPlaintext) UnmarshalContent ¶
func (e EventPlaintext) UnmarshalContent() (EventContent, error)
type URLRootResponse ¶
Click to show internal directories.
Click to hide internal directories.