flag

package module
v0.0.0-...-2ecee3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGitHubFlags

func AddGitHubFlags(flags *[]cli.Flag)

func AddHttpFlags

func AddHttpFlags(flags *[]cli.Flag)

func AddHttpsFlags

func AddHttpsFlags(flags *[]cli.Flag)

func AddMongoFlags

func AddMongoFlags(flags *[]cli.Flag)

func AddOktaFlags

func AddOktaFlags(flags *[]cli.Flag)

AddOktaFlags adds the Okta-specific command line arguments to the cobra.Command.

func AddPostgresFlags

func AddPostgresFlags(flags *[]cli.Flag)

Types

type GitHubOpts

type GitHubOpts struct {
	Host string
	PAT  string
}

func GetGitHubOpts

func GetGitHubOpts(c *cli.Context) *GitHubOpts

func NewDefaultGitHubOpts

func NewDefaultGitHubOpts() *GitHubOpts

NewDefaultGitHubOpts returns a new GitHubOpts with default values

type HttpOpts

type HttpOpts struct {
	HttpPort int
}

func GetHttpOpts

func GetHttpOpts(c *cli.Context) *HttpOpts

func NewDefaultHttpOpts

func NewDefaultHttpOpts() *HttpOpts

type HttpsOpts

type HttpsOpts struct {
	HttpsSSLCertLocation string
	HttpsSSLKeyLocation  string
	HttpsPort            int
}

func GetHttpsOpts

func GetHttpsOpts(c *cli.Context) *HttpsOpts

func NewDefaultHttpsOpts

func NewDefaultHttpsOpts() *HttpsOpts

func (*HttpsOpts) IsEnabled

func (h *HttpsOpts) IsEnabled() bool

type MongoOpts

type MongoOpts struct {
	MongoHost     string
	MongoPort     int
	MongoUsername string
	MongoPassword string
}

func GetMongoOpts

func GetMongoOpts(c *cli.Context) *MongoOpts

func NewDefaultMongoOpts

func NewDefaultMongoOpts() *MongoOpts

func (*MongoOpts) GetURI

func (m *MongoOpts) GetURI() string

type OktaOpts

type OktaOpts struct {
	OktaClientID          string
	OktaClientIDFile      string
	OktaClientSecret      string
	OktaClientSecretFile  string
	OktaIssuer            string
	OktaRedirectURL       string
	OktaLogoutRedirectURL string
	OktaAPIPath           string
}

OktaOpts is the options for accessing Okta

func GetOktaOpts

func GetOktaOpts(c *cli.Context) *OktaOpts

GetOktaOpts parses the cobra.Command and returns the OktaOpts.

func NewDefaultOktaOpts

func NewDefaultOktaOpts() *OktaOpts

NewDefaultOktaOpts returns a new OktaOpts with default values

func (*OktaOpts) IsEnabled

func (o *OktaOpts) IsEnabled() bool

IsEnabled is true if all the arguments are non-empty

type PostgresOpts

type PostgresOpts struct {
	PostgresHost     string
	PostgresPort     int
	PostgresUsername string
	PostgresPassword string
	PostgresDBName   string
}

func GetPostgresOpts

func GetPostgresOpts(c *cli.Context) *PostgresOpts

func NewDefaultPostgresOpts

func NewDefaultPostgresOpts() *PostgresOpts

func (*PostgresOpts) ConnectionString

func (p *PostgresOpts) ConnectionString() string

func (*PostgresOpts) ConnectionStringWithoutDBName

func (p *PostgresOpts) ConnectionStringWithoutDBName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL