Documentation
¶
Overview ¶
Package team is the domain layer for the Team entity — the outer tenancy scope that owns Projects. A Team has no member list: membership is expressed as a role binding at team scope, so there is exactly one place that grants access.
Authorization is app/authz's concern; this package validates shape only.
Index ¶
- type Spec
- type Store
- func (s *Store) Delete(ctx context.Context, id string) error
- func (s *Store) Directory() directory.Store[directory.Team]
- func (s *Store) Get(ctx context.Context, id string) (*Team, error)
- func (s *Store) List(ctx context.Context) ([]*Team, error)
- func (s *Store) Upsert(ctx context.Context, t *Team) error
- type Team
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Spec ¶
type Spec struct {
// Enabled defaults to true when nil.
Enabled *bool `` /* 147-byte string literal not displayed */
}
Spec carries the enabled flag. A team's spend cap is a Budget its bound policy links.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Directory ¶ added in v0.10.8
Directory is the auth module's store under this one, for writes that run through the directory.
type Team ¶
type Team struct {
Meta meta.Metadata `json:"metadata" yaml:"metadata"`
Spec Spec `json:"spec" yaml:"spec"`
}
Team is the outer tenancy scope. Owner is the user who created it (user kind) or system for seeded rows.
func FromDirectory ¶ added in v0.10.8
FromDirectory is a directory row as a Team. A team written as system-owned reads as the organization's.
func (*Team) ToDirectory ¶ added in v0.10.8
ToDirectory is t as the directory stores it.