Files
influx-cli/internal/mock/api_organizations.go
Daniel Moran 0b4d753728 feat: port influx bucket commands from influxdb (#54)
* feat: add /buckets and /orgs APIs to codegen
* feat: add bucket CLI commands
* test: add bucket tests
2021-05-03 08:46:53 -04:00

32 lines
913 B
Go

package mock
import (
"context"
"net/http"
"github.com/influxdata/influx-cli/v2/internal/api"
)
var _ api.OrganizationsApi = (*OrganizationsApi)(nil)
type OrganizationsApi struct {
GetOrgsExecuteFn func(api.ApiGetOrgsRequest) (api.Organizations, *http.Response, error)
PostOrgsExecuteFn func(api.ApiPostOrgsRequest) (api.Organization, *http.Response, error)
}
func (o *OrganizationsApi) GetOrgs(context.Context) api.ApiGetOrgsRequest {
return api.ApiGetOrgsRequest{ApiService: o}
}
func (o *OrganizationsApi) GetOrgsExecute(r api.ApiGetOrgsRequest) (api.Organizations, *http.Response, error) {
return o.GetOrgsExecuteFn(r)
}
func (o *OrganizationsApi) PostOrgs(context.Context) api.ApiPostOrgsRequest {
return api.ApiPostOrgsRequest{ApiService: o}
}
func (o *OrganizationsApi) PostOrgsExecute(r api.ApiPostOrgsRequest) (api.Organization, *http.Response, error) {
return o.PostOrgsExecuteFn(r)
}