func (o *OrgsClient) RemoveMember(ctx context.Context, orgID identity.ID,
	userID identity.ID) error {
	path := "/orgs/" + orgID.String() + "/members/" + userID.String()
	return o.client.RoundTrip(ctx, "DELETE", path, nil, nil, nil)
}
RemoveMember removes a user from an org
package registry
import (
	"context"
	"errors"
	"net/url"
	"github.com/manifoldco/torus-cli/apitypes"
	"github.com/manifoldco/torus-cli/envelope"
	"github.com/manifoldco/torus-cli/identity"
	"github.com/manifoldco/torus-cli/primitive"
)
type OrgsClient struct {
	client RoundTripper
}
type orgCreateRequest struct {
	Body struct {
		Name string `json:"name"`
	} `json:"body"`
}
type OrgTreeSegment struct {
	Org      *primitive.Org      `json:"org"`
	Policies []primitive.Policy  `json:"policies"`
	Profiles []*apitypes.Profile `json:"profiles"`
	Teams    []*struct {
		Team              *envelope.Team               `json:"team"`
		Memberships       *[]envelope.Membership       `json:"memberships"`
		PolicyAttachments *[]envelope.PolicyAttachment `json:"policy_attachments"`
	} `json:"teams"`
}
func (o *OrgsClient) Create(ctx context.Context, name string) (*envelope.Org, error) {
	org := orgCreateRequest{}
	org.Body.Name = name
	res := envelope.Org{}
	err := o.client.RoundTrip(ctx, "POST", "/orgs", nil, &org, &res)
	return &res, err
}
func (o *OrgsClient) Get(ctx context.Context, orgID *identity.ID) (*envelope.Org, error) {
	org := envelope.Org{}
	err := o.client.RoundTrip(ctx, "GET", "/orgs/"+orgID.String(), nil, nil, &org)
	return &org, err
}
func (o *OrgsClient) GetByName(ctx context.Context, name string) (*envelope.Org, error) {
	v := &url.Values{}
	if name == "" {
		return nil, errors.New("invalid org name")
	}
	v.Set("name", name)
	var orgs []envelope.Org
	err := o.client.RoundTrip(ctx, "GET", "/orgs", v, nil, &orgs)
	if err != nil {
		return nil, err
	}
	if len(orgs) < 1 {
		return nil, nil
	}
	return &orgs[0], nil
}
func (o *OrgsClient) List(ctx context.Context) ([]envelope.Org, error) {
	var orgs []envelope.Org
	err := o.client.RoundTrip(ctx, "GET", "/orgs", nil, nil, &orgs)
	return orgs, err
}