Skip to content

feat(entries)!: add folder entry type support#32

Merged
Raphaël Larivière (Sylfwood) merged 6 commits into
masterfrom
devops/DEVOPS-3818
Feb 18, 2026
Merged

feat(entries)!: add folder entry type support#32
Raphaël Larivière (Sylfwood) merged 6 commits into
masterfrom
devops/DEVOPS-3818

Conversation

@Sylfwood

@Sylfwood Raphaël Larivière (Sylfwood) commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

This PR adds comprehensive folder entry support and modernizes the codebase to use DVLS 2026.x public APIs.

New Features

  • Add EntryFolderService with full CRUD operations (New, Get, Update, Delete, GetEntries)
  • Support all 16 folder subtypes
  • Add EntryFolderData struct with domain/username
    fields
  • Add GetEntries method with name/path filtering for credentials and folders
  • Support nested folder hierarchies with path-based organization

API Changes (Breaking)

  • Migrate vault API from legacy endpoints to public API (/api/v1/vault)
  • Replace numeric enums with string-based enums matching API contract
  • Bump minimum DVLS version requirement to 2026.x
  • Upgrade Go version to 1.26

Test Improvements

  • Refactor credential tests to table-driven pattern (747 → 263 lines)
  • Add comprehensive folder tests (all subtypes, nested folders, filters)
  • Add dynamic vault creation helper with polling for test isolation
  • Add t.Cleanup() to prevent resource leaks in test failures
  • Add GetEntries filter tests for exact name matching

Code Quality

  • Standardize error messages to idiomatic Go style (: %w)
  • Optimize subtype validation with map lookups
  • Add pagination support in getEntries (fixes 25-entry limit bug)
  • Add custom ErrUnsupportedEntryType error with helper function

Compatibility

  • Version 0.16.0+ requires DVLS 2026.x
  • Version 0.15.0 supports DVLS 2024.x, 2025.x

…tering

- Add ErrUnsupportedEntryType custom error for unsupported entry types
- Add IsUnsupportedEntryType helper function
- Add private getEntries function with filtering options
- Add GetEntries/GetEntriesWithContext on EntryCredentialService
- Add Test_GetEntries integration test
- Convert CRUD tests to table-driven with testify assertions
- Add logging (t.Logf) for better test visibility
- Add exact name match test in GetEntries
- Standardize mock data with Go conventions (testuser, testpass, test-*)
- Reduce code from 747 to 263 lines
Add compatibility table for DVLS versions:
- 0.16.0+ requires DVLS 2026.x
- 0.15.0 supports DVLS 2024.x, 2025.x
- Use string-based enums matching API contract
- Add dynamic vault creation helper for tests
- Skip legacy tests when TEST_VAULT_ID not provided
@Sylfwood Raphaël Larivière (Sylfwood) changed the title feat(entries): add GetEntries method with name/path filter feat: add folder entries, migrate vaults to public API, and fix entry filtering Jan 27, 2026
@Sylfwood Raphaël Larivière (Sylfwood) marked this pull request as ready for review February 18, 2026 14:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the DVLS Go client by adding folder entry support, introducing generic entry listing with name/path filters, and migrating vault operations to public API endpoints, while refactoring tests and bumping the library version.

Changes:

  • Add EntryFolderService (CRUD + filtering) and register it on the client.
  • Add generic entry listing (Client.getEntries) and expose GetEntries helpers for credentials/folders.
  • Migrate vaults to /api/v1/vault with updated vault models, refactor tests to use testify, and bump to 0.16.0.

Reviewed changes

Copilot reviewed 19 out of 21 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
vaults.go Migrates vault operations to public API, updates vault model/enums, adds GetByName.
vaults_test.go Refactors vault tests to testify + adds new coverage for list/by-name/content-type equivalence.
helpers_test.go Adds shared helper to create/delete test vaults for table-driven CRUD tests.
entries.go Adds unsupported-entry typed error + implements Client.getEntries with name/path filters.
entry_credential.go Adds GetEntries wrapper for credential entries (filters + type filtering).
entry_folder.go Introduces EntryFolderService CRUD + GetEntries, folder subtypes, and folder data.
entry_credential_test.go Refactors credential tests into table-driven CRUD + adds GetEntries tests.
entry_folder_test.go Adds CRUD tests for all 16 folder subtypes + nested folder behavior tests.
authentication.go Registers Entries.Folder service on client initialization.
dvlstypes.go Removes legacy vault visibility/security enums (moved/replaced in vaults.go).
dvls_test.go Makes TEST_VAULT_ID optional for legacy tests; clarifies intent in comments.
entry_certificate_test.go Skips legacy certificate test when TEST_VAULT_ID is not set.
entry_host_test.go Skips legacy host test when TEST_VAULT_ID is not set.
entry_website_test.go Skips legacy website test when TEST_VAULT_ID is not set.
go.mod Adds testify dependency and updates Go version directive.
go.sum Adds module checksums for testify + indirect deps.
VERSION Bumps library version to 0.16.0.
README.md Adds DVLS compatibility table for versions.
.gitignore Ignores *.test artifacts.
.github/workflows/test.yml Updates actions versions and Go setup configuration.
.github/workflows/release.yml Updates actions/checkout version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread vaults_test.go
Comment thread helpers_test.go Outdated
Comment thread helpers_test.go
Comment thread entry_folder_test.go
Comment thread entry_credential_test.go
- Add EntryFolderService with full CRUD operations
- Support all 16 folder subtypes (Company, Credentials, Customer, etc.)
- Add EntryFolderData struct with domain/username fields
- Add tests for all subtypes and nested folder hierarchy
- Upgrade go version to 1.26
@Sylfwood Raphaël Larivière (Sylfwood) changed the title feat: add folder entries, migrate vaults to public API, and fix entry filtering feat(entries)!: add folder entry type support Feb 18, 2026
Comment thread entry_certificate_test.go Outdated
Comment thread entry_certificate_test.go Outdated
Comment thread vaults.go
- fix: add pagination support in getEntries and ListWithContext (was limited to 25 items)
- refactor: standardize error style to idiomatic Go (`: %w`)
- refactor: optimize subtype validation with O(1) map lookups
- test: improve test isolation with polling-based createTestVault
- test: add GetEntries filter tests for folders
- docs: document client-side filtering limitations
@Sylfwood Raphaël Larivière (Sylfwood) merged commit 94e8133 into master Feb 18, 2026
1 check passed
@Sylfwood Raphaël Larivière (Sylfwood) deleted the devops/DEVOPS-3818 branch February 18, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants