mirror of
https://github.com/passbolt/go-passbolt.git
synced 2025-09-13 14:29:09 +00:00
Add v5 Resource Metadata and Secret Structs, impl Handle Resource Get
for v5 Resources
This commit is contained in:
parent
2197d9e0f7
commit
d5f79a943f
3 changed files with 168 additions and 4 deletions
|
@ -41,6 +41,33 @@ type SecretDataTypePasswordDescriptionTOTP struct {
|
|||
TOTP SecretDataTOTP `json:"totp"`
|
||||
}
|
||||
|
||||
// SecretDataTypeV5Default
|
||||
type SecretDataTypeV5Default struct {
|
||||
ObjectType string `json:"object_type"`
|
||||
ResourceTypeID string `json:"resource_type_id,omitempty"`
|
||||
Password string `json:"password,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// SecretDataTypeV5DefaultWithTOTP
|
||||
type SecretDataTypeV5DefaultWithTOTP struct {
|
||||
ObjectType string `json:"object_type"`
|
||||
ResourceTypeID string `json:"resource_type_id,omitempty"`
|
||||
Password string `json:"password,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
TOTP SecretDataTOTP `json:"totp"`
|
||||
}
|
||||
|
||||
// SecretDataTypeV5PasswordString, is just the Password directly
|
||||
type SecretDataTypeV5PasswordString string
|
||||
|
||||
// SecretDataTypeV5TOTPStandalone
|
||||
type SecretDataTypeV5TOTPStandalone struct {
|
||||
ObjectType string `json:"object_type"`
|
||||
ResourceTypeID string `json:"resource_type_id,omitempty"`
|
||||
TOTP SecretDataTOTP `json:"totp"`
|
||||
}
|
||||
|
||||
// GetSecret gets a Passbolt Secret
|
||||
func (c *Client) GetSecret(ctx context.Context, resourceID string) (*Secret, error) {
|
||||
err := checkUUIDFormat(resourceID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue