aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/gogs/go-gogs-client/org.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2018-12-02 12:55:16 -0500
committerUnknwon <u@gogs.io>2018-12-02 12:55:16 -0500
commite755aafe29354f1ec46b0418b0fb6b92ca6aeabb (patch)
tree1097fee0471b6d1bdf8f39fc628b7b656b7a35ef /vendor/github.com/gogs/go-gogs-client/org.go
parente1b3a250085195122c3b41b998504692f47fcb63 (diff)
vendor: update github.com/gogs/go-gogs-client
Diffstat (limited to 'vendor/github.com/gogs/go-gogs-client/org.go')
-rw-r--r--vendor/github.com/gogs/go-gogs-client/org.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/github.com/gogs/go-gogs-client/org.go b/vendor/github.com/gogs/go-gogs-client/org.go
index 08d00882..10d22b50 100644
--- a/vendor/github.com/gogs/go-gogs-client/org.go
+++ b/vendor/github.com/gogs/go-gogs-client/org.go
@@ -50,6 +50,15 @@ type EditOrgOption struct {
Location string `json:"location"`
}
+func (c *Client) CreateOrg(opt CreateOrgOption) (*Organization, error) {
+ body, err := json.Marshal(&opt)
+ if err != nil {
+ return nil, err
+ }
+ org := new(Organization)
+ return org, c.getParsedResponse("POST", "/user/orgs", jsonHeader, bytes.NewReader(body), org)
+}
+
func (c *Client) EditOrg(orgname string, opt EditOrgOption) error {
body, err := json.Marshal(&opt)
if err != nil {