Documentation ¶
Index ¶
- Variables
- func KeepAlive(roundTripper soap.RoundTripper, idleTime time.Duration) soap.RoundTripper
- func KeepAliveHandler(roundTripper soap.RoundTripper, idleTime time.Duration, ...) soap.RoundTripper
- func Secret(value string) (string, error)
- type Manager
- func (sm *Manager) AcquireCloneTicket(ctx context.Context) (string, error)
- func (sm *Manager) AcquireGenericServiceTicket(ctx context.Context, spec types.BaseSessionManagerServiceRequestSpec) (*types.SessionManagerGenericServiceTicket, error)
- func (sm *Manager) AcquireLocalTicket(ctx context.Context, userName string) (*types.SessionManagerLocalTicket, error)
- func (sm *Manager) CloneSession(ctx context.Context, ticket string) error
- func (sm *Manager) Login(ctx context.Context, u *url.Userinfo) error
- func (sm *Manager) LoginByToken(ctx context.Context) error
- func (sm *Manager) LoginExtensionByCertificate(ctx context.Context, key string) error
- func (sm *Manager) Logout(ctx context.Context) error
- func (sm Manager) Reference() types.ManagedObjectReference
- func (sm *Manager) SessionIsActive(ctx context.Context) (bool, error)
- func (sm *Manager) SetLocale(ctx context.Context, locale string) error
- func (sm *Manager) TerminateSession(ctx context.Context, sessionId []string) error
- func (sm *Manager) UserSession(ctx context.Context) (*types.UserSession, error)
Constants ¶
This section is empty.
Variables ¶
var Locale = os.Getenv("GOVMOMI_LOCALE")
Locale defaults to "en_US" and can be overridden via this var or the GOVMOMI_LOCALE env var. A value of "_" uses the server locale setting.
Functions ¶
func KeepAlive ¶
func KeepAlive(roundTripper soap.RoundTripper, idleTime time.Duration) soap.RoundTripper
KeepAlive is a backward compatible wrapper around KeepAliveHandler.
func KeepAliveHandler ¶ added in v0.3.0
func KeepAliveHandler(roundTripper soap.RoundTripper, idleTime time.Duration, handler func(soap.RoundTripper) error) soap.RoundTripper
KeepAliveHandler is a backward compatible wrapper around keepalive.NewHandlerSOAP.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) AcquireCloneTicket ¶ added in v0.16.0
func (*Manager) AcquireGenericServiceTicket ¶ added in v0.3.0
func (sm *Manager) AcquireGenericServiceTicket(ctx context.Context, spec types.BaseSessionManagerServiceRequestSpec) (*types.SessionManagerGenericServiceTicket, error)
func (*Manager) AcquireLocalTicket ¶ added in v0.8.0
func (*Manager) CloneSession ¶ added in v0.16.0
func (*Manager) LoginByToken ¶ added in v0.18.0
func (*Manager) LoginExtensionByCertificate ¶ added in v0.3.0
LoginExtensionByCertificate uses the vCenter SDK tunnel to login using a client certificate. The client certificate can be set using the soap.Client.SetCertificate method. See: https://kb.vmware.com/s/article/2004305
func (Manager) Reference ¶
func (sm Manager) Reference() types.ManagedObjectReference
func (*Manager) SessionIsActive ¶
SessionIsActive checks whether the session that was created at login is still valid. This function only works against vCenter.
func (*Manager) TerminateSession ¶ added in v0.3.0
func (*Manager) UserSession ¶
UserSession retrieves and returns the SessionManager's CurrentSession field. Nil is returned if the session is not authenticated.