Skip to content

refactor: improve domain layout#1871

Merged
kian99 merged 4 commits intocanonical:v3from
kian99:improve-domain-layout
Feb 18, 2026
Merged

refactor: improve domain layout#1871
kian99 merged 4 commits intocanonical:v3from
kian99:improve-domain-layout

Conversation

@kian99
Copy link
Contributor

@kian99 kian99 commented Feb 17, 2026

Description

In this PR we refactor where certain interfaces are defined. Currently we define several interfaces in internal/jimm/ that define what each of the domain packages exposes i.e. we have a GroupManager interface that defines the methods the group.groupManager struct exposes (notice that the struct itself is not exported). This works but ideally we'd define the interfaces where they are consumed instead in internal/jujuapi and internal/jimmhttp/rebac_admin.

This PR moves those interface definitions to internal/jujuapi and the rebac_admin package re-uses them. Functionally not much has changed, but possibly this provides more clarity when navigating the codebase.

}

// RoleManager provides a means to manage roles within JIMM.
type RoleManager interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice :)

@kian99 kian99 force-pushed the improve-domain-layout branch from 9de259e to 318a125 Compare February 17, 2026 12:01
@kian99 kian99 force-pushed the improve-domain-layout branch from 318a125 to afa2214 Compare February 17, 2026 12:23
@@ -0,0 +1,72 @@
// Copyright 2026 Canonical.
Copy link
Contributor

Choose a reason for hiding this comment

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

I still don't like this, but at least it's in one place.

Copy link
Contributor

@luci1900 luci1900 left a comment

Choose a reason for hiding this comment

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

Sure.

I felt we were overusing package privacy anyway.

@kian99 kian99 marked this pull request as ready for review February 18, 2026 11:01
@kian99 kian99 requested a review from a team as a code owner February 18, 2026 11:01
Copy link
Collaborator

@alesstimec alesstimec left a comment

Choose a reason for hiding this comment

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

LGTM, but without the copyright year changes

@kian99 kian99 merged commit 4d16176 into canonical:v3 Feb 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants