Documentation ¶
Index ¶
- Variables
- func CheckAndGetPlan(planName string, serviceId string) (bool, models.PlanDetails, error)
- func GetLastOperation(instanceId string) (models.CloudOperation, error)
- func GetOrCreatePlanId(planName string, serviceId string) (string, error)
- func GetServiceInstanceCount(instanceID string) (int, error)
- func GetServiceInstanceTotal() (int, error)
- func New(logger lager.Logger) *gorm.DB
- func RunMigrations(db *gorm.DB) error
- func SetupDb(logger lager.Logger) *gorm.DB
- func SoftDeleteInstanceDetails(instanceID string) error
Constants ¶
This section is empty.
Variables ¶
var DbConnection *gorm.DB
Functions ¶
func CheckAndGetPlan ¶
Searches the db by planName and serviceId (since plan names must be distinct within services) If the plan is found, returns the count (should be 1, always) and the plan object. If not, returns 0 and an empty plan object
func GetLastOperation ¶
func GetLastOperation(instanceId string) (models.CloudOperation, error)
func GetOrCreatePlanId ¶
Searches the db by planName and serviceId (since plan names must be disctinct within services) If an entry exists, returns its id. If not, constructs a new UUID and returns it.
func GetServiceInstanceCount ¶
gets the count of service instances by instance id (i.e. 0 or 1)
func GetServiceInstanceTotal ¶
gets the totaly number of service instances that are currently provisioned
func RunMigrations ¶
runs schema migrations on the provided service broker database to get it up to date
func SetupDb ¶
pulls db credentials from the environment, connects to the db, runs migrations, and returns the db connection
func SoftDeleteInstanceDetails ¶
soft deletes an instance from the database by instance id
Types ¶
This section is empty.