summaryrefslogtreecommitdiffstats
path: root/model/gitlab
diff options
context:
space:
mode:
Diffstat (limited to 'model/gitlab')
-rw-r--r--model/gitlab/gitlab.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/model/gitlab/gitlab.go b/model/gitlab/gitlab.go
index e189ee68d..270d62d8b 100644
--- a/model/gitlab/gitlab.go
+++ b/model/gitlab/gitlab.go
@@ -65,6 +65,15 @@ func gitLabUserFromJson(data io.Reader) *GitLabUser {
}
}
+func (glu *GitLabUser) ToJson() string {
+ b, err := json.Marshal(glu)
+ if err != nil {
+ return ""
+ } else {
+ return string(b)
+ }
+}
+
func (glu *GitLabUser) IsValid() bool {
if glu.Id == 0 {
return false