Documentation ¶
Index ¶
- func IsNotFound(err error) bool
- func NewClient(ctx context.Context, kube client.Client, mg resource.Managed) (influxdbv2.Client, error)
- func NewClientWithResponses(ctx context.Context, kube client.Client, mg resource.Managed) (*domain.ClientWithResponses, error)
- type BucketsAPI
- type DBRPsAPI
- type MockBucketsAPI
- func (m *MockBucketsAPI) CreateBucket(ctx context.Context, org *domain.Bucket) (*domain.Bucket, error)
- func (m *MockBucketsAPI) DeleteBucket(ctx context.Context, org *domain.Bucket) error
- func (m *MockBucketsAPI) FindBucketByName(ctx context.Context, orgName string) (*domain.Bucket, error)
- func (m *MockBucketsAPI) UpdateBucket(ctx context.Context, org *domain.Bucket) (*domain.Bucket, error)
- type MockDBRPsAPI
- func (m *MockDBRPsAPI) DeleteDBRPIDWithResponse(ctx context.Context, dbrpID string, params *domain.DeleteDBRPIDParams) (*domain.DeleteDBRPIDResponse, error)
- func (m *MockDBRPsAPI) GetDBRPsWithResponse(ctx context.Context, params *domain.GetDBRPsParams) (*domain.GetDBRPsResponse, error)
- func (m *MockDBRPsAPI) PatchDBRPIDWithResponse(ctx context.Context, dbrpID string, params *domain.PatchDBRPIDParams, ...) (*domain.PatchDBRPIDResponse, error)
- func (m *MockDBRPsAPI) PostDBRPWithResponse(ctx context.Context, params *domain.PostDBRPParams, ...) (*domain.PostDBRPResponse, error)
- type MockOrganizationsAPI
- func (m *MockOrganizationsAPI) CreateOrganization(ctx context.Context, org *domain.Organization) (*domain.Organization, error)
- func (m *MockOrganizationsAPI) DeleteOrganization(ctx context.Context, org *domain.Organization) error
- func (m *MockOrganizationsAPI) FindOrganizationByName(ctx context.Context, orgName string) (*domain.Organization, error)
- func (m *MockOrganizationsAPI) UpdateOrganization(ctx context.Context, org *domain.Organization) (*domain.Organization, error)
- type OrganizationsAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
IsNotFound returns whether the error is of type NotFound.
Types ¶
type BucketsAPI ¶
type BucketsAPI interface { // CreateBucket creates a new bucket. CreateBucket(ctx context.Context, bucket *domain.Bucket) (*domain.Bucket, error) // FindBucketByName returns a bucket found using bucketName. FindBucketByName(ctx context.Context, bucketName string) (*domain.Bucket, error) // UpdateBucket updates a bucket. UpdateBucket(ctx context.Context, bucket *domain.Bucket) (*domain.Bucket, error) // DeleteBucket deletes a bucket. DeleteBucket(ctx context.Context, bucket *domain.Bucket) error }
BucketsAPI is the set of calls we make in controllers that use Buckets API.
type DBRPsAPI ¶
type DBRPsAPI interface { PostDBRPWithResponse(ctx context.Context, params *domain.PostDBRPParams, body domain.PostDBRPJSONRequestBody) (*domain.PostDBRPResponse, error) GetDBRPsWithResponse(ctx context.Context, params *domain.GetDBRPsParams) (*domain.GetDBRPsResponse, error) PatchDBRPIDWithResponse(ctx context.Context, dbrpID string, params *domain.PatchDBRPIDParams, body domain.PatchDBRPIDJSONRequestBody) (*domain.PatchDBRPIDResponse, error) DeleteDBRPIDWithResponse(ctx context.Context, dbrpID string, params *domain.DeleteDBRPIDParams) (*domain.DeleteDBRPIDResponse, error) }
DBRPsAPI is the set of calls we make in controllers that use DBRPs API.
type MockBucketsAPI ¶
type MockBucketsAPI struct { CreateBucketFn func(ctx context.Context, org *domain.Bucket) (*domain.Bucket, error) FindBucketByNameFn func(ctx context.Context, orgName string) (*domain.Bucket, error) UpdateBucketFn func(ctx context.Context, org *domain.Bucket) (*domain.Bucket, error) DeleteBucketFn func(ctx context.Context, org *domain.Bucket) error }
MockBucketsAPI mocks BucketsAPI.
func (*MockBucketsAPI) CreateBucket ¶
func (m *MockBucketsAPI) CreateBucket(ctx context.Context, org *domain.Bucket) (*domain.Bucket, error)
CreateBucket calls CreateBucketFn.
func (*MockBucketsAPI) DeleteBucket ¶
DeleteBucket calls DeleteBucketFn.
func (*MockBucketsAPI) FindBucketByName ¶
func (m *MockBucketsAPI) FindBucketByName(ctx context.Context, orgName string) (*domain.Bucket, error)
FindBucketByName calls FindBucketByNameFn.
func (*MockBucketsAPI) UpdateBucket ¶
func (m *MockBucketsAPI) UpdateBucket(ctx context.Context, org *domain.Bucket) (*domain.Bucket, error)
UpdateBucket calls UpdateBucketFn.
type MockDBRPsAPI ¶
type MockDBRPsAPI struct { PostDBRPWithResponseFn func(ctx context.Context, params *domain.PostDBRPParams, body domain.PostDBRPJSONRequestBody) (*domain.PostDBRPResponse, error) GetDBRPsWithResponseFn func(ctx context.Context, params *domain.GetDBRPsParams) (*domain.GetDBRPsResponse, error) PatchDBRPIDWithResponseFn func(ctx context.Context, dbrpID string, params *domain.PatchDBRPIDParams, body domain.PatchDBRPIDJSONRequestBody) (*domain.PatchDBRPIDResponse, error) DeleteDBRPIDWithResponseFn func(ctx context.Context, dbrpID string, params *domain.DeleteDBRPIDParams) (*domain.DeleteDBRPIDResponse, error) }
MockDBRPsAPI mocks DBRPsAPI.
func (*MockDBRPsAPI) DeleteDBRPIDWithResponse ¶
func (m *MockDBRPsAPI) DeleteDBRPIDWithResponse(ctx context.Context, dbrpID string, params *domain.DeleteDBRPIDParams) (*domain.DeleteDBRPIDResponse, error)
DeleteDBRPIDWithResponse calls DeleteDBRPIDWithResponseFn..
func (*MockDBRPsAPI) GetDBRPsWithResponse ¶
func (m *MockDBRPsAPI) GetDBRPsWithResponse(ctx context.Context, params *domain.GetDBRPsParams) (*domain.GetDBRPsResponse, error)
GetDBRPsWithResponse calls GetDBRPsWithResponseFn.
func (*MockDBRPsAPI) PatchDBRPIDWithResponse ¶
func (m *MockDBRPsAPI) PatchDBRPIDWithResponse(ctx context.Context, dbrpID string, params *domain.PatchDBRPIDParams, body domain.PatchDBRPIDJSONRequestBody) (*domain.PatchDBRPIDResponse, error)
PatchDBRPIDWithResponse calls PatchDBRPIDWithResponseFn.
func (*MockDBRPsAPI) PostDBRPWithResponse ¶
func (m *MockDBRPsAPI) PostDBRPWithResponse(ctx context.Context, params *domain.PostDBRPParams, body domain.PostDBRPJSONRequestBody) (*domain.PostDBRPResponse, error)
PostDBRPWithResponse calls PostDBRPWithResponseFn.
type MockOrganizationsAPI ¶
type MockOrganizationsAPI struct { CreateOrganizationFn func(ctx context.Context, org *domain.Organization) (*domain.Organization, error) FindOrganizationByNameFn func(ctx context.Context, orgName string) (*domain.Organization, error) UpdateOrganizationFn func(ctx context.Context, org *domain.Organization) (*domain.Organization, error) DeleteOrganizationFn func(ctx context.Context, org *domain.Organization) error }
MockOrganizationsAPI mocks OrganizationsAPI.
func (*MockOrganizationsAPI) CreateOrganization ¶
func (m *MockOrganizationsAPI) CreateOrganization(ctx context.Context, org *domain.Organization) (*domain.Organization, error)
CreateOrganization calls CreateOrganizationFn.
func (*MockOrganizationsAPI) DeleteOrganization ¶
func (m *MockOrganizationsAPI) DeleteOrganization(ctx context.Context, org *domain.Organization) error
DeleteOrganization calls DeleteOrganizationFn.
func (*MockOrganizationsAPI) FindOrganizationByName ¶
func (m *MockOrganizationsAPI) FindOrganizationByName(ctx context.Context, orgName string) (*domain.Organization, error)
FindOrganizationByName calls FindOrganizationByNameFn.
func (*MockOrganizationsAPI) UpdateOrganization ¶
func (m *MockOrganizationsAPI) UpdateOrganization(ctx context.Context, org *domain.Organization) (*domain.Organization, error)
UpdateOrganization calls UpdateOrganizationFn.
type OrganizationsAPI ¶
type OrganizationsAPI interface { // CreateOrganization creates new organization. CreateOrganization(ctx context.Context, org *domain.Organization) (*domain.Organization, error) // FindOrganizationByName returns an organization found using orgName. FindOrganizationByName(ctx context.Context, orgName string) (*domain.Organization, error) // UpdateOrganization updates organization. UpdateOrganization(ctx context.Context, org *domain.Organization) (*domain.Organization, error) // DeleteOrganization deletes an organization. DeleteOrganization(ctx context.Context, org *domain.Organization) error }
OrganizationsAPI is the set of calls we make in controllers that use Organizations API.