blob: 5314e854ff1c87ad3ec0fac64cc47a65c2e340e1 [file] [log] [blame]
Jamie Hannaford984e9172015-02-13 14:34:03 +01001package users
2
Jamie Hannaford984e9172015-02-13 14:34:03 +01003const singleDB = `{"databases": [{"name": "databaseE"}]}`
4
Jamie Hannaforde635b7d2015-02-18 14:11:46 +01005var changePwdReq = `
Jamie Hannaford984e9172015-02-13 14:34:03 +01006{
7 "users": [
8 {
9 "name": "dbuser1",
10 "password": "newpassword"
11 },
12 {
13 "name": "dbuser2",
14 "password": "anotherpassword"
15 }
16 ]
17}
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010018`
Jamie Hannaford984e9172015-02-13 14:34:03 +010019
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010020var updateReq = `
Jamie Hannaford984e9172015-02-13 14:34:03 +010021{
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010022 "user": {
23 "name": "new_username",
24 "password": "new_password"
25 }
Jamie Hannaford984e9172015-02-13 14:34:03 +010026}
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010027`
Jamie Hannaford984e9172015-02-13 14:34:03 +010028
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010029var getResp = `
Jamie Hannaford984e9172015-02-13 14:34:03 +010030{
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010031 "user": {
32 "name": "exampleuser",
33 "host": "foo",
34 "databases": [
35 {
36 "name": "databaseA"
37 },
38 {
39 "name": "databaseB"
40 }
41 ]
42 }
Jamie Hannaford984e9172015-02-13 14:34:03 +010043}
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010044`
Jamie Hannaford984e9172015-02-13 14:34:03 +010045
Jamie Hannaford1b2f8cb2015-10-16 12:25:07 +020046var listResp = `
47{
48"users": [
49 {
50 "name": "dbuser1",
51 "host": "localhost",
52 "databases": [
53 {
54 "name": "databaseA"
55 }
56 ]
57 },
58 {
59 "name": "dbuser2",
60 "host": "localhost",
61 "databases": [
62 {
63 "name": "databaseB"
64 },
65 {
66 "name": "databaseC"
67 }
68 ]
69 }
70]
71}
72`
73
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010074var (
75 listUserAccessResp = singleDB
76 grantUserAccessReq = singleDB
77)