Documentation
¶
Overview ¶
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
Index ¶
- func AddAppSub(tx pgx.Tx, uuid, appUUID, subUUID, organization string) error
- func AddApplication(tx pgx.Tx, uuid, name, owner, org string) error
- func AddApplicationAttributes(tx pgx.Tx, appUUID, name, appAttribute string) error
- func AddApplicationKeyMapping(tx pgx.Tx, ...) error
- func AddSubscription(tx pgx.Tx, uuid, apiName, apiVersion, subStatus, organization string, ...) error
- func CloseDBConn()
- func ConnectToDB()
- func DeleteAllAppAttributes(tx pgx.Tx) error
- func DeleteAllAppSub(tx pgx.Tx) error
- func DeleteAllApplicationKeyMappings(tx pgx.Tx) error
- func DeleteAllApplications(tx pgx.Tx) error
- func DeleteAllSubscriptions(tx pgx.Tx) error
- func DeleteAppSub(tx pgx.Tx, uuid string) error
- func DeleteApplication(tx pgx.Tx, uuid string) error
- func DeleteApplicationAttributes(tx pgx.Tx, appUUID string) error
- func DeleteApplicationKeyMapping(tx pgx.Tx, applicationUUID, securityScheme, env string) error
- func DeleteSubscription(tx pgx.Tx, uuid string) error
- func ExecDBQuery(tx pgx.Tx, query string, args ...interface{}) error
- func ExecDBQueryRows(tx pgx.Tx, query string, args ...interface{}) (pgx.Rows, error)
- func GetAllAppSubs(tx pgx.Tx) ([]model.ApplicationMapping, error)
- func GetAllApplicationKeyMappings(tx pgx.Tx) ([]model.ApplicationKeyMapping, error)
- func GetAllApplications(tx pgx.Tx) ([]model.Application, error)
- func GetAllSubscription(tx pgx.Tx) ([]model.Subscription, error)
- func IsAliveConn(ctx context.Context) (isAlive bool)
- func PrepareQueries(tx pgx.Tx, queries ...string)
- func UpdateAppSub(tx pgx.Tx, uuid, appUUID, subUUID, organization string) error
- func UpdateApplication(tx pgx.Tx, uuid, name, owner, org string) error
- func UpdateApplicationKeyMapping(tx pgx.Tx, ...) error
- func UpdateSubscription(tx pgx.Tx, uuid, apiName, apiVersion, subStatus, organization string, ...) error
- type DBDeployer
- func (dbDeployer DBDeployer) DeleteAllApplicationMappings() error
- func (dbDeployer DBDeployer) DeleteAllKeyMappings() error
- func (dbDeployer DBDeployer) DeleteAllSubscriptions() error
- func (dbDeployer DBDeployer) DeleteApplication(applicationID string) error
- func (dbDeployer DBDeployer) DeleteApplicationMappings(applicationMapping string) error
- func (dbDeployer DBDeployer) DeleteKeyMappings(keyMapping model.ApplicationKeyMapping) error
- func (dbDeployer DBDeployer) DeleteSubscription(subscriptionID string) error
- func (dbDeployer DBDeployer) DeployAllApplicationMappings(applicationMappings model.ApplicationMappingList) error
- func (dbDeployer DBDeployer) DeployAllApplications(applications model.ApplicationList) error
- func (dbDeployer DBDeployer) DeployAllKeyMappings(keyMappings model.ApplicationKeyMappingList) error
- func (dbDeployer DBDeployer) DeployAllSubscriptions(subscriptions model.SubscriptionList) error
- func (dbDeployer DBDeployer) DeployApplication(application model.Application) error
- func (dbDeployer DBDeployer) DeployApplicationMappings(applicationMapping model.ApplicationMapping) error
- func (dbDeployer DBDeployer) DeployKeyMappings(keyMapping model.ApplicationKeyMapping) error
- func (dbDeployer DBDeployer) DeploySubscription(subscription model.Subscription) error
- func (dbDeployer DBDeployer) GetAllApplicationMappings() (model.ApplicationMappingList, error)
- func (dbDeployer DBDeployer) GetAllApplications() (model.ApplicationList, error)
- func (dbDeployer DBDeployer) GetAllKeyMappings() (model.ApplicationKeyMappingList, error)
- func (dbDeployer DBDeployer) GetAllSubscriptions() (model.SubscriptionList, error)
- func (dbDeployer DBDeployer) GetApplication(applicationID string) (model.Application, error)
- func (dbDeployer DBDeployer) GetApplicationMappings(applicationID string) (model.ApplicationMapping, error)
- func (dbDeployer DBDeployer) GetKeyMappings(applicationID string) (model.ApplicationKeyMapping, error)
- func (dbDeployer DBDeployer) GetSubscription(subscriptionID string) (model.Subscription, error)
- func (dbDeployer DBDeployer) UpdateApplication(application model.Application) error
- func (dbDeployer DBDeployer) UpdateApplicationMappings(applicationMapping model.ApplicationMapping) error
- func (dbDeployer DBDeployer) UpdateKeyMappings(keyMapping model.ApplicationKeyMapping) error
- func (dbDeployer DBDeployer) UpdateSubscription(subscription model.Subscription) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddApplication ¶
AddApplication adds an application to the database
func AddApplicationAttributes ¶
AddApplicationAttributes adds attributes to an application in the database
func AddApplicationKeyMapping ¶
func AddApplicationKeyMapping(tx pgx.Tx, applicationUUID, securityScheme, applicationIdentifier, keyType, env, organization string) error
AddApplicationKeyMapping adds a key mapping to the database
func AddSubscription ¶
func AddSubscription(tx pgx.Tx, uuid, apiName, apiVersion, subStatus, organization string, rateLimitTier string) error
AddSubscription adds a subscription to the database
func DeleteAllAppAttributes ¶
func DeleteAllAppAttributes(tx pgx.Tx) error
DeleteAllAppAttributes deletes all attributes of all applications from the database
func DeleteAllAppSub ¶
func DeleteAllAppSub(tx pgx.Tx) error
DeleteAllAppSub deletes all application subscription mappings from the database
func DeleteAllApplicationKeyMappings ¶
func DeleteAllApplicationKeyMappings(tx pgx.Tx) error
DeleteAllApplicationKeyMappings deletes all key mappings from the database
func DeleteAllApplications ¶
func DeleteAllApplications(tx pgx.Tx) error
DeleteAllApplications deletes all applications from the database
func DeleteAllSubscriptions ¶
func DeleteAllSubscriptions(tx pgx.Tx) error
DeleteAllSubscriptions deletes all subscriptions from the database
func DeleteAppSub ¶
DeleteAppSub deletes an application subscription mapping from the database
func DeleteApplication ¶
DeleteApplication deletes an application from the database
func DeleteApplicationAttributes ¶
DeleteApplicationAttributes deletes attributes of an application from the database
func DeleteApplicationKeyMapping ¶
DeleteApplicationKeyMapping deletes a key mapping from the database
func DeleteSubscription ¶
DeleteSubscription deletes a subscription from the database
func ExecDBQuery ¶
ExecDBQuery executes a database query
func ExecDBQueryRows ¶
ExecDBQueryRows executes a database query and returns a row
func GetAllAppSubs ¶
func GetAllAppSubs(tx pgx.Tx) ([]model.ApplicationMapping, error)
GetAllAppSubs gets all application subscription mappings from the database
func GetAllApplicationKeyMappings ¶
func GetAllApplicationKeyMappings(tx pgx.Tx) ([]model.ApplicationKeyMapping, error)
GetAllApplicationKeyMappings gets all application key mappings from the database
func GetAllApplications ¶
func GetAllApplications(tx pgx.Tx) ([]model.Application, error)
GetAllApplications gets all applications from the database
func GetAllSubscription ¶
func GetAllSubscription(tx pgx.Tx) ([]model.Subscription, error)
GetAllSubscription gets all subscriptions from the database
func IsAliveConn ¶
IsAliveConn checks if the database connection is alive
func PrepareQueries ¶
func PrepareQueries(tx pgx.Tx, queries ...string)
PrepareQueries prepares the queries
func UpdateAppSub ¶
UpdateAppSub updates an application subscription mapping in the database
func UpdateApplication ¶
UpdateApplication updates an application in the database
func UpdateApplicationKeyMapping ¶
func UpdateApplicationKeyMapping(tx pgx.Tx, applicationUUID, securityScheme, applicationIdentifier, keyType, env, organization string) error
UpdateApplicationKeyMapping updates a key mapping in the database
func UpdateSubscription ¶
func UpdateSubscription(tx pgx.Tx, uuid, apiName, apiVersion, subStatus, organization string, rateLimitTier string) error
UpdateSubscription updates a subscription in the database
Types ¶
type DBDeployer ¶
type DBDeployer struct {
// contains filtered or unexported fields
}
DBDeployer is a struct that implements ArtifactDeployer interface
func NewDBArtifactDeployer ¶
func NewDBArtifactDeployer(mgr manager.Manager) DBDeployer
NewDBArtifactDeployer creates a new NewDBDeployer
func (DBDeployer) DeleteAllApplicationMappings ¶
func (dbDeployer DBDeployer) DeleteAllApplicationMappings() error
DeleteAllApplicationMappings deletes all application mappings
func (DBDeployer) DeleteAllKeyMappings ¶
func (dbDeployer DBDeployer) DeleteAllKeyMappings() error
DeleteAllKeyMappings deletes all key mappings
func (DBDeployer) DeleteAllSubscriptions ¶
func (dbDeployer DBDeployer) DeleteAllSubscriptions() error
DeleteAllSubscriptions deletes all subscriptions
func (DBDeployer) DeleteApplication ¶
func (dbDeployer DBDeployer) DeleteApplication(applicationID string) error
DeleteApplication deletes an application
func (DBDeployer) DeleteApplicationMappings ¶
func (dbDeployer DBDeployer) DeleteApplicationMappings(applicationMapping string) error
DeleteApplicationMappings deletes an application mapping
func (DBDeployer) DeleteKeyMappings ¶
func (dbDeployer DBDeployer) DeleteKeyMappings(keyMapping model.ApplicationKeyMapping) error
DeleteKeyMappings deletes a key mapping
func (DBDeployer) DeleteSubscription ¶
func (dbDeployer DBDeployer) DeleteSubscription(subscriptionID string) error
DeleteSubscription deletes a subscription
func (DBDeployer) DeployAllApplicationMappings ¶
func (dbDeployer DBDeployer) DeployAllApplicationMappings(applicationMappings model.ApplicationMappingList) error
DeployAllApplicationMappings deploys all application mappings
func (DBDeployer) DeployAllApplications ¶
func (dbDeployer DBDeployer) DeployAllApplications(applications model.ApplicationList) error
DeployAllApplications deploys all key mappings
func (DBDeployer) DeployAllKeyMappings ¶
func (dbDeployer DBDeployer) DeployAllKeyMappings(keyMappings model.ApplicationKeyMappingList) error
DeployAllKeyMappings deploys all key mappings
func (DBDeployer) DeployAllSubscriptions ¶
func (dbDeployer DBDeployer) DeployAllSubscriptions(subscriptions model.SubscriptionList) error
DeployAllSubscriptions deploys all subscriptions
func (DBDeployer) DeployApplication ¶
func (dbDeployer DBDeployer) DeployApplication(application model.Application) error
DeployApplication deploys an application
func (DBDeployer) DeployApplicationMappings ¶
func (dbDeployer DBDeployer) DeployApplicationMappings(applicationMapping model.ApplicationMapping) error
DeployApplicationMappings deploys an application mapping
func (DBDeployer) DeployKeyMappings ¶
func (dbDeployer DBDeployer) DeployKeyMappings(keyMapping model.ApplicationKeyMapping) error
DeployKeyMappings deploys a key mapping
func (DBDeployer) DeploySubscription ¶
func (dbDeployer DBDeployer) DeploySubscription(subscription model.Subscription) error
DeploySubscription deploys a subscription
func (DBDeployer) GetAllApplicationMappings ¶
func (dbDeployer DBDeployer) GetAllApplicationMappings() (model.ApplicationMappingList, error)
GetAllApplicationMappings returns all application mappings
func (DBDeployer) GetAllApplications ¶
func (dbDeployer DBDeployer) GetAllApplications() (model.ApplicationList, error)
GetAllApplications returns all applications
func (DBDeployer) GetAllKeyMappings ¶
func (dbDeployer DBDeployer) GetAllKeyMappings() (model.ApplicationKeyMappingList, error)
GetAllKeyMappings returns all key mappings
func (DBDeployer) GetAllSubscriptions ¶
func (dbDeployer DBDeployer) GetAllSubscriptions() (model.SubscriptionList, error)
GetAllSubscriptions returns all subscriptions
func (DBDeployer) GetApplication ¶
func (dbDeployer DBDeployer) GetApplication(applicationID string) (model.Application, error)
GetApplication returns an application
func (DBDeployer) GetApplicationMappings ¶
func (dbDeployer DBDeployer) GetApplicationMappings(applicationID string) (model.ApplicationMapping, error)
GetApplicationMappings returns an application mapping
func (DBDeployer) GetKeyMappings ¶
func (dbDeployer DBDeployer) GetKeyMappings(applicationID string) (model.ApplicationKeyMapping, error)
GetKeyMappings returns a key mapping
func (DBDeployer) GetSubscription ¶
func (dbDeployer DBDeployer) GetSubscription(subscriptionID string) (model.Subscription, error)
GetSubscription returns a subscription
func (DBDeployer) UpdateApplication ¶
func (dbDeployer DBDeployer) UpdateApplication(application model.Application) error
UpdateApplication updates an application
func (DBDeployer) UpdateApplicationMappings ¶
func (dbDeployer DBDeployer) UpdateApplicationMappings(applicationMapping model.ApplicationMapping) error
UpdateApplicationMappings updates an application mapping
func (DBDeployer) UpdateKeyMappings ¶
func (dbDeployer DBDeployer) UpdateKeyMappings(keyMapping model.ApplicationKeyMapping) error
UpdateKeyMappings updates a key mapping
func (DBDeployer) UpdateSubscription ¶
func (dbDeployer DBDeployer) UpdateSubscription(subscription model.Subscription) error
UpdateSubscription updates a subscription