dvls

package module
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 11 Imported by: 2

README

Go client for Devolutions Server

Go Reference testing

This client is a work in progress, expect breaking changes between releases

Heavily based on the information found on the Devolutions.Server powershell module.

Usage

  • Run go get go get github.com/Devolutions/go-dvls
  • Add the import import "github.com/Devolutions/go-dvls"
  • Setup the client (we recommend using an Application ID)
package main

import (
	"log"

	"github.com/Devolutions/go-dvls"
)

func main() {
    // We strongly recommend using an Application ID with your client
	c, err := dvls.NewClient("username", "password", "https://your-dvls-instance.com")
	if err != nil {
		log.Fatal(err)
	}
	log.Print(c.ClientUser.Username)
}

Documentation

All our documentation is available on Go Reference

License

Copyright 2023.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation

Index

Constants

View Source
const (
	EntryCredentialType string = "Credential"

	EntryCredentialSubTypeAccessCode            string = "AccessCode"
	EntryCredentialSubTypeApiKey                string = "ApiKey"
	EntryCredentialSubTypeAzureServicePrincipal string = "AzureServicePrincipal"
	EntryCredentialSubTypeConnectionString      string = "ConnectionString"
	EntryCredentialSubTypeDefault               string = "Default"
	EntryCredentialSubTypePrivateKey            string = "PrivateKey"
)

Variables

This section is empty.

Functions

func IsNotFound added in v0.14.0

func IsNotFound(err error) bool

IsNotFound reports whether the error is a DVLS RequestError with an HTTP 404 status code.

Types

type Client

type Client struct {
	Entries *Entries
	Vaults  *Vaults
	// contains filtered or unexported fields
}

Client represents the DVLS client used to communicate with the API.

func NewClient

func NewClient(appKey string, appSecret string, baseUri string) (Client, error)

NewClient returns a new Client configured with the specified credentials and base URI. baseUri should be the full URI to your DVLS instance (ex.: https://dvls.your-dvls-instance.com)

func (*Client) GetPrivateServerInfo added in v0.5.0

func (c *Client) GetPrivateServerInfo() (Server, error)

GetPrivateServerInfo returns Server that contains private information on the DVLS instance (need authentication).

func (*Client) GetPrivateServerInfoWithContext added in v0.15.0

func (c *Client) GetPrivateServerInfoWithContext(ctx context.Context) (Server, error)

GetPrivateServerInfoWithContext returns Server that contains private information on the DVLS instance (need authentication). The provided context can be used to cancel the request.

func (*Client) GetPublicServerInfo added in v0.5.0

func (c *Client) GetPublicServerInfo() (Server, error)

GetPublicServerInfo returns Server that contains public information on the DVLS instance.

func (*Client) GetPublicServerInfoWithContext added in v0.15.0

func (c *Client) GetPublicServerInfoWithContext(ctx context.Context) (Server, error)

GetPublicServerInfoWithContext returns Server that contains public information on the DVLS instance. The provided context can be used to cancel the request.

func (*Client) GetServerTimezones

func (c *Client) GetServerTimezones() ([]Timezone, error)

GetServerTimezones returns an array of Timezone that contains all of the available timezones on the DVLS instance.

func (*Client) GetServerTimezonesWithContext added in v0.15.0

func (c *Client) GetServerTimezonesWithContext(ctx context.Context) ([]Timezone, error)

GetServerTimezonesWithContext returns an array of Timezone that contains all of the available timezones on the DVLS instance. The provided context can be used to cancel the request.

func (*Client) Request

func (c *Client) Request(url string, reqMethod string, reqBody io.Reader, options ...RequestOptions) (Response, error)

Request returns a Response that contains the HTTP response body in bytes, the result code and result message. For context support, use RequestWithContext instead.

func (*Client) RequestWithContext added in v0.15.0

func (c *Client) RequestWithContext(ctx context.Context, url string, reqMethod string, reqBody io.Reader, options ...RequestOptions) (Response, error)

RequestWithContext returns a Response that contains the HTTP response body in bytes, the result code and result message. The provided context can be used to cancel the request.

type Entries added in v0.7.0

type Entries struct {
	Certificate *EntryCertificateService
	Host        *EntryHostService
	Credential  *EntryCredentialService
	Website     *EntryWebsiteService
}

type Entry

type Entry struct {
	Id          string   `json:"id,omitempty"`
	VaultId     string   `json:"vaultId,omitempty"`
	Name        string   `json:"name"`
	Path        string   `json:"path"`
	Type        string   `json:"type"`
	SubType     string   `json:"subType"`
	Description string   `json:"description"`
	Tags        []string `json:"tags,omitempty"`

	Data EntryData `json:"data,omitempty"`

	CreatedBy  string      `json:"createdBy,omitempty"`
	CreatedOn  *ServerTime `json:"createdOn,omitempty"`
	ModifiedBy string      `json:"modifiedBy,omitempty"`
	ModifiedOn *ServerTime `json:"modifiedOn,omitempty"`
}

func (*Entry) GetCredentialAccessCodeData added in v0.12.0

func (e *Entry) GetCredentialAccessCodeData() (*EntryCredentialAccessCodeData, bool)

func (*Entry) GetCredentialApiKeyData added in v0.12.0

func (e *Entry) GetCredentialApiKeyData() (*EntryCredentialApiKeyData, bool)

func (*Entry) GetCredentialAzureServicePrincipalData added in v0.12.0

func (e *Entry) GetCredentialAzureServicePrincipalData() (*EntryCredentialAzureServicePrincipalData, bool)

func (*Entry) GetCredentialConnectionStringData added in v0.12.0

func (e *Entry) GetCredentialConnectionStringData() (*EntryCredentialConnectionStringData, bool)

func (*Entry) GetCredentialDefaultData added in v0.12.0

func (e *Entry) GetCredentialDefaultData() (*EntryCredentialDefaultData, bool)

func (*Entry) GetCredentialPrivateKeyData added in v0.12.2

func (e *Entry) GetCredentialPrivateKeyData() (*EntryCredentialPrivateKeyData, bool)

func (*Entry) GetSubType added in v0.12.0

func (e *Entry) GetSubType() string

func (*Entry) GetType added in v0.12.0

func (e *Entry) GetType() string

func (Entry) MarshalJSON

func (e Entry) MarshalJSON() ([]byte, error)

func (*Entry) SetCredentialSecret added in v0.14.0

func (e *Entry) SetCredentialSecret(secret string) error

SetCredentialSecret mutates the Entry data to update the secret value for supported subtypes. It preserves existing fields and only updates the password/secret field.

func (*Entry) ToCredentialMap added in v0.14.0

func (e *Entry) ToCredentialMap() (map[string]string, error)

ToCredentialMap flattens a credential entry into a map of fields keyed by a stable name. It always includes "entry-id" and "entry-name" and then subtype-specific keys.

func (*Entry) UnmarshalJSON

func (e *Entry) UnmarshalJSON(data []byte) error

type EntryAttachment added in v0.7.0

type EntryAttachment struct {
	Id            string `json:"id,omitempty"`
	IdString      string `json:"idString"`
	EntryId       string `json:"connectionID"`
	EntryIdString string `json:"connectionIDString"`
	Description   string `json:"description"`
	FileName      string `json:"filename"`
	IsPrivate     bool   `json:"isPrivate"`
	Size          int    `json:"size"`
	Title         string `json:"title"`
}

func (*EntryAttachment) UnmarshalJSON added in v0.7.0

func (e *EntryAttachment) UnmarshalJSON(d []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type EntryCertificate added in v0.7.0

type EntryCertificate struct {
	Id                    string
	VaultId               string
	Name                  string
	Description           string
	EntryFolderPath       string
	Tags                  []string
	Expiration            time.Time
	Password              string
	UseDefaultCredentials bool

	// Can either be a URL or a file name.
	CertificateIdentifier string
	// contains filtered or unexported fields
}

EntryCertificate represents a certificate entry.

func (EntryCertificate) GetDataMode added in v0.8.0

GetDataMode returns the data mode of the EntryCertificate. Can be either EntryCertificateDataModeURL or EntryCertificateDataModeFile.

func (EntryCertificate) MarshalJSON added in v0.7.0

func (e EntryCertificate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*EntryCertificate) UnmarshalJSON added in v0.7.0

func (e *EntryCertificate) UnmarshalJSON(d []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type EntryCertificateDataMode added in v0.8.0

type EntryCertificateDataMode int
const (
	EntryCertificateDataModeURL  EntryCertificateDataMode = 3
	EntryCertificateDataModeFile EntryCertificateDataMode = 2
)

type EntryCertificateService added in v0.7.0

type EntryCertificateService service

func (*EntryCertificateService) Delete added in v0.7.0

func (c *EntryCertificateService) Delete(entryId string) error

Delete deletes an EntryCertificate based on entryId.

func (*EntryCertificateService) DeleteWithContext added in v0.15.0

func (c *EntryCertificateService) DeleteWithContext(ctx context.Context, entryId string) error

DeleteWithContext deletes an EntryCertificate based on entryId. The provided context can be used to cancel the request.

func (*EntryCertificateService) Get added in v0.7.0

Get returns a single Certificate specified by entryId.

func (*EntryCertificateService) GetFileContent added in v0.7.0

func (c *EntryCertificateService) GetFileContent(entryId string) ([]byte, error)

GetFileContent returns the content of the file specified by entryId.

func (*EntryCertificateService) GetFileContentWithContext added in v0.15.0

func (c *EntryCertificateService) GetFileContentWithContext(ctx context.Context, entryId string) ([]byte, error)

GetFileContentWithContext returns the content of the file specified by entryId. The provided context can be used to cancel the request.

func (*EntryCertificateService) GetPassword added in v0.7.0

GetPassword returns the password of the entry specified by entry.

func (*EntryCertificateService) GetPasswordWithContext added in v0.15.0

func (c *EntryCertificateService) GetPasswordWithContext(ctx context.Context, entry EntryCertificate) (EntryCertificate, error)

GetPasswordWithContext returns the password of the entry specified by entry. The provided context can be used to cancel the request.

func (*EntryCertificateService) GetWithContext added in v0.15.0

func (c *EntryCertificateService) GetWithContext(ctx context.Context, entryId string) (EntryCertificate, error)

GetWithContext returns a single Certificate specified by entryId. The provided context can be used to cancel the request.

func (*EntryCertificateService) NewFile added in v0.7.0

func (c *EntryCertificateService) NewFile(entry EntryCertificate, content []byte) (EntryCertificate, error)

NewFile creates a new EntryCertificate based on entry. Will upload the file content to the DVLS server.

func (*EntryCertificateService) NewFileWithContext added in v0.15.0

func (c *EntryCertificateService) NewFileWithContext(ctx context.Context, entry EntryCertificate, content []byte) (EntryCertificate, error)

NewFileWithContext creates a new EntryCertificate based on entry. Will upload the file content to the DVLS server. The provided context can be used to cancel the request.

func (*EntryCertificateService) NewURL added in v0.7.0

NewURL creates a new EntryCertificate based on entry. Will use the url as the file content.

func (*EntryCertificateService) NewURLWithContext added in v0.15.0

func (c *EntryCertificateService) NewURLWithContext(ctx context.Context, entry EntryCertificate) (EntryCertificate, error)

NewURLWithContext creates a new EntryCertificate based on entry. Will use the url as the file content. The provided context can be used to cancel the request.

func (*EntryCertificateService) Update added in v0.7.0

Update updates an EntryCertificate based on entry. Will replace all other fields whether included or not.

func (*EntryCertificateService) UpdateWithContext added in v0.15.0

func (c *EntryCertificateService) UpdateWithContext(ctx context.Context, entry EntryCertificate) (EntryCertificate, error)

UpdateWithContext updates an EntryCertificate based on entry. Will replace all other fields whether included or not. The provided context can be used to cancel the request.

type EntryCredentialAccessCodeData added in v0.12.0

type EntryCredentialAccessCodeData struct {
	Password string `json:"password,omitempty"`
}

type EntryCredentialApiKeyData added in v0.12.0

type EntryCredentialApiKeyData struct {
	ApiId    string `json:"apiId,omitempty"`
	ApiKey   string `json:"apiKey,omitempty"`
	TenantId string `json:"tenantId,omitempty"`
}

type EntryCredentialAzureServicePrincipalData added in v0.12.0

type EntryCredentialAzureServicePrincipalData struct {
	ClientId     string `json:"clientId,omitempty"`
	ClientSecret string `json:"clientSecret,omitempty"`
	TenantId     string `json:"tenantId,omitempty"`
}

type EntryCredentialConnectionStringData added in v0.12.0

type EntryCredentialConnectionStringData struct {
	ConnectionString string `json:"connectionString,omitempty"`
}

type EntryCredentialDefaultData added in v0.12.0

type EntryCredentialDefaultData struct {
	Domain   string `json:"domain,omitempty"`
	Password string `json:"password,omitempty"`
	Username string `json:"username,omitempty"`
}

type EntryCredentialPrivateKeyData added in v0.12.0

type EntryCredentialPrivateKeyData struct {
	Username   string `json:"privateKeyOverrideUsername,omitempty"`
	Password   string `json:"privateKeyOverridePassword,omitempty"`
	PrivateKey string `json:"privateKeyData,omitempty"`
	PublicKey  string `json:"publicKeyData,omitempty"`
	Passphrase string `json:"privateKeyPassPhrase,omitempty"`
}

type EntryCredentialService added in v0.12.0

type EntryCredentialService service

func (*EntryCredentialService) Delete added in v0.12.0

func (c *EntryCredentialService) Delete(e Entry) error

Delete deletes an entry based on the entry's VaultId and Id.

func (*EntryCredentialService) DeleteById added in v0.12.1

func (c *EntryCredentialService) DeleteById(vaultId string, entryId string) error

DeleteById deletes an entry based on vault Id and entry Id.

func (*EntryCredentialService) DeleteByIdWithContext added in v0.15.0

func (c *EntryCredentialService) DeleteByIdWithContext(ctx context.Context, vaultId string, entryId string) error

DeleteByIdWithContext deletes an entry based on vault Id and entry Id. The provided context can be used to cancel the request.

func (*EntryCredentialService) DeleteWithContext added in v0.15.0

func (c *EntryCredentialService) DeleteWithContext(ctx context.Context, e Entry) error

DeleteWithContext deletes an entry based on the entry's VaultId and Id. The provided context can be used to cancel the request.

func (*EntryCredentialService) Get added in v0.12.0

func (c *EntryCredentialService) Get(entry Entry) (Entry, error)

Get returns a single EntryCredential based on the entry's VaultId and Id.

func (*EntryCredentialService) GetById added in v0.12.0

func (c *EntryCredentialService) GetById(vaultId string, entryId string) (Entry, error)

GetById returns a single EntryCredential based on vault Id and entry Id.

func (*EntryCredentialService) GetByIdWithContext added in v0.15.0

func (c *EntryCredentialService) GetByIdWithContext(ctx context.Context, vaultId string, entryId string) (Entry, error)

GetByIdWithContext returns a single EntryCredential based on vault Id and entry Id. The provided context can be used to cancel the request.

func (*EntryCredentialService) GetWithContext added in v0.15.0

func (c *EntryCredentialService) GetWithContext(ctx context.Context, entry Entry) (Entry, error)

GetWithContext returns a single EntryCredential based on the entry's VaultId and Id. The provided context can be used to cancel the request.

func (*EntryCredentialService) New added in v0.12.0

func (c *EntryCredentialService) New(entry Entry) (string, error)

New creates a new EntryCredential and returns the new entry's Id.

func (*EntryCredentialService) NewWithContext added in v0.15.0

func (c *EntryCredentialService) NewWithContext(ctx context.Context, entry Entry) (string, error)

NewWithContext creates a new EntryCredential and returns the new entry's Id. The provided context can be used to cancel the request.

func (*EntryCredentialService) Update added in v0.12.0

func (c *EntryCredentialService) Update(entry Entry) (Entry, error)

Update updates an EntryCredential and returns the updated entry.

func (*EntryCredentialService) UpdateWithContext added in v0.15.0

func (c *EntryCredentialService) UpdateWithContext(ctx context.Context, entry Entry) (Entry, error)

UpdateWithContext updates an EntryCredential and returns the updated entry. The provided context can be used to cancel the request.

type EntryData added in v0.12.0

type EntryData any

type EntryHost added in v0.10.0

type EntryHost struct {
	Id                string                  `json:"id,omitempty"`
	VaultId           string                  `json:"repositoryId"`
	EntryName         string                  `json:"name"`
	Description       string                  `json:"description"`
	EntryFolderPath   string                  `json:"group"`
	ModifiedDate      *ServerTime             `json:"modifiedDate,omitempty"`
	ConnectionType    ServerConnectionType    `json:"connectionType"`
	ConnectionSubType ServerConnectionSubType `json:"connectionSubType"`
	Tags              []string                `json:"keywords,omitempty"`

	HostDetails EntryHostAuthDetails `json:"data"`
}

EntryHost represents a host entry in DVLS

func (EntryHost) MarshalJSON added in v0.10.0

func (e EntryHost) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*EntryHost) UnmarshalJSON added in v0.10.0

func (e *EntryHost) UnmarshalJSON(d []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type EntryHostAuthDetails added in v0.10.0

type EntryHostAuthDetails struct {
	Username string
	Password *string
	Host     string
}

EntryHostAuthDetails represents host-specific fields

func (EntryHostAuthDetails) MarshalJSON added in v0.10.0

func (s EntryHostAuthDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

type EntryHostService added in v0.10.0

type EntryHostService service

func (*EntryHostService) Get added in v0.10.0

func (s *EntryHostService) Get(entryId string) (EntryHost, error)

Get returns a single Entry specified by entryId. Call GetHostDetails with the returned Entry to fetch the password.

func (*EntryHostService) GetHostDetails added in v0.10.0

func (c *EntryHostService) GetHostDetails(entry EntryHost) (EntryHost, error)

GetHostDetails returns entry with the entry.HostDetails.Password field.

func (*EntryHostService) GetHostDetailsWithContext added in v0.15.0

func (c *EntryHostService) GetHostDetailsWithContext(ctx context.Context, entry EntryHost) (EntryHost, error)

GetHostDetailsWithContext returns entry with the entry.HostDetails.Password field. The provided context can be used to cancel the request.

func (*EntryHostService) GetWithContext added in v0.15.0

func (s *EntryHostService) GetWithContext(ctx context.Context, entryId string) (EntryHost, error)

GetWithContext returns a single Entry specified by entryId. Call GetHostDetailsWithContext with the returned Entry to fetch the password. The provided context can be used to cancel the request.

type EntryWebsite added in v0.9.0

type EntryWebsite struct {
	Id                string                  `json:"id,omitempty"`
	VaultId           string                  `json:"repositoryId"`
	EntryName         string                  `json:"name"`
	Description       string                  `json:"description"`
	EntryFolderPath   string                  `json:"group"`
	ModifiedDate      *ServerTime             `json:"modifiedDate,omitempty"`
	ConnectionType    ServerConnectionType    `json:"connectionType"`
	ConnectionSubType ServerConnectionSubType `json:"connectionSubType"`
	Tags              []string                `json:"keywords,omitempty"`

	WebsiteDetails EntryWebsiteAuthDetails `json:"data"`
}

EntryWebsite represents a website entry in DVLS

func (EntryWebsite) MarshalJSON added in v0.9.0

func (e EntryWebsite) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*EntryWebsite) UnmarshalJSON added in v0.9.0

func (e *EntryWebsite) UnmarshalJSON(d []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type EntryWebsiteAuthDetails added in v0.9.0

type EntryWebsiteAuthDetails struct {
	Username              string
	Password              *string
	URL                   string
	WebBrowserApplication int
}

EntryWebsiteAuthDetails represents website-specific fields

func (EntryWebsiteAuthDetails) MarshalJSON added in v0.9.0

func (s EntryWebsiteAuthDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

type EntryWebsiteService added in v0.9.0

type EntryWebsiteService service

func (*EntryWebsiteService) Get added in v0.9.0

func (s *EntryWebsiteService) Get(entryId string) (EntryWebsite, error)

Get returns a single Entry specified by entryId. Call GetWebsiteDetails with the returned Entry to fetch the password.

func (*EntryWebsiteService) GetWebsiteDetails added in v0.9.0

func (c *EntryWebsiteService) GetWebsiteDetails(entry EntryWebsite) (EntryWebsite, error)

GetWebsiteDetails returns entry with the entry.WebsiteDetails.Password field.

func (*EntryWebsiteService) GetWebsiteDetailsWithContext added in v0.15.0

func (c *EntryWebsiteService) GetWebsiteDetailsWithContext(ctx context.Context, entry EntryWebsite) (EntryWebsite, error)

GetWebsiteDetailsWithContext returns entry with the entry.WebsiteDetails.Password field. The provided context can be used to cancel the request.

func (*EntryWebsiteService) GetWithContext added in v0.15.0

func (s *EntryWebsiteService) GetWithContext(ctx context.Context, entryId string) (EntryWebsite, error)

GetWithContext returns a single Entry specified by entryId. Call GetWebsiteDetailsWithContext with the returned Entry to fetch the password. The provided context can be used to cancel the request.

type RequestError

type RequestError struct {
	Url        string
	StatusCode int
	Body       []byte
	Err        error
}

func (RequestError) Error

func (e RequestError) Error() string

type RequestOptions added in v0.7.0

type RequestOptions struct {
	ContentType string
	RawBody     bool
}

type Response

type Response struct {
	Response []byte `json:"-"`
	Result   uint8
	Message  string
}

Response represents an HTTP response from the DVLS API. Contains the response body in bytes, the result code and the result message.

func (Response) CheckRespSaveResult

func (r Response) CheckRespSaveResult() error

type SaveResult

type SaveResult uint8
const (
	SaveResultError SaveResult = iota
	SaveResultSuccess
	SaveResultAccessDenied
	SaveResultInvalidData
	SaveResultAlreadyExists
	SaveResultMaximumReached
	SaveResultNotFound
	SaveResultLicenseExpired
	SaveResultUnknown
	SaveResultTwoFactorTypeNotConfigured
	SaveResultWebApiRedirectToLogin
	SaveResultDuplicateLoginEmail
)

func (SaveResult) String

func (i SaveResult) String() string

type Server

type Server struct {
	AccessUri     string
	TimeZone      string
	ServerName    string `json:"servername"`
	Version       string
	SystemMessage string
}

Server represents the available server instance information.

func (*Server) UnmarshalJSON

func (s *Server) UnmarshalJSON(d []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type ServerConnectionSubType

type ServerConnectionSubType string
const (
	ServerConnectionSubTypeDefault          ServerConnectionSubType = "Default"
	ServerConnectionSubTypeCertificate      ServerConnectionSubType = "Certificate"
	ServerConnectionSubTypeMicrosoftEdge    ServerConnectionSubType = "Edge"
	ServerConnectionSubTypeFirefox          ServerConnectionSubType = "FireFox"
	ServerConnectionSubTypeGoogleChrome     ServerConnectionSubType = "GoogleChrome"
	ServerConnectionSubTypeInternetExplorer ServerConnectionSubType = "IE"
	ServerConnectionSubTypeOpera            ServerConnectionSubType = "Opera"
	ServerConnectionSubTypeAppleSafari      ServerConnectionSubType = "Safari"
)

type ServerConnectionType

type ServerConnectionType uint8
const (
	ServerConnectionUndefined ServerConnectionType = iota
	ServerConnectionRDPConfigured
	ServerConnectionRDPFilename
	ServerConnectionCommandLine
	ServerConnectionVNC
	ServerConnectionWebBrowser
	ServerConnectionLogMeIn
	ServerConnectionTeamViewer
	ServerConnectionPutty
	ServerConnectionFtp
	ServerConnectionVirtualPC
	ServerConnectionRadmin
	ServerConnectionDameware
	ServerConnectionVMWare
	ServerConnectionPCAnywhere
	ServerConnectionICA
	ServerConnectionXWindow
	ServerConnectionHyperV
	ServerConnectionAddOn
	ServerConnectionRemoteAssistance
	ServerConnectionVPN
	ServerConnectionVirtualBox
	ServerConnectionVMRC
	ServerConnectionXenServer
	ServerConnectionWindowsVirtualPC
	ServerConnectionGroup
	ServerConnectionCredential
	ServerConnectionHpRgs
	ServerConnectionDesktone
	ServerConnectionApplicationTool
	ServerConnectionSessionTool
	ServerConnectionContact
	ServerConnectionDataEntry
	ServerConnectionDataReport
	ServerConnectionAgent
	ServerConnectionComputer
	ServerConnectionDropBox
	ServerConnectionS3
	ServerConnectionAzureStorage
	ServerConnectionCitrixWeb
	ServerConnectionPowerShell
	ServerConnectionHostSessionTool
	ServerConnectionShortcut
	ServerConnectionIntelAMT
	ServerConnectionAzure
	ServerConnectionDocument
	ServerConnectionVMWareConsole
	ServerConnectionInventoryReport
	ServerConnectionSkyDrive
	ServerConnectionScreenConnect
	ServerConnectionAzureTableStorage
	ServerConnectionAzureQueueStorage
	ServerConnectionTemplateGroup
	ServerConnectionHost
	ServerConnectionDatabase
	ServerConnectionCustomer
	ServerConnectionADConsole
	ServerConnectionAws
	ServerConnectionSNMPReport
	ServerConnectionSync
	ServerConnectionGateway
	ServerConnectionPlayList
	ServerConnectionTerminalConsole
	ServerConnectionPSExec
	ServerConnectionAppleRemoteDesktop
	ServerConnectionSpiceworks
	ServerConnectionDeskRoll
	ServerConnectionSecureCRT
	ServerConnectionIterm
	ServerConnectionSheet
	ServerConnectionSplunk
	ServerConnectionPortForward
	ServerConnectionTeamViewerConsole
	ServerConnectionScreenHero
	ServerConnectionTelnet
	ServerConnectionSerial
	ServerConnectionSSHTunnel
	ServerConnectionSSHShell
	ServerConnectionResetPassword
	ServerConnectionWayk
	ServerConnectionControlUp
	ServerConnectionDataSource
	ServerConnectionChromeRemoteDesktop
	ServerConnectionRDCommander
	ServerConnectionIDrac
	ServerConnectionIlo
	ServerConnectionWebDav
	ServerConnectionBeyondTrustPasswordSafeConsole
	ServerConnectionDevolutionsProxy
	ServerConnectionFtpNative
	ServerConnectionPowerShellRemoteConsole
	ServerConnectionProxyTunnel
	ServerConnectionRoot
	ServerConnectionBeyondTrustPasswordSafe
	ServerConnectionFileExplorer
	ServerConnectionScp
	ServerConnectionSftp
	ServerConnectionAzureBlobStorage
	ServerConnectionTFtp
	ServerConnectionGoToAssist
	ServerConnectionIPTable
	ServerConnectionHub
	ServerConnectionGoogleDrive
	ServerConnectionGoogleCloud
	ServerConnectionNoVNC
	ServerConnectionSplashtop
	ServerConnectionJumpDesktop
	ServerConnectionBoxNet
	ServerConnectionMSPAnywhere
	ServerConnectionRepository
	ServerConnectionCyberArkPSM
	ServerConnectionCloudBerryRemoteAssistant
	ServerConnectionITGlue
	ServerConnectionSmartFolder
	ServerConnectionCyberArkJump
	ServerConnectionWindowsAdminCenter
	ServerConnectionDevolutionsGateway
	ServerConnectionWaykDenConsole
	ServerConnectionRDGatewayConsole
	ServerConnectionCyberArkDashboard
	ServerConnectionDVLSPamDashboard
	ServerConnectionSMB
	ServerConnectionAppleRemoteManagement
	ServerConnectionRustDesk
	ServerConnectionPAM
	ServerConnectionITManager
	ServerConnectionCustomImage
)

func (ServerConnectionType) String

func (i ServerConnectionType) String() string

type ServerLoginResult

type ServerLoginResult uint8
const (
	ServerLoginError ServerLoginResult = iota
	ServerLoginSuccess
	ServerLoginInvalidUserNamePassword
	ServerLoginInvalidDataSource
	ServerLoginDisabledDataSource
	ServerLoginInvalidSubscription
	ServerLoginTooManyUserForTheLicense
	ServerLoginExpiredSubscription
	ServerLoginInGracePeriod
	ServerLoginDisabledUser
	ServerLoginUserNotFound
	ServerLoginLockedUser
	ServerLoginNotApprovedUser
	ServerLoginBlackListed
	ServerLoginInvalidIP
	ServerLoginUnableToCreateUser
	ServerLoginTwoFactorTypeNotConfigured
	ServerLoginTwoFactorTypeActivatedNotAllowedClientSide
	ServerLoginDomainNotTrusted
	ServerLoginUserDoesNotBelongToDefaultDomain
	ServerLoginInvalidGeoIP
	ServerLoginTwoFactorIsRequired
	ServerLoginTwoFactorPreconfigured
	ServerLoginTwoFactorSecondStepIsRequired
	ServerLoginTwoFactorUserIsDenied
	ServerLoginTwoFactorSmsSended
	ServerLoginTwoFactorTimeout
	ServerLoginTwoFactorUserLockedOut
	ServerLoginTwoFactorUserFraud
	ServerLoginTwoFactorUserEmailNotConfigured
	ServerLoginTwoFactorUserSmsNotConfigured
	ServerLoginNotInTrustedGroup
	ServerLoginServerNotResponding
	ServerLoginNotAccessToApplication
	ServerLoginDirectoryNotResponding
	ServerLoginWindowsAuthenticationFailure
	ServerLoginForcePasswordChange
	ServerLoginTwoFactorInvalid
	ServerLoginOutsideValidUsageTimePeriod
)

func (ServerLoginResult) String

func (i ServerLoginResult) String() string

type ServerTime

type ServerTime struct {
	time.Time
}

ServerTime represents a time.Time that parses the correct server time layout.

func (*ServerTime) UnmarshalJSON

func (z *ServerTime) UnmarshalJSON(d []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type Timezone

type Timezone struct {
	Id                         string
	DisplayName                string
	StandardName               string
	DaylightName               string
	BaseUtcOffset              string
	AdjustmentRules            []TimezoneAdjustmentRule
	SupportsDaylightSavingTime bool
}

Timezone represents a Server timezone.

type TimezoneAdjustmentRule

type TimezoneAdjustmentRule struct {
	DateStart               ServerTime
	DateEnd                 ServerTime
	DaylightDelta           string
	DaylightTransitionStart TimezoneAdjustmentRuleTransitionTime
	DaylightTransitionEnd   TimezoneAdjustmentRuleTransitionTime
	BaseUtcOffsetDelta      string
	NoDaylightTransitions   bool
}

TimezoneAdjustmentRule represents a Timezone Adjustment Rule.

type TimezoneAdjustmentRuleTransitionTime

type TimezoneAdjustmentRuleTransitionTime struct {
	TimeOfDay       ServerTime
	Month           int
	Week            int
	Day             int
	DayOfWeek       int
	IsFixedDateRule bool
}

TimezoneAdjustmentRuleTransitionTime represents a Timezone Adjustment Rule Transition Time.

type UserAuthenticationType

type UserAuthenticationType uint8
const (
	UserAuthenticationBuiltin UserAuthenticationType = iota
	UserAuthenticationLocalWindows
	UserAuthenticationSqlServer
	UserAuthenticationDomain
	UserAuthenticationOffice365
	UserAuthenticationNone
	UserAuthenticationCloud
	UserAuthenticationLegacy
	UserAuthenticationAzureAD
	UserAuthenticationApplication
	UserAuthenticationOkta
)

func (UserAuthenticationType) String

func (i UserAuthenticationType) String() string

type Vault

type Vault struct {
	Id            string
	Name          string
	Description   string
	SecurityLevel VaultSecurityLevel
	Visibility    VaultVisibility
	CreationDate  *ServerTime
	ModifiedDate  *ServerTime
	// contains filtered or unexported fields
}

Vault represents a DVLS vault. Contains relevant vault information.

func (Vault) MarshalJSON

func (v Vault) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Vault) UnmarshalJSON

func (v *Vault) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type VaultOptions added in v0.6.0

type VaultOptions struct {
	Password *string
}

type VaultSecurityLevel added in v0.6.0

type VaultSecurityLevel int
const (
	VaultSecurityLevelStandard VaultSecurityLevel = 0
	VaultSecurityLevelHigh     VaultSecurityLevel = 1
)

type VaultVisibility added in v0.6.0

type VaultVisibility int
const (
	VaultVisibilityDefault VaultVisibility = 0
	VaultVisibilityPublic  VaultVisibility = 2
	VaultVisibilityPrivate VaultVisibility = 3
)

type Vaults added in v0.7.0

type Vaults service

func (*Vaults) Delete added in v0.7.0

func (c *Vaults) Delete(vaultId string) error

Delete deletes a Vault based on vaultId.

func (*Vaults) DeleteWithContext added in v0.15.0

func (c *Vaults) DeleteWithContext(ctx context.Context, vaultId string) error

DeleteWithContext deletes a Vault based on vaultId. The provided context can be used to cancel the request.

func (*Vaults) Get added in v0.7.0

func (c *Vaults) Get(vaultId string) (Vault, error)

Get returns a single Vault based on vaultId.

func (*Vaults) GetWithContext added in v0.15.0

func (c *Vaults) GetWithContext(ctx context.Context, vaultId string) (Vault, error)

GetWithContext returns a single Vault based on vaultId. The provided context can be used to cancel the request.

func (*Vaults) New added in v0.7.0

func (c *Vaults) New(vault Vault, options *VaultOptions) error

New creates a new Vault based on vault.

func (*Vaults) NewWithContext added in v0.15.0

func (c *Vaults) NewWithContext(ctx context.Context, vault Vault, options *VaultOptions) error

NewWithContext creates a new Vault based on vault. The provided context can be used to cancel the request.

func (*Vaults) Update added in v0.7.0

func (c *Vaults) Update(vault Vault, options *VaultOptions) error

Update updates a Vault based on vault.

func (*Vaults) UpdateWithContext added in v0.15.0

func (c *Vaults) UpdateWithContext(ctx context.Context, vault Vault, options *VaultOptions) error

UpdateWithContext updates a Vault based on vault. The provided context can be used to cancel the request.

func (*Vaults) ValidatePassword added in v0.7.0

func (c *Vaults) ValidatePassword(vaultId string, password string) (bool, error)

ValidatePassword validates a Vault password based on vaultId and password.

func (*Vaults) ValidatePasswordWithContext added in v0.15.0

func (c *Vaults) ValidatePasswordWithContext(ctx context.Context, vaultId string, password string) (bool, error)

ValidatePasswordWithContext validates a Vault password based on vaultId and password. The provided context can be used to cancel the request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL