Documentation
¶
Index ¶
- type AccountView
- type AliasAccountRequest
- type AliasView
- type AssetDetailView
- type AssetListRequest
- type AssetPage
- type AssetRequest
- type AssetView
- type AuthService
- type AuthStatus
- type BootstrapState
- type ConfigLoader
- type CreateAliasRequest
- type HostKeyCoordinator
- type HostKeyPrompt
- type LoginAttempt
- type LoginCoordinator
- func (c *LoginCoordinator) Cancel(id string) error
- func (c *LoginCoordinator) Complete(ctx context.Context, id, rawCallback string) (AuthStatus, error)
- func (c *LoginCoordinator) Pending(id string) bool
- func (c *LoginCoordinator) Start(ctx context.Context, requestedProfile string) (LoginAttempt, error)
- type OrganizationView
- type PreferenceStore
- type ProfileSummary
- type ProtocolView
- type QuickSearchRequest
- type RenameAliasRequest
- type ResourceService
- type Service
- func (s Service) AddProfile(name, siteURL string) error
- func (s Service) Bootstrap() (BootstrapState, error)
- func (s Service) CancelLogin(attemptID string) error
- func (s Service) CompleteLogin(ctx context.Context, attemptID, callbackURL string) (AuthStatus, error)
- func (s Service) CreateAlias(ctx context.Context, request CreateAliasRequest) (AliasView, error)
- func (s Service) DeleteAlias(profile, name string) error
- func (s Service) DeleteProfile(name string) error
- func (s Service) GetAsset(ctx context.Context, request AssetRequest) (AssetDetailView, error)
- func (s Service) GetAuthStatus(profile string) (AuthStatus, error)
- func (s Service) LicenseText() string
- func (s Service) ListAssets(ctx context.Context, request AssetListRequest) (AssetPage, error)
- func (s Service) ListOrganizations(ctx context.Context, profile string) ([]OrganizationView, error)
- func (s Service) Logout(ctx context.Context, profile string) error
- func (s Service) QuickSearch(ctx context.Context, request QuickSearchRequest) ([]AssetView, error)
- func (s Service) RefreshAuth(ctx context.Context, profile string) (AuthStatus, error)
- func (s Service) RenameAlias(request RenameAliasRequest) (AliasView, error)
- func (s Service) SavePreferences(value guiconfig.Config) error
- func (s Service) SaveWorkspace(ctx context.Context, workspace guiconfig.Workspace) error
- func (s Service) SetAliasAccount(ctx context.Context, request AliasAccountRequest) error
- func (s Service) SetOrganization(profile, organization string) error
- func (s Service) StartLogin(ctx context.Context, profile string) (LoginAttempt, error)
- func (s Service) UpdateProfileURL(name, siteURL string) error
- func (s Service) UseProfile(name string) error
- type SettingsService
- type TokenSaver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountView ¶
type AliasAccountRequest ¶
type AssetDetailView ¶
type AssetDetailView struct {
AssetView
Accounts []AccountView `json:"accounts"`
Protocols []ProtocolView `json:"protocols"`
}
type AssetListRequest ¶
type AssetRequest ¶
type AuthStatus ¶
type BootstrapState ¶
type BootstrapState struct {
Version string `json:"version"`
CurrentProfile string `json:"currentProfile"`
CurrentOrganization string `json:"currentOrganization"`
Profiles []ProfileSummary `json:"profiles"`
Preferences guiconfig.Config `json:"preferences"`
Workspace guiconfig.Workspace `json:"workspace"`
}
type ConfigLoader ¶
type ConfigLoader interface {
Load() (projectconfig.Config, error)
}
type CreateAliasRequest ¶
type HostKeyCoordinator ¶
type HostKeyCoordinator struct {
Emit func(HostKeyPrompt)
// contains filtered or unexported fields
}
type HostKeyPrompt ¶
type LoginAttempt ¶
type LoginCoordinator ¶
type LoginCoordinator struct {
Config ConfigLoader
Tokens TokenSaver
HTTPClient *http.Client
OpenBrowser func(string) error
Timeout time.Duration
Now func() time.Time
// contains filtered or unexported fields
}
func (*LoginCoordinator) Cancel ¶
func (c *LoginCoordinator) Cancel(id string) error
func (*LoginCoordinator) Complete ¶
func (c *LoginCoordinator) Complete(ctx context.Context, id, rawCallback string) (AuthStatus, error)
func (*LoginCoordinator) Pending ¶
func (c *LoginCoordinator) Pending(id string) bool
func (*LoginCoordinator) Start ¶
func (c *LoginCoordinator) Start(ctx context.Context, requestedProfile string) (LoginAttempt, error)
type OrganizationView ¶
type PreferenceStore ¶
type ProfileSummary ¶
type ProfileSummary struct {
Name string `json:"name"`
URL string `json:"url"`
Organization string `json:"organization"`
AliasCount int `json:"aliasCount"`
Auth AuthStatus `json:"auth"`
}
type ProtocolView ¶
type QuickSearchRequest ¶
type RenameAliasRequest ¶
type ResourceService ¶
type ResourceService interface {
ListOrganizations(context.Context, string) ([]jumpserver.Organization, error)
ListAssets(context.Context, string, string, string, int, int) (jumpserver.AssetPage, error)
FindAsset(context.Context, string, string, string) (jumpserver.AssetDetail, error)
}
type Service ¶
type Service struct {
Version string
Licenses string
Login *LoginCoordinator
Config ConfigLoader
Auth AuthService
Resources ResourceService
Settings SettingsService
Preferences PreferenceStore
}
func (Service) AddProfile ¶
func (Service) Bootstrap ¶
func (s Service) Bootstrap() (BootstrapState, error)
func (Service) CancelLogin ¶
func (Service) CompleteLogin ¶
func (Service) CreateAlias ¶
func (Service) DeleteAlias ¶
func (Service) DeleteProfile ¶
func (Service) GetAsset ¶
func (s Service) GetAsset(ctx context.Context, request AssetRequest) (AssetDetailView, error)
func (Service) GetAuthStatus ¶
func (s Service) GetAuthStatus(profile string) (AuthStatus, error)
func (Service) LicenseText ¶
func (Service) ListAssets ¶
func (Service) ListOrganizations ¶
func (Service) QuickSearch ¶
func (Service) RefreshAuth ¶
func (Service) RenameAlias ¶
func (s Service) RenameAlias(request RenameAliasRequest) (AliasView, error)
func (Service) SaveWorkspace ¶
func (Service) SetAliasAccount ¶
func (s Service) SetAliasAccount(ctx context.Context, request AliasAccountRequest) error
func (Service) SetOrganization ¶
func (Service) StartLogin ¶
func (Service) UpdateProfileURL ¶
func (Service) UseProfile ¶
type SettingsService ¶
type SettingsService interface {
AddProfile(string, string) error
UpdateProfileURL(string, string) error
DeleteProfile(string) error
UseProfile(string) error
SetProfileOrganization(string, string) error
SetAlias(string, string, projectconfig.Alias) error
DeleteAlias(string, string) error
RenameAlias(string, string, string) error
SetAliasAccount(string, string, string) error
}
type TokenSaver ¶
type TokenSaver interface {
Save(string, credential.Token) error
}
Click to show internal directories.
Click to hide internal directories.