Documentation ¶
Index ¶
- Constants
- func IsConflictError(err error) bool
- func NewEDPBadRequestError(id string, format string, args ...interface{}) kebError.ErrorReporter
- func NewEDPConflictError(id string, format string, args ...interface{}) kebError.ErrorReporter
- func NewEDPNotFoundError(id string, format string, args ...interface{}) kebError.ErrorReporter
- func NewEDPOtherError(id string, code int, format string, args ...interface{}) kebError.ErrorReporter
- type Client
- func (c *Client) CreateDataTenant(data DataTenantPayload) error
- func (c *Client) CreateMetadataTenant(name, env string, data MetadataTenantPayload) error
- func (c *Client) DeleteDataTenant(name, env string) (err error)
- func (c *Client) DeleteMetadataTenant(name, env, key string) (err error)
- func (c *Client) GetMetadataTenant(name, env string) (_ []MetadataItem, err error)
- type Config
- type DataTenantItem
- type DataTenantPayload
- type EDPErrReason
- type FakeClient
- func (f *FakeClient) CreateDataTenant(data DataTenantPayload) error
- func (f *FakeClient) CreateMetadataTenant(name, env string, data MetadataTenantPayload) error
- func (f *FakeClient) DeleteDataTenant(name, env string) error
- func (f *FakeClient) DeleteMetadataTenant(name, env, key string) error
- func (f *FakeClient) GetDataTenantItem(name, env string) (item DataTenantItem, exists bool)
- func (f *FakeClient) GetMetadataItem(name, env, key string) (item MetadataItem, exists bool)
- type MetadataItem
- type MetadataTenantPayload
- type NamespaceItem
Constants ¶
View Source
const ( MaasConsumerEnvironmentKey = "maasConsumerEnvironment" MaasConsumerRegionKey = "maasConsumerRegion" MaasConsumerSubAccountKey = "maasConsumerSubAccount" MaasConsumerServicePlan = "maasConsumerServicePlan" )
Variables ¶
This section is empty.
Functions ¶
func IsConflictError ¶
func NewEDPBadRequestError ¶
func NewEDPBadRequestError(id string, format string, args ...interface{}) kebError.ErrorReporter
func NewEDPConflictError ¶
func NewEDPConflictError(id string, format string, args ...interface{}) kebError.ErrorReporter
func NewEDPNotFoundError ¶
func NewEDPNotFoundError(id string, format string, args ...interface{}) kebError.ErrorReporter
func NewEDPOtherError ¶
func NewEDPOtherError(id string, code int, format string, args ...interface{}) kebError.ErrorReporter
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateDataTenant ¶
func (c *Client) CreateDataTenant(data DataTenantPayload) error
func (*Client) CreateMetadataTenant ¶
func (c *Client) CreateMetadataTenant(name, env string, data MetadataTenantPayload) error
func (*Client) DeleteDataTenant ¶
func (*Client) DeleteMetadataTenant ¶
func (*Client) GetMetadataTenant ¶
func (c *Client) GetMetadataTenant(name, env string) (_ []MetadataItem, err error)
type DataTenantItem ¶
type DataTenantItem struct { Namespace NamespaceItem `json:"namespace"` Name string `json:"name"` Environment string `json:"environment"` }
type DataTenantPayload ¶
type EDPErrReason ¶
const ( ErrEDPConflict EDPErrReason = "err_edp_internal" ErrEDPNotFound EDPErrReason = "err_edp_not_found" ErrEDPBadRequest EDPErrReason = "err_edp_bad_request" ErrEDPTimeout EDPErrReason = "err_edp_timeout" ErrEDPOther EDPErrReason = "err_edp_other" )
type FakeClient ¶
type FakeClient struct {
// contains filtered or unexported fields
}
FakeClient implements the edp client interface but does not process data nor call real external system
func (*FakeClient) CreateDataTenant ¶
func (f *FakeClient) CreateDataTenant(data DataTenantPayload) error
func (*FakeClient) CreateMetadataTenant ¶
func (f *FakeClient) CreateMetadataTenant(name, env string, data MetadataTenantPayload) error
func (*FakeClient) DeleteDataTenant ¶
func (f *FakeClient) DeleteDataTenant(name, env string) error
func (*FakeClient) DeleteMetadataTenant ¶
func (f *FakeClient) DeleteMetadataTenant(name, env, key string) error
func (*FakeClient) GetDataTenantItem ¶
func (f *FakeClient) GetDataTenantItem(name, env string) (item DataTenantItem, exists bool)
assert methods
func (*FakeClient) GetMetadataItem ¶
func (f *FakeClient) GetMetadataItem(name, env, key string) (item MetadataItem, exists bool)
type MetadataItem ¶
type MetadataItem struct { DataTenant DataTenantItem `json:"dataTenant"` Key string `json:"key"` Value string `json:"value"` }
type MetadataTenantPayload ¶
type NamespaceItem ¶
type NamespaceItem struct {
Name string `json:"name"`
}
Click to show internal directories.
Click to hide internal directories.