csctl/main.go

43 lines
999 B
Go

package main
import (
"csctl/cmd"
"github.com/urfave/cli/v2"
"gopkg.in/hlandau/service.v1/daemon/setuid"
"os"
)
func main() {
setuid.Setresgid(115, 115, 115)
app := &cli.App{
Authors: []*cli.Author{
{Name: "Matthew R", Email: "matthew@staff.libraryofcode.org"},
},
Copyright: "Copyright (c) 2020 Library of Code sp-us | Board of Directors",
Description: "Command line interface containing various functions relating to your CS Account.",
Usage: "Cloud Services Account Control (csctl)",
Commands: []*cli.Command{
{
Name: "apply",
Usage: "",
Description: "Submits various applications to EDS for a decision.",
Subcommands: []*cli.Command{
{
Name: "p-t2",
Description: "Application for Tier 2 pre-approval.",
Action: cmd.ApplySoft,
},
{
Name: "t2",
Description: "Application for Tier 2.",
Action: cmd.ApplyHard,
},
},
},
},
}
app.Run(os.Args)
}