-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,16 +28,52 @@ type Exit struct { | |
} | ||
|
||
type GlobalOptions struct { | ||
// AuthenticationMethod is the method we use to authenticate with the jira serivce. Possible values are "api-token" or "session". | ||
// The default is "api-token" when the service endpoint ends with "atlassian.net", otherwise it "session". Session authentication | ||
// will promt for user password and use the /auth/1/session-login endpoint. | ||
AuthenticationMethod figtree.StringOption `yaml:"authentication-method,omitempty" json:"authentication-method,omitempty"` | ||
Endpoint figtree.StringOption `yaml:"endpoint,omitempty" json:"endpoint,omitempty"` | ||
Insecure figtree.BoolOption `yaml:"insecure,omitempty" json:"insecure,omitempty"` | ||
Login figtree.StringOption `yaml:"login,omitempty" json:"login,omitempty"` | ||
PasswordSource figtree.StringOption `yaml:"password-source,omitempty" json:"password-source,omitempty"` | ||
PasswordDirectory figtree.StringOption `yaml:"password-directory,omitempty" json:"password-directory,omitempty"` | ||
Quiet figtree.BoolOption `yaml:"quiet,omitempty" json:"quiet,omitempty"` | ||
SocksProxy figtree.StringOption `yaml:"socksproxy,omitempty" json:"socksproxy,omitempty"` | ||
UnixProxy figtree.StringOption `yaml:"unixproxy,omitempty" json:"unixproxy,omitempty"` | ||
User figtree.StringOption `yaml:"user,omitempty" json:"user,omitempty"` | ||
|
||
// Endpoint is the URL for the Jira service. Something like: https://go-jira.atlassian.net | ||
Endpoint figtree.StringOption `yaml:"endpoint,omitempty" json:"endpoint,omitempty"` | ||
|
||
// Insecure will allow you to connect to an https endpoint with a self-signed SSL certificate | ||
Insecure figtree.BoolOption `yaml:"insecure,omitempty" json:"insecure,omitempty"` | ||
|
||
// Login is the id used for authenticating with the Jira service. For "api-token" AuthenticationMethod this is usually a | ||
// full email address, something like "[email protected]". For "session" AuthenticationMethod this will be something | ||
// like "user", which by default will use the same value in the `User` field. | ||
Login figtree.StringOption `yaml:"login,omitempty" json:"login,omitempty"` | ||
|
||
// PasswordSource specificies the method that we fetch the password. Possible values are "keyring" or "pass". | ||
// If this is unset we will just prompt the user. For "keyring" this will look in the OS keychain, if missing | ||
// then prompt the user and store the password in the OS keychain. For "pass" this will look in the PasswordDirectory | ||
// location using the `pass` tool, if missing prompt the user and store in the PasswordDirectory | ||
PasswordSource figtree.StringOption `yaml:"password-source,omitempty" json:"password-source,omitempty"` | ||
|
||
// PasswordDirectory is only used for the "pass" PasswordSource. It is the location for the encrypted password | ||
// files used by `pass`. Effectively this overrides the "PASSWORD_STORE_DIR" environment variable | ||
PasswordDirectory figtree.StringOption `yaml:"password-directory,omitempty" json:"password-directory,omitempty"` | ||
|
||
// PasswordName is the the name of the password key entry stored used with PasswordSource `pass`. | ||
PasswordName figtree.StringOption `yaml:"password-name,omitempty" json:"password-name,omitempty"` | ||
|
||
// Quiet will lower the defalt log level to suppress the standard output for commands | ||
Quiet figtree.BoolOption `yaml:"quiet,omitempty" json:"quiet,omitempty"` | ||
|
||
// SocksProxy is used to configure the http client to access the Endpoint via a socks proxy. The value | ||
// should be a ip address and port string, something like "127.0.0.1:1080" | ||
SocksProxy figtree.StringOption `yaml:"socksproxy,omitempty" json:"socksproxy,omitempty"` | ||
|
||
// UnixProxy is use to configure the http client to access the Endpoint via a local unix domain socket used | ||
// to proxy requests | ||
UnixProxy figtree.StringOption `yaml:"unixproxy,omitempty" json:"unixproxy,omitempty"` | ||
|
||
// User is use to represent the user on the Jira service. This can be different from the username used to | ||
// authenticate with the service. For example when using AuthenticationMethod `api-token` the Login is | ||
// typically an email address like `[email protected]` and the User property would be someting like | ||
// `username` The User property is used on Jira service API calls that require a user to associate with | ||
// an Issue (like assigning a Issue to yourself) | ||
User figtree.StringOption `yaml:"user,omitempty" json:"user,omitempty"` | ||
} | ||
|
||
type CommonOptions struct { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters