Documentation
¶
Index ¶
- type CredentialRemover
- type ProfileNotFoundError
- type Service
- func (s Service) AddProfile(name, siteURL string) error
- func (s Service) CreateAlias(profileName, name string, alias projectconfig.Alias) error
- func (s Service) DeleteAlias(profileName, name string) error
- func (s Service) DeleteProfile(name string) error
- func (s Service) RenameAlias(profileName, currentName, newName string) error
- func (s Service) SetAlias(ctx context.Context, profileName, name string, alias projectconfig.Alias) (string, error)
- func (s Service) SetAliasAccount(profileName, name, account string) error
- func (s Service) SetProfileOrganization(profileName, organization string) error
- func (s Service) UpdateProfileURL(name, siteURL string) error
- func (s Service) UseProfile(name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CredentialRemover ¶
type ProfileNotFoundError ¶ added in v0.2.2
type ProfileNotFoundError struct{ Name string }
func (*ProfileNotFoundError) Error ¶ added in v0.2.2
func (e *ProfileNotFoundError) Error() string
type Service ¶
type Service struct {
Store projectconfig.Store
Credentials CredentialRemover
Locker authapp.Locker
}
func (Service) AddProfile ¶
func (Service) CreateAlias ¶ added in v0.1.4
func (s Service) CreateAlias(profileName, name string, alias projectconfig.Alias) error
CreateAlias 在同一配置事务内检查名称与写入,防止并发创建覆盖已有 Alias。
func (Service) DeleteAlias ¶
func (Service) DeleteProfile ¶
func (Service) RenameAlias ¶
func (Service) SetAlias ¶
func (s Service) SetAlias(ctx context.Context, profileName, name string, alias projectconfig.Alias) (string, error)
SetAlias 返回写入时实际选定的 Profile,包括在配置锁内解析的当前 Profile。
func (Service) SetAliasAccount ¶
func (Service) SetProfileOrganization ¶
func (Service) UpdateProfileURL ¶
func (Service) UseProfile ¶
Click to show internal directories.
Click to hide internal directories.