resource_factory

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

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 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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL