2020-12-18 20:25:22 -05:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"csctl/cmd"
|
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
"gopkg.in/hlandau/service.v1/daemon/setuid"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2020-12-18 20:29:56 -05:00
|
|
|
setuid.Setresgid(115, 115, 115)
|
2020-12-18 20:25:22 -05:00
|
|
|
|
|
|
|
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,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2020-12-25 17:20:30 -05:00
|
|
|
{
|
|
|
|
Name: "resources",
|
|
|
|
Usage: "",
|
|
|
|
Description: "Provides information about the resources you're currently using.",
|
|
|
|
Action: cmd.Resources,
|
|
|
|
},
|
2020-12-18 20:25:22 -05:00
|
|
|
},
|
|
|
|
}
|
|
|
|
app.Run(os.Args)
|
|
|
|
}
|