Documentation
¶
Index ¶
- Constants
- func IsNotFound(err error) bool
- type Client
- func (c *Client) GetPrivateServerInfo() (Server, error)
- func (c *Client) GetPrivateServerInfoWithContext(ctx context.Context) (Server, error)
- func (c *Client) GetPublicServerInfo() (Server, error)
- func (c *Client) GetPublicServerInfoWithContext(ctx context.Context) (Server, error)
- func (c *Client) GetServerTimezones() ([]Timezone, error)
- func (c *Client) GetServerTimezonesWithContext(ctx context.Context) ([]Timezone, error)
- func (c *Client) Request(url string, reqMethod string, reqBody io.Reader, options ...RequestOptions) (Response, error)
- func (c *Client) RequestWithContext(ctx context.Context, url string, reqMethod string, reqBody io.Reader, ...) (Response, error)
- type Entries
- type Entry
- func (e *Entry) GetCredentialAccessCodeData() (*EntryCredentialAccessCodeData, bool)
- func (e *Entry) GetCredentialApiKeyData() (*EntryCredentialApiKeyData, bool)
- func (e *Entry) GetCredentialAzureServicePrincipalData() (*EntryCredentialAzureServicePrincipalData, bool)
- func (e *Entry) GetCredentialConnectionStringData() (*EntryCredentialConnectionStringData, bool)
- func (e *Entry) GetCredentialDefaultData() (*EntryCredentialDefaultData, bool)
- func (e *Entry) GetCredentialPrivateKeyData() (*EntryCredentialPrivateKeyData, bool)
- func (e *Entry) GetSubType() string
- func (e *Entry) GetType() string
- func (e Entry) MarshalJSON() ([]byte, error)
- func (e *Entry) SetCredentialSecret(secret string) error
- func (e *Entry) ToCredentialMap() (map[string]string, error)
- func (e *Entry) UnmarshalJSON(data []byte) error
- type EntryAttachment
- type EntryCertificate
- type EntryCertificateDataMode
- type EntryCertificateService
- func (c *EntryCertificateService) Delete(entryId string) error
- func (c *EntryCertificateService) DeleteWithContext(ctx context.Context, entryId string) error
- func (c *EntryCertificateService) Get(entryId string) (EntryCertificate, error)
- func (c *EntryCertificateService) GetFileContent(entryId string) ([]byte, error)
- func (c *EntryCertificateService) GetFileContentWithContext(ctx context.Context, entryId string) ([]byte, error)
- func (c *EntryCertificateService) GetPassword(entry EntryCertificate) (EntryCertificate, error)
- func (c *EntryCertificateService) GetPasswordWithContext(ctx context.Context, entry EntryCertificate) (EntryCertificate, error)
- func (c *EntryCertificateService) GetWithContext(ctx context.Context, entryId string) (EntryCertificate, error)
- func (c *EntryCertificateService) NewFile(entry EntryCertificate, content []byte) (EntryCertificate, error)
- func (c *EntryCertificateService) NewFileWithContext(ctx context.Context, entry EntryCertificate, content []byte) (EntryCertificate, error)
- func (c *EntryCertificateService) NewURL(entry EntryCertificate) (EntryCertificate, error)
- func (c *EntryCertificateService) NewURLWithContext(ctx context.Context, entry EntryCertificate) (EntryCertificate, error)
- func (c *EntryCertificateService) Update(entry EntryCertificate) (EntryCertificate, error)
- func (c *EntryCertificateService) UpdateWithContext(ctx context.Context, entry EntryCertificate) (EntryCertificate, error)
- type EntryCredentialAccessCodeData
- type EntryCredentialApiKeyData
- type EntryCredentialAzureServicePrincipalData
- type EntryCredentialConnectionStringData
- type EntryCredentialDefaultData
- type EntryCredentialPrivateKeyData
- type EntryCredentialService
- func (c *EntryCredentialService) Delete(e Entry) error
- func (c *EntryCredentialService) DeleteById(vaultId string, entryId string) error
- func (c *EntryCredentialService) DeleteByIdWithContext(ctx context.Context, vaultId string, entryId string) error
- func (c *EntryCredentialService) DeleteWithContext(ctx context.Context, e Entry) error
- func (c *EntryCredentialService) Get(entry Entry) (Entry, error)
- func (c *EntryCredentialService) GetById(vaultId string, entryId string) (Entry, error)
- func (c *EntryCredentialService) GetByIdWithContext(ctx context.Context, vaultId string, entryId string) (Entry, error)
- func (c *EntryCredentialService) GetWithContext(ctx context.Context, entry Entry) (Entry, error)
- func (c *EntryCredentialService) New(entry Entry) (string, error)
- func (c *EntryCredentialService) NewWithContext(ctx context.Context, entry Entry) (string, error)
- func (c *EntryCredentialService) Update(entry Entry) (Entry, error)
- func (c *EntryCredentialService) UpdateWithContext(ctx context.Context, entry Entry) (Entry, error)
- type EntryData
- type EntryHost
- type EntryHostAuthDetails
- type EntryHostService
- func (s *EntryHostService) Get(entryId string) (EntryHost, error)
- func (c *EntryHostService) GetHostDetails(entry EntryHost) (EntryHost, error)
- func (c *EntryHostService) GetHostDetailsWithContext(ctx context.Context, entry EntryHost) (EntryHost, error)
- func (s *EntryHostService) GetWithContext(ctx context.Context, entryId string) (EntryHost, error)
- type EntryWebsite
- type EntryWebsiteAuthDetails
- type EntryWebsiteService
- func (s *EntryWebsiteService) Get(entryId string) (EntryWebsite, error)
- func (c *EntryWebsiteService) GetWebsiteDetails(entry EntryWebsite) (EntryWebsite, error)
- func (c *EntryWebsiteService) GetWebsiteDetailsWithContext(ctx context.Context, entry EntryWebsite) (EntryWebsite, error)
- func (s *EntryWebsiteService) GetWithContext(ctx context.Context, entryId string) (EntryWebsite, error)
- type RequestError
- type RequestOptions
- type Response
- type SaveResult
- type Server
- type ServerConnectionSubType
- type ServerConnectionType
- type ServerLoginResult
- type ServerTime
- type Timezone
- type TimezoneAdjustmentRule
- type TimezoneAdjustmentRuleTransitionTime
- type UserAuthenticationType
- type Vault
- type VaultOptions
- type VaultSecurityLevel
- type VaultVisibility
- type Vaults
- func (c *Vaults) Delete(vaultId string) error
- func (c *Vaults) DeleteWithContext(ctx context.Context, vaultId string) error
- func (c *Vaults) Get(vaultId string) (Vault, error)
- func (c *Vaults) GetWithContext(ctx context.Context, vaultId string) (Vault, error)
- func (c *Vaults) New(vault Vault, options *VaultOptions) error
- func (c *Vaults) NewWithContext(ctx context.Context, vault Vault, options *VaultOptions) error
- func (c *Vaults) Update(vault Vault, options *VaultOptions) error
- func (c *Vaults) UpdateWithContext(ctx context.Context, vault Vault, options *VaultOptions) error
- func (c *Vaults) ValidatePassword(vaultId string, password string) (bool, error)
- func (c *Vaults) ValidatePasswordWithContext(ctx context.Context, vaultId string, password string) (bool, error)
Constants ¶
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
IsNotFound reports whether the error is a DVLS RequestError with an HTTP 404 status code.
Types ¶
type Client ¶
Client represents the DVLS client used to communicate with the API.
func NewClient ¶
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
GetPrivateServerInfo returns Server that contains private information on the DVLS instance (need authentication).
func (*Client) GetPrivateServerInfoWithContext ¶ added in v0.15.0
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
GetPublicServerInfo returns Server that contains public information on the DVLS instance.
func (*Client) GetPublicServerInfoWithContext ¶ added in v0.15.0
GetPublicServerInfoWithContext returns Server that contains public information on the DVLS instance. The provided context can be used to cancel the request.
func (*Client) GetServerTimezones ¶
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
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 (Entry) MarshalJSON ¶
func (*Entry) SetCredentialSecret ¶ added in v0.14.0
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
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 ¶
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
func (c EntryCertificate) GetDataMode() EntryCertificateDataMode
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
func (c *EntryCertificateService) Get(entryId string) (EntryCertificate, error)
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
func (c *EntryCertificateService) GetPassword(entry EntryCertificate) (EntryCertificate, error)
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
func (c *EntryCertificateService) NewURL(entry EntryCertificate) (EntryCertificate, error)
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
func (c *EntryCertificateService) Update(entry EntryCertificate) (EntryCertificate, error)
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 EntryCredentialAzureServicePrincipalData ¶ added in v0.12.0
type EntryCredentialConnectionStringData ¶ added in v0.12.0
type EntryCredentialConnectionStringData struct {
ConnectionString string `json:"connectionString,omitempty"`
}
type EntryCredentialDefaultData ¶ added in v0.12.0
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
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
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
UpdateWithContext updates an EntryCredential and returns the updated entry. The provided context can be used to cancel the request.
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
MarshalJSON implements the json.Marshaler interface.
func (*EntryHost) UnmarshalJSON ¶ added in v0.10.0
UnmarshalJSON implements the json.Unmarshaler interface.
type EntryHostAuthDetails ¶ added in v0.10.0
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
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 ¶
func (RequestError) Error ¶
func (e RequestError) Error() string
type RequestOptions ¶ added in v0.7.0
type Response ¶
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 ¶
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 ¶
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 ¶
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 ¶
MarshalJSON implements the json.Marshaler interface.
func (*Vault) UnmarshalJSON ¶
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) DeleteWithContext ¶ added in v0.15.0
DeleteWithContext deletes a Vault based on vaultId. The provided context can be used to cancel the request.
func (*Vaults) GetWithContext ¶ added in v0.15.0
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
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
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
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.