Documentation ¶
Overview ¶
Copyright (C) 2021-2023, Kubefirst
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Index ¶
- Variables
- type EstablishConnectArgs
- type MongoDBClient
- func (mdbcl *MongoDBClient) CreateClusterServiceList(cl *pkgtypes.Cluster) error
- func (mdbcl *MongoDBClient) DeleteCluster(clusterName string) error
- func (mdbcl *MongoDBClient) DeleteClusterServiceListEntry(clusterName string, def *types.Service) error
- func (mdbcl *MongoDBClient) DeleteEnvironment(envId string) error
- func (mdbcl *MongoDBClient) EstablishMongoConnection(args EstablishConnectArgs) error
- func (mdbcl *MongoDBClient) GetCluster(clusterName string) (pkgtypes.Cluster, error)
- func (mdbcl *MongoDBClient) GetClusters() ([]pkgtypes.Cluster, error)
- func (mdbcl *MongoDBClient) GetEnvironment(name string) (pkgtypes.Environment, error)
- func (mdbcl *MongoDBClient) GetEnvironments() ([]pkgtypes.Environment, error)
- func (mdbcl *MongoDBClient) GetGitopsCatalogApps() (types.GitopsCatalogApps, error)
- func (mdbcl *MongoDBClient) GetService(clusterName string, serviceName string) (types.Service, error)
- func (mdbcl *MongoDBClient) GetServices(clusterName string) (types.ClusterServiceList, error)
- func (mdbcl *MongoDBClient) ImportClusterIfEmpty(silent bool) (pkgtypes.Cluster, error)
- func (mdbcl *MongoDBClient) InsertCluster(cl pkgtypes.Cluster) error
- func (mdbcl *MongoDBClient) InsertClusterServiceListEntry(clusterName string, def *types.Service) error
- func (mdbcl *MongoDBClient) InsertEnvironment(env pkgtypes.Environment) (pkgtypes.Environment, error)
- func (mdbcl *MongoDBClient) TestDatabaseConnection(silent bool) error
- func (mdbcl *MongoDBClient) UpdateCluster(clusterName string, field string, value interface{}) error
- func (mdbcl *MongoDBClient) UpdateEnvironment(id string, env types.EnvironmentUpdateRequest) error
- func (mdbcl *MongoDBClient) UpdateGitopsCatalogApps() error
Constants ¶
This section is empty.
Variables ¶
var Client = Connect()
Functions ¶
This section is empty.
Types ¶
type EstablishConnectArgs ¶ added in v0.0.3
type MongoDBClient ¶
type MongoDBClient struct { Client *mongo.Client Context context.Context ClustersCollection *mongo.Collection GitopsCatalogCollection *mongo.Collection ServicesCollection *mongo.Collection EnvironmentsCollection *mongo.Collection }
func (*MongoDBClient) CreateClusterServiceList ¶
func (mdbcl *MongoDBClient) CreateClusterServiceList(cl *pkgtypes.Cluster) error
CreateClusterServiceList adds an entry for a cluster to the service list
func (*MongoDBClient) DeleteCluster ¶
func (mdbcl *MongoDBClient) DeleteCluster(clusterName string) error
DeleteCluster
func (*MongoDBClient) DeleteClusterServiceListEntry ¶
func (mdbcl *MongoDBClient) DeleteClusterServiceListEntry(clusterName string, def *types.Service) error
DeleteClusterServiceListEntry removes a service entry from a cluster's service list
func (*MongoDBClient) DeleteEnvironment ¶ added in v0.0.3
func (mdbcl *MongoDBClient) DeleteEnvironment(envId string) error
func (*MongoDBClient) EstablishMongoConnection ¶ added in v0.0.3
func (mdbcl *MongoDBClient) EstablishMongoConnection(args EstablishConnectArgs) error
func (*MongoDBClient) GetCluster ¶
func (mdbcl *MongoDBClient) GetCluster(clusterName string) (pkgtypes.Cluster, error)
GetCluster
func (*MongoDBClient) GetClusters ¶
func (mdbcl *MongoDBClient) GetClusters() ([]pkgtypes.Cluster, error)
GetClusters
func (*MongoDBClient) GetEnvironment ¶ added in v0.0.3
func (mdbcl *MongoDBClient) GetEnvironment(name string) (pkgtypes.Environment, error)
GetEnvironment
func (*MongoDBClient) GetEnvironments ¶ added in v0.0.3
func (mdbcl *MongoDBClient) GetEnvironments() ([]pkgtypes.Environment, error)
GetEnvironments
func (*MongoDBClient) GetGitopsCatalogApps ¶
func (mdbcl *MongoDBClient) GetGitopsCatalogApps() (types.GitopsCatalogApps, error)
GetGitopsCatalogApps
func (*MongoDBClient) GetService ¶
func (mdbcl *MongoDBClient) GetService(clusterName string, serviceName string) (types.Service, error)
GetService returns a single service associated with a given cluster
func (*MongoDBClient) GetServices ¶
func (mdbcl *MongoDBClient) GetServices(clusterName string) (types.ClusterServiceList, error)
GetServices returns services associated with a given cluster
func (*MongoDBClient) ImportClusterIfEmpty ¶ added in v0.0.3
func (mdbcl *MongoDBClient) ImportClusterIfEmpty(silent bool) (pkgtypes.Cluster, error)
ImportClusterIfEmpty
func (*MongoDBClient) InsertCluster ¶
func (mdbcl *MongoDBClient) InsertCluster(cl pkgtypes.Cluster) error
InsertCluster
func (*MongoDBClient) InsertClusterServiceListEntry ¶
func (mdbcl *MongoDBClient) InsertClusterServiceListEntry(clusterName string, def *types.Service) error
InsertClusterServiceListEntry appends a service entry for a cluster's service list
func (*MongoDBClient) InsertEnvironment ¶ added in v0.0.3
func (mdbcl *MongoDBClient) InsertEnvironment(env pkgtypes.Environment) (pkgtypes.Environment, error)
InsertEnvironment
func (*MongoDBClient) TestDatabaseConnection ¶
func (mdbcl *MongoDBClient) TestDatabaseConnection(silent bool) error
TestDatabaseConnection
func (*MongoDBClient) UpdateCluster ¶
func (mdbcl *MongoDBClient) UpdateCluster(clusterName string, field string, value interface{}) error
UpdateCluster
func (*MongoDBClient) UpdateEnvironment ¶ added in v0.0.4
func (mdbcl *MongoDBClient) UpdateEnvironment(id string, env types.EnvironmentUpdateRequest) error
func (*MongoDBClient) UpdateGitopsCatalogApps ¶
func (mdbcl *MongoDBClient) UpdateGitopsCatalogApps() error
UpdateGitopsCatalogApps