Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountState ¶
type AccountState struct {
AccountID string
Users []UserPermission
}
AccountState represents the full state of user permissions for a GTM account.
func FromConfig ¶
func FromConfig(cfg config.Config) AccountState
FromConfig converts a Config into an AccountState (the "desired" state).
func (AccountState) UserMap ¶
func (s AccountState) UserMap() map[string]UserPermission
UserMap returns a map of email -> UserPermission for quick lookups.
type ContainerPermission ¶
ContainerPermission represents a permission for a specific container.
type UserPermission ¶
type UserPermission struct {
Email string
AccountAccess string
ContainerAccess []ContainerPermission
}
UserPermission represents a normalized GTM user permission state.
func (UserPermission) ContainerMap ¶
func (u UserPermission) ContainerMap() map[string]string
ContainerMap returns a map of containerID -> permission for a user.
Click to show internal directories.
Click to hide internal directories.