Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KIT-CA
dfnpkitool
Commits
a2827fee
Commit
a2827fee
authored
Aug 12, 2020
by
Heiko Reese
Browse files
Added command `profiles` to list all valid profile names
parent
1d787297
Pipeline
#104232
passed with stage
in 23 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
cmd/profiles.go
0 → 100644
View file @
a2827fee
// Copyright © 2020 NAME HERE <EMAIL ADDRESS>
//
// 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.
package
cmd
import
(
"fmt"
"git.scc.kit.edu/KIT-CA/dfnpki"
"github.com/spf13/cobra"
)
// profilesCmd represents the profiles command
var
profilesCmd
=
&
cobra
.
Command
{
Use
:
"profiles"
,
Short
:
"Print a list of all available profiles (used for »--profile« of command »request«)."
,
Long
:
`Print a list of all available profiles (used for »--profile« of command »request«).
A detailed description of all available profiles can be found at https://www.ca.kit.edu/p/zertifikatsprofile`
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
fmt
.
Println
(
"
\n
# Machines"
)
for
_
,
name
:=
range
dfnpki
.
RolesMachines
{
fmt
.
Println
(
name
)
}
fmt
.
Println
(
"
\n
# Users"
)
for
_
,
name
:=
range
dfnpki
.
RolesUser
{
fmt
.
Println
(
name
)
}
},
}
func
init
()
{
rootCmd
.
AddCommand
(
profilesCmd
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment