コード例 #1
0
ファイル: system_reset.go プロジェクト: bnjjj/tatcli
func resetSystemUserAction(username string) {
	m := resetSystemUserJSON{username}
	jsonStr, err := json.Marshal(m)
	internal.Check(err)
	fmt.Print(internal.ReqWant("PUT", http.StatusCreated, "/user/resetsystem", jsonStr))
}
コード例 #2
0
ファイル: check.go プロジェクト: bnjjj/tatcli
func checkUserAction(username string, fixPrivateTopics, fixDefaultGroup bool) {
	m := checkUserJSON{username, fixPrivateTopics, fixDefaultGroup}
	jsonStr, err := json.Marshal(m)
	internal.Check(err)
	fmt.Println(internal.ReqWant("PUT", http.StatusCreated, "/user/check", jsonStr))
}
コード例 #3
0
ファイル: convert_to_system.go プロジェクト: bnjjj/tatcli
func convertUserAction(username, canWriteNotifications string) {
	m := convertUserJSON{username, canWriteNotifications}
	jsonStr, err := json.Marshal(m)
	internal.Check(err)
	fmt.Print(internal.ReqWant("PUT", http.StatusCreated, "/user/convert", jsonStr))
}