bjdxsdk

package
v0.0.0-...-db4407b Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 基地址
	BaseUrl = " http://223.71.73.132:8083/API-BACKEND"

	// 无牌车上报的车牌
	NoPlateNumber = "UNKNOWN"

	// 车辆进出场标志位
	InOutEnter = uint8(1) // 入场
	InOutExit  = uint8(0) // 出场
)

Variables

This section is empty.

Functions

func UUIDString

func UUIDString() string

生成32位UUID

Types

type Client

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

连接

func NewClient

func NewClient(conf Config, appUuid string) *Client

func (*Client) ParkData

func (c *Client) ParkData(req ParkDataRequest) (rsp ParkDataResponse, err error)

上传停车场实时总进出车辆信息、实时出入库数及当前空闲车位数

func (*Client) ParkInfo

func (c *Client) ParkInfo(req ParkInfoRequest) (rsp ParkInfoResponse, err error)

上传停车场基础信息数据,首次连接成功后调用一次完成上传即可

type Config

type Config struct {
	AppKey    string `json:"app_key"`    // 停车场Key
	AppSecret string `json:"app_secret"` // 应用密钥
}

type ParkDataRequest

type ParkDataRequest struct {
	In      int64  `json:"inCount"`   // 调用接口时刻总进库车辆数(当天)
	Out     int64  `json:"outCount"`  // 调用接口时刻总出库车辆数(当天)
	Free    int64  `json:"nowNumber"` // 调用接口时刻总剩余空闲车位数
	PlateId string `json:"plateId"`   // 本次进库/出库车辆车牌信息,未识别车牌可标识为UNKNOWN
	InOut   uint8  `json:"inout"`     // 该车辆进出场标志位,参见常量
	DoTime  int64  `json:"doTime"`    // 该车辆进出库记录Unix时间戳
}

type ParkDataResponse

type ParkDataResponse struct {
	Code    int64  `json:"code"` // 0为成功
	Message string `json:"msg"`  // 消息
}

type ParkInfoRequest

type ParkInfoRequest struct {
	Fullname     string  `json:"parkFullName"`               // 停车场全称,请使用经营备案证的规范名称
	RecordNumber string  `json:"parkRecordNumber,omitempty"` // 停车场备案证号
	Abbrname     string  `json:"parkForShort"`               // 停车场简称
	UnitPrice    float64 `json:"parkUnitPrice"`              // 停车场收费标准,如:1元/15分钟(只报送小型车临停收费标准),传4
	Latitude     float64 `json:"parkLatitude"`               // 停车场纬度,百度坐标
	Longitude    float64 `json:"parkLongitude"`              // 停车场经度,百度坐标
	Address      string  `json:"parkLocationName"`           // 停车场位置名称
	Business     string  `json:"parkBusiness,omitempty"`     // 经营管理单位
	Contact      string  `json:"parkContact"`                // 单位负责人
	Phone        string  `json:"parkContactPhone"`           // 联系电话
	Space        int64   `json:"parkNumber"`                 // 停车场总车位数
	OutSpace     int64   `json:"outParkingNum,omitempty"`    // 对外临停车位数
	ParkType     string  `json:"parkType,omitempty"`         // 停车场类型
}

type ParkInfoResponse

type ParkInfoResponse struct {
}

Jump to

Keyboard shortcuts

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