Passed
Push — main ( 2e2460...79b9ab )
by Acho
01:46
created

stubs.PingOk   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
package stubs
2
3
// PingOk returns the api response to the `/ping` endpoint
4
func PingOk() []byte {
5
	return []byte(`
6
{
7
    "time": "2022-10-08T14:31:10+00:00",
8
    "version": "2.2.0",
9
    "nonce": "95cdf110-4614-4d95-b6c2-f14fe01c4995",
10
    "key": "6B352110-4716-11ED-963F-0800200C9A66"
11
}
12
`)
13
}
14
15
// PingError returns an error api response to the `/ping` endpoint
16
func PingError() []byte {
17
	return []byte(`
18
{
19
    "devMsg": "Access token invalid",
20
    "usrMsg": "Authentication error when connecting to service",
21
    "respCode": 4009,
22
    "link": "http:\\/\\/support.maviance.com\\/"
23
}
24
`)
25
}
26