Documentation ¶
Index ¶
- Constants
- func CalculateRequestVerification(resourcePath string, sendDate int64, ...) string
- func CalculateResponseVerification(str, str2, str3 string) string
- func CreateRequest(endpoint string, httpMethod string, request string, contentType string, ...) (*http.Request, error)
- func Decorate(req *http.Request) error
- func Decrypt(cipherText, hexKey, hexIV string) string
- func DecryptAnswer(resp *http.Response) ([]byte, error)
- func DecryptRequest(url string, time int64, tenant, token, body, contentType string) string
- func DecryptResponse(timeStamp, contentType, cipherText string) string
- func Encrypt(plainText, hexKey, hexIV string) string
- func EncryptRequest(url string, time int64, tenant, token, body, contentType string) string
- func HmacSha256(secret string, message string) string
- func Md5(value string) string
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5Trimming(encrypt []byte) []byte
- func Sha1(value string) string
- func Sha256(value string) string
- type Answer
- type ChargeStatus
- type LoginData
Constants ¶
View Source
const ( CONTENT_ENCRYPTED = "1" PARAM_AUTHENTICATION = "Basic c3dvcmQ6c3dvcmRfc2VjcmV0" TENANT_ID = "459771" USER_TYPE = "app" BASE_URL_P = "https://gateway-mg-eu.soimt.com/api.app/v1/" )
Variables ¶
This section is empty.
Functions ¶
func CreateRequest ¶
func DecryptRequest ¶
func DecryptResponse ¶
func EncryptRequest ¶
func HmacSha256 ¶
func PKCS5Padding ¶
func PKCS5Trimming ¶
Types ¶
type ChargeStatus ¶
type ChargeStatus struct { RvsChargeStatus struct { MileageSinceLastCharge int TotalBatteryCapacity int WorkingVoltage int ChargingDuration int ChargingType int LastChargeEndingPower int FuelRangeElec int64 // Value / 10 = Range RealtimePower int WorkingCurrent int ChargingGunState int // Gun connected MileageOfDay int StartTime int64 EndTime int64 PowerUsageOfDay int PowerUsageSinceLastCharge int Mileage uint // Odometer } ChrgMgmtData struct { BmsChrgOtptCrntReqV int CcuOnbdChrgrPlugOn int BmsPTCHeatResp int BmsChrgSts int ChrgngAddedElecRngV int BmsPackSOCDsp int // SOC in per mille CcuOffBdChrgrPlugOn int BmsPackCrnt int ImcuChrgngEstdElecRng int ChrgngSpdngTimeV int BmsReserStMintueDspCmd int BmsDsChrgSpRsn int ImcuChrgngEstdElecRngV int BmsPackVol int BmsPackCrntV int ImcuVehElecRngV int BmsReserSpHourDspCmd int BmsAdpPubChrgSttnDspCmd int BmsReserSpMintueDspCmd int BmsAltngChrgCrntDspCmd int DisChrgngRmnngTimeV int ImcuDschrgngEstdElecRngV int BmsChrgSpRsn int DisChrgngRmnngTime int ChrgngAddedElecRng int ClstrElecRngToEPT int // Range BmsPTCHeatReqDspCmd int CcuEleccLckCtrlDspCmd int BmsChrgCtrlDspCmd int BmsOnBdChrgTrgtSOCDspCmd int OnBdChrgrAltrCrntInptCrnt int BmsEstdElecRng int ChrgngDoorOpenCnd int BmsReserCtrlDspCmd int BmsChrgOtptCrntReq int ChrgngDoorPosSts int BmsReserStHourDspCmd int ImcuVehElecRng int // Range ChrgngSpdngTime int ChrgngRmnngTimeV int ImcuDschrgngEstdElecRng int ChrgngRmnngTime int64 // Charging remaining time OnBdChrgrAltrCrntInptVol int } }
type LoginData ¶
type LoginData struct { Tenant_id string LanguageType string User_name string Avatar string Token_type string `json:"token_type,omitempty"` Client_id string Access_token string `json:"access_token"` Role_name string Refresh_token string `json:"refresh_token,omitempty"` License string Post_id string User_id string Role_id string Scope string Oauth_id string Detail struct { LanguageType string } Dept_id string Expires_in int64 `json:"expires_in,omitempty"` Aaccount string Jti string }
Click to show internal directories.
Click to hide internal directories.