Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Merge requests
!903
WS-702 Added yaml and sh scripts to build go modules via CI
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
WS-702 Added yaml and sh scripts to build go modules via CI
WS-702
into
main
Overview
2
Commits
5
Pipelines
17
Changes
8
1 unresolved thread
Hide all comments
Merged
Nathan Bockisch
requested to merge
WS-702
into
main
2 years ago
Overview
2
Commits
5
Pipelines
17
Changes
8
1 unresolved thread
Hide all comments
Expand
0
0
Merge request reports
Viewing commit
ccaacbe6
Prev
Next
Show latest version
8 files
+
475
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
8
Search (e.g. *.vue) (Ctrl+P)
ccaacbe6
Added yaml and sh scripts to build go modules via CI
· ccaacbe6
Nathan Bockisch
authored
2 years ago
apps/cli/executables/go/mod_analyst/pkg/db/get_db.go
0 → 100644
+
50
−
0
Options
/*
* Copyright (C) 2022 Associated Universities, Inc. Washington DC, USA.
*
* This file is part of NRAO Workspaces.
*
* Workspaces is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Workspaces is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
*/
package
db
import
(
"github.com/magiconair/properties"
)
type
DbInfo
struct
{
Host
string
Port
int
User
string
Password
string
Dbname
string
Property_path
string
Is_ssl
bool
}
/**
* Pull the login information for the database from a properties file
*
* @param db_info a DbInfo type with information to connect to the database
* @return a DbInfo type holding db_info's data with the User and Password
* fields populated
**/
func
getDbLoginFromProperties
(
db_info
DbInfo
)
DbInfo
{
prop
:=
properties
.
MustLoadFile
(
db_info
.
Property_path
,
properties
.
UTF8
)
db_info
.
User
=
prop
.
GetString
(
"metadataDatabase.jdbcUsername"
,
"archive"
)
db_info
.
Password
=
prop
.
GetString
(
"metadataDatabase.jdbcPassword"
,
"docker"
)
return
db_info
}
Loading