Documentation ¶
Index ¶
- Constants
- type AuthConfig
- func (config *AuthConfig) EditUserAuth(serverLabel string, auth *UserAuth, defaultUserName string, ...) error
- func (c *AuthConfig) FindUserAuth(serverURL string, username string) *UserAuth
- func (c *AuthConfig) FindUserAuths(serverURL string) []*UserAuth
- func (c *AuthConfig) GetOrCreateServer(url string) *AuthServer
- func (c *AuthConfig) GetOrCreateServerName(url string, name string, kind string) *AuthServer
- func (c *AuthConfig) GetOrCreateUserAuth(url string, username string) *UserAuth
- func (c *AuthConfig) GetServer(url string) *AuthServer
- func (c *AuthConfig) GetServerByName(name string) *AuthServer
- func (config *AuthConfig) GetServerNames() []string
- func (config *AuthConfig) GetServerURLs() []string
- func (config *AuthConfig) IndexOfServerName(name string) int
- func (config *AuthConfig) PickOrCreateServer(defaultServerURL string, message string) (*AuthServer, error)
- func (c *AuthConfig) PickServer(message string) (*AuthServer, error)
- func (c *AuthConfig) PickServerUserAuth(server *AuthServer, message string, batchMode bool) (*UserAuth, error)
- func (c *AuthConfig) SetUserAuth(url string, auth *UserAuth)
- type AuthConfigService
- func (s *AuthConfigService) Config() *AuthConfig
- func (s *AuthConfigService) HasConfigFile() (bool, error)
- func (s *AuthConfigService) LoadConfig() (*AuthConfig, error)
- func (s *AuthConfigService) SaveConfig() error
- func (s *AuthConfigService) SaveUserAuth(url string, userAuth *UserAuth) error
- func (s *AuthConfigService) SetConfig(c AuthConfig)
- type AuthServer
- type UserAuth
Constants ¶
View Source
const (
DefaultWritePermissions = 0760
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct { Servers []*AuthServer DefaultUsername string CurrentServer string }
func (*AuthConfig) EditUserAuth ¶
func (config *AuthConfig) EditUserAuth(serverLabel string, auth *UserAuth, defaultUserName string, editUser, batchMode bool) error
EditUserAuth Lets the user input/edit the user auth
func (*AuthConfig) FindUserAuth ¶
func (c *AuthConfig) FindUserAuth(serverURL string, username string) *UserAuth
FindUserAuth finds the auth for the given user name if no username is specified and there is only one auth then return that else nil
func (*AuthConfig) FindUserAuths ¶
func (c *AuthConfig) FindUserAuths(serverURL string) []*UserAuth
func (*AuthConfig) GetOrCreateServer ¶
func (c *AuthConfig) GetOrCreateServer(url string) *AuthServer
func (*AuthConfig) GetOrCreateServerName ¶ added in v1.0.16
func (c *AuthConfig) GetOrCreateServerName(url string, name string, kind string) *AuthServer
func (*AuthConfig) GetOrCreateUserAuth ¶
func (c *AuthConfig) GetOrCreateUserAuth(url string, username string) *UserAuth
func (*AuthConfig) GetServer ¶
func (c *AuthConfig) GetServer(url string) *AuthServer
func (*AuthConfig) GetServerByName ¶ added in v1.0.40
func (c *AuthConfig) GetServerByName(name string) *AuthServer
func (*AuthConfig) GetServerNames ¶ added in v1.0.39
func (config *AuthConfig) GetServerNames() []string
func (*AuthConfig) GetServerURLs ¶ added in v1.0.40
func (config *AuthConfig) GetServerURLs() []string
func (*AuthConfig) IndexOfServerName ¶ added in v1.0.39
func (config *AuthConfig) IndexOfServerName(name string) int
func (*AuthConfig) PickOrCreateServer ¶ added in v1.1.15
func (config *AuthConfig) PickOrCreateServer(defaultServerURL string, message string) (*AuthServer, error)
PickOrCreateServer picks the server to use defaulting to the current server
func (*AuthConfig) PickServer ¶
func (c *AuthConfig) PickServer(message string) (*AuthServer, error)
func (*AuthConfig) PickServerUserAuth ¶
func (c *AuthConfig) PickServerUserAuth(server *AuthServer, message string, batchMode bool) (*UserAuth, error)
func (*AuthConfig) SetUserAuth ¶
func (c *AuthConfig) SetUserAuth(url string, auth *UserAuth)
type AuthConfigService ¶
type AuthConfigService struct { FileName string // contains filtered or unexported fields }
AuthConfigService is a service for handing the config of auth tokens
func (*AuthConfigService) Config ¶
func (s *AuthConfigService) Config() *AuthConfig
func (*AuthConfigService) HasConfigFile ¶ added in v1.0.129
func (s *AuthConfigService) HasConfigFile() (bool, error)
HasConfigFile returns true if we have a config file
func (*AuthConfigService) LoadConfig ¶
func (s *AuthConfigService) LoadConfig() (*AuthConfig, error)
LoadConfig loads the configuration from the users JX config directory
func (*AuthConfigService) SaveConfig ¶
func (s *AuthConfigService) SaveConfig() error
SaveConfig loads the configuration from the users JX config directory
func (*AuthConfigService) SaveUserAuth ¶
func (s *AuthConfigService) SaveUserAuth(url string, userAuth *UserAuth) error
SaveUserAuth saves the given user auth for the server url
func (*AuthConfigService) SetConfig ¶
func (s *AuthConfigService) SetConfig(c AuthConfig)
type AuthServer ¶
func (*AuthServer) DeleteUser ¶ added in v1.0.40
func (s *AuthServer) DeleteUser(username string) error
func (*AuthServer) Description ¶
func (s *AuthServer) Description() string
func (*AuthServer) GetUsernames ¶ added in v1.0.40
func (s *AuthServer) GetUsernames() []string
func (*AuthServer) Label ¶
func (s *AuthServer) Label() string
Click to show internal directories.
Click to hide internal directories.