mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-12-04 11:05:20 +00:00
Update deps
This commit is contained in:
25
vendor/github.com/google/go-github/github/orgs.go
generated
vendored
25
vendor/github.com/google/go-github/github/orgs.go
generated
vendored
@@ -6,6 +6,7 @@
|
||||
package github
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
@@ -13,7 +14,7 @@ import (
|
||||
// OrganizationsService provides access to the organization related functions
|
||||
// in the GitHub API.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/orgs/
|
||||
// GitHub API docs: https://developer.github.com/v3/orgs/
|
||||
type OrganizationsService service
|
||||
|
||||
// Organization represents a GitHub organization account.
|
||||
@@ -85,7 +86,7 @@ type OrganizationsListOptions struct {
|
||||
// as the opts.Since parameter for the next call.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/orgs/#list-all-organizations
|
||||
func (s *OrganizationsService) ListAll(opt *OrganizationsListOptions) ([]*Organization, *Response, error) {
|
||||
func (s *OrganizationsService) ListAll(ctx context.Context, opt *OrganizationsListOptions) ([]*Organization, *Response, error) {
|
||||
u, err := addOptions("organizations", opt)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
@@ -97,7 +98,7 @@ func (s *OrganizationsService) ListAll(opt *OrganizationsListOptions) ([]*Organi
|
||||
}
|
||||
|
||||
orgs := []*Organization{}
|
||||
resp, err := s.client.Do(req, &orgs)
|
||||
resp, err := s.client.Do(ctx, req, &orgs)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
@@ -107,8 +108,8 @@ func (s *OrganizationsService) ListAll(opt *OrganizationsListOptions) ([]*Organi
|
||||
// List the organizations for a user. Passing the empty string will list
|
||||
// organizations for the authenticated user.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/orgs/#list-user-organizations
|
||||
func (s *OrganizationsService) List(user string, opt *ListOptions) ([]*Organization, *Response, error) {
|
||||
// GitHub API docs: https://developer.github.com/v3/orgs/#list-user-organizations
|
||||
func (s *OrganizationsService) List(ctx context.Context, user string, opt *ListOptions) ([]*Organization, *Response, error) {
|
||||
var u string
|
||||
if user != "" {
|
||||
u = fmt.Sprintf("users/%v/orgs", user)
|
||||
@@ -126,7 +127,7 @@ func (s *OrganizationsService) List(user string, opt *ListOptions) ([]*Organizat
|
||||
}
|
||||
|
||||
var orgs []*Organization
|
||||
resp, err := s.client.Do(req, &orgs)
|
||||
resp, err := s.client.Do(ctx, req, &orgs)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
@@ -136,8 +137,8 @@ func (s *OrganizationsService) List(user string, opt *ListOptions) ([]*Organizat
|
||||
|
||||
// Get fetches an organization by name.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/orgs/#get-an-organization
|
||||
func (s *OrganizationsService) Get(org string) (*Organization, *Response, error) {
|
||||
// GitHub API docs: https://developer.github.com/v3/orgs/#get-an-organization
|
||||
func (s *OrganizationsService) Get(ctx context.Context, org string) (*Organization, *Response, error) {
|
||||
u := fmt.Sprintf("orgs/%v", org)
|
||||
req, err := s.client.NewRequest("GET", u, nil)
|
||||
if err != nil {
|
||||
@@ -145,7 +146,7 @@ func (s *OrganizationsService) Get(org string) (*Organization, *Response, error)
|
||||
}
|
||||
|
||||
organization := new(Organization)
|
||||
resp, err := s.client.Do(req, organization)
|
||||
resp, err := s.client.Do(ctx, req, organization)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
@@ -155,8 +156,8 @@ func (s *OrganizationsService) Get(org string) (*Organization, *Response, error)
|
||||
|
||||
// Edit an organization.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/orgs/#edit-an-organization
|
||||
func (s *OrganizationsService) Edit(name string, org *Organization) (*Organization, *Response, error) {
|
||||
// GitHub API docs: https://developer.github.com/v3/orgs/#edit-an-organization
|
||||
func (s *OrganizationsService) Edit(ctx context.Context, name string, org *Organization) (*Organization, *Response, error) {
|
||||
u := fmt.Sprintf("orgs/%v", name)
|
||||
req, err := s.client.NewRequest("PATCH", u, org)
|
||||
if err != nil {
|
||||
@@ -164,7 +165,7 @@ func (s *OrganizationsService) Edit(name string, org *Organization) (*Organizati
|
||||
}
|
||||
|
||||
o := new(Organization)
|
||||
resp, err := s.client.Do(req, o)
|
||||
resp, err := s.client.Do(ctx, req, o)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user