Documentation ¶
Index ¶
- func Register(resourceType dbclient.ResourceType, factory ResourceFactory) error
- type BaseResourceFactory
- func (obj BaseResourceFactory) CreateResource(ctx aliyun_resources.Context, m BaseResourceMaterial) (*dbclient.Record, error)
- func (obj BaseResourceFactory) GetCreator() ResourceCreator
- func (obj BaseResourceFactory) GetDbClient() *dbclient.DBClient
- func (obj BaseResourceFactory) GetRecordType() dbclient.RecordType
- func (obj *BaseResourceFactory) SetDbClient(dbclient *dbclient.DBClient)
- func (obj *BaseResourceFactory) SetRecordType(t dbclient.RecordType)
- type BaseResourceMaterial
- type ResourceCreator
- type ResourceFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(resourceType dbclient.ResourceType, factory ResourceFactory) error
Types ¶
type BaseResourceFactory ¶
type BaseResourceFactory struct { RecordType dbclient.RecordType DBClient *dbclient.DBClient Creator ResourceCreator }
func (BaseResourceFactory) CreateResource ¶
func (obj BaseResourceFactory) CreateResource(ctx aliyun_resources.Context, m BaseResourceMaterial) (*dbclient.Record, error)
CreateResource Create resource
func (BaseResourceFactory) GetCreator ¶
func (obj BaseResourceFactory) GetCreator() ResourceCreator
func (BaseResourceFactory) GetDbClient ¶
func (obj BaseResourceFactory) GetDbClient() *dbclient.DBClient
func (BaseResourceFactory) GetRecordType ¶
func (obj BaseResourceFactory) GetRecordType() dbclient.RecordType
func (*BaseResourceFactory) SetDbClient ¶
func (obj *BaseResourceFactory) SetDbClient(dbclient *dbclient.DBClient)
func (*BaseResourceFactory) SetRecordType ¶
func (obj *BaseResourceFactory) SetRecordType(t dbclient.RecordType)
type BaseResourceMaterial ¶
type BaseResourceMaterial interface { GetVendor() string SetVendor(string) GetRegion() string SetRegion(string) GetVpcID() string SetVpcID(string) GetVSwitchID() string SetVSwitchID(string) GetZoneID() string SetZoneID(string) GetOrgID() string GetUserID() string GetClusterName() string GetProjectID() string GetSource() string GetClientToken() string GetInstanceName() string GetAddonID() string }
type ResourceCreator ¶
type ResourceCreator func(aliyun_resources.Context, BaseResourceMaterial, *dbclient.Record, *apistructs.CreateCloudResourceRecord, apistructs.CloudResourceVpcBaseInfo) (*apistructs.AddonConfigCallBackResponse, *dbclient.ResourceRouting, error)
type ResourceFactory ¶
type ResourceFactory interface { GetDbClient() *dbclient.DBClient SetDbClient(*dbclient.DBClient) GetRecordType() dbclient.RecordType GetCreator() ResourceCreator CreateResource(aliyun_resources.Context, BaseResourceMaterial) (*dbclient.Record, error) }
func GetResourceFactory ¶
func GetResourceFactory(dbClient *dbclient.DBClient, resourceType dbclient.ResourceType) (ResourceFactory, error)
Click to show internal directories.
Click to hide internal directories.