Documentation ¶
Index ¶
- func AddMember(ctx context.Context, input AddTeamMemberInput, actor *authz.Actor) error
- func ConfirmDeleteKey(ctx context.Context, teamSlug slug.Slug, deleteKey uuid.UUID, ...) error
- func Count(ctx context.Context) (int64, error)
- func Exists(ctx context.Context, slug slug.Slug) (bool, error)
- func ListAllSlugs(ctx context.Context) ([]slug.Slug, error)
- func NamespaceExists(ctx context.Context, teamSlug slug.Slug) bool
- func NewLoaderContext(ctx context.Context, dbConn *pgxpool.Pool, ...) context.Context
- func NewNamespaceWatcher(ctx context.Context, mgr *watcher.Manager) *watcher.Watcher[*corev1.Namespace]
- func RemoveMember(ctx context.Context, input RemoveTeamMemberInput, actor *authz.Actor) error
- func Search(ctx context.Context, q string) ([]*search.Result, error)
- func SetMemberRole(ctx context.Context, input SetTeamMemberRoleInput, actor *authz.Actor) error
- func UpdateExternalReferences(ctx context.Context, teamSlug slug.Slug, references *ExternalReferences) error
- func UserIsMember(ctx context.Context, teamSlug slug.Slug, userID uuid.UUID) (bool, error)
- func UserIsOwner(ctx context.Context, teamSlug slug.Slug, userID uuid.UUID) (bool, error)
- type AddTeamMemberInput
- type AddTeamMemberPayload
- type ConfirmTeamDeletionInput
- type ConfirmTeamDeletionPayload
- type CreateTeamInput
- type CreateTeamPayload
- type ErrNotFound
- type ExternalReferences
- type RemoveTeamMemberInput
- type RemoveTeamMemberPayload
- type RequestTeamDeletionInput
- type RequestTeamDeletionPayload
- type SetTeamMemberRoleInput
- type SetTeamMemberRolePayload
- type Team
- func Create(ctx context.Context, input *CreateTeamInput, actor *authz.Actor) (*Team, error)
- func Get(ctx context.Context, slug slug.Slug) (*Team, error)
- func GetByIdent(ctx context.Context, id ident.Ident) (*Team, error)
- func Update(ctx context.Context, input *UpdateTeamInput, actor *authz.Actor) (*Team, error)
- type TeamCDN
- type TeamConfirmDeleteKeyActivityLogEntry
- type TeamConnection
- type TeamCreateDeleteKeyActivityLogEntry
- type TeamCreatedActivityLogEntry
- type TeamDeleteKey
- type TeamEdge
- type TeamEntraIDGroup
- type TeamEnvironment
- func GetTeamEnvironment(ctx context.Context, teamSlug slug.Slug, envName string) (*TeamEnvironment, error)
- func GetTeamEnvironmentByIdent(ctx context.Context, id ident.Ident) (*TeamEnvironment, error)
- func ListTeamEnvironments(ctx context.Context, teamSlug slug.Slug) ([]*TeamEnvironment, error)
- func UpdateEnvironment(ctx context.Context, input *UpdateTeamEnvironmentInput, actor *authz.Actor) (*TeamEnvironment, error)
- type TeamEnvironmentUpdatedActivityLogEntry
- type TeamEnvironmentUpdatedActivityLogEntryData
- type TeamEnvironmentUpdatedActivityLogEntryDataUpdatedField
- type TeamExternalResources
- func (t *TeamExternalResources) CDN() *TeamCDN
- func (t *TeamExternalResources) EntraIDGroup() *TeamEntraIDGroup
- func (t *TeamExternalResources) GitHubTeam() *TeamGitHubTeam
- func (t *TeamExternalResources) GoogleArtifactRegistry() *TeamGoogleArtifactRegistry
- func (t *TeamExternalResources) GoogleGroup() *TeamGoogleGroup
- type TeamGitHubTeam
- type TeamGoogleArtifactRegistry
- type TeamGoogleGroup
- type TeamInventoryCounts
- type TeamMember
- type TeamMemberAddedActivityLogEntry
- type TeamMemberAddedActivityLogEntryData
- type TeamMemberConnection
- type TeamMemberEdge
- type TeamMemberOrder
- type TeamMemberOrderField
- type TeamMemberRemovedActivityLogEntry
- type TeamMemberRemovedActivityLogEntryData
- type TeamMemberRole
- type TeamMemberSetRoleActivityLogEntry
- type TeamMemberSetRoleActivityLogEntryData
- type TeamOrder
- type TeamOrderField
- type TeamUpdatedActivityLogEntry
- type TeamUpdatedActivityLogEntryData
- type TeamUpdatedActivityLogEntryDataUpdatedField
- type UpdateTeamEnvironmentInput
- type UpdateTeamEnvironmentPayload
- type UpdateTeamInput
- type UpdateTeamPayload
- type UserTeamOrder
- type UserTeamOrderField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfirmDeleteKey ¶
func NewLoaderContext ¶
func NewNamespaceWatcher ¶
func RemoveMember ¶
func SetMemberRole ¶
func UserIsMember ¶
Types ¶
type AddTeamMemberInput ¶
type AddTeamMemberPayload ¶
type AddTeamMemberPayload struct {
Member *TeamMember `json:"member"`
}
type ConfirmTeamDeletionPayload ¶
type ConfirmTeamDeletionPayload struct {
DeletionStarted bool `json:"deletionStarted"`
}
type CreateTeamInput ¶
type CreateTeamPayload ¶
type CreateTeamPayload struct {
Team *Team `json:"team"`
}
type ErrNotFound ¶
type ErrNotFound struct {
// contains filtered or unexported fields
}
func (*ErrNotFound) As ¶
func (e *ErrNotFound) As(v any) bool
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
func (ErrNotFound) GraphError ¶
func (e ErrNotFound) GraphError() string
func (*ErrNotFound) Is ¶
func (e *ErrNotFound) Is(v error) bool
type ExternalReferences ¶
type RemoveTeamMemberInput ¶
type RemoveTeamMemberPayload ¶
type RequestTeamDeletionPayload ¶
type RequestTeamDeletionPayload struct {
Key *TeamDeleteKey `json:"key"`
}
type SetTeamMemberRoleInput ¶
type SetTeamMemberRolePayload ¶
type SetTeamMemberRolePayload struct {
Member *TeamMember `json:"member"`
}
type Team ¶
type Team struct { Slug slug.Slug `json:"slug"` Purpose string `json:"purpose"` LastSuccessfulSync *time.Time `json:"lastSuccessfulSync"` SlackChannel string `json:"slackChannel"` EntraIDGroupID *string `json:"-"` GitHubTeamSlug *string `json:"-"` GoogleGroupEmail *string `json:"-"` GoogleArtifactRegistry *string `json:"-"` CdnBucket *string `json:"-"` DeleteKeyConfirmedAt *time.Time `json:"-"` }
func (Team) DeletionInProgress ¶
func (*Team) ExternalResources ¶
func (t *Team) ExternalResources() *TeamExternalResources
func (Team) IsSearchNode ¶
func (Team) IsSearchNode()
type TeamConfirmDeleteKeyActivityLogEntry ¶
type TeamConfirmDeleteKeyActivityLogEntry struct {
activitylog.GenericActivityLogEntry
}
type TeamConnection ¶
type TeamConnection = pagination.Connection[*Team]
func List ¶
func List(ctx context.Context, page *pagination.Pagination, orderBy *TeamOrder) (*TeamConnection, error)
func ListBySlugs ¶
func ListBySlugs(ctx context.Context, slugs []slug.Slug, page *pagination.Pagination) (*TeamConnection, error)
type TeamCreateDeleteKeyActivityLogEntry ¶
type TeamCreateDeleteKeyActivityLogEntry struct {
activitylog.GenericActivityLogEntry
}
type TeamCreatedActivityLogEntry ¶
type TeamCreatedActivityLogEntry struct {
activitylog.GenericActivityLogEntry
}
type TeamDeleteKey ¶
type TeamDeleteKey struct { KeyUUID uuid.UUID `json:"key"` CreatedAt time.Time `json:"createdAt"` ConfirmedAt *time.Time `json:"-"` CreatedByUserID uuid.UUID `json:"-"` TeamSlug slug.Slug `json:"-"` }
func CreateDeleteKey ¶
func GetDeleteKey ¶
func (*TeamDeleteKey) Expires ¶
func (t *TeamDeleteKey) Expires() time.Time
func (*TeamDeleteKey) HasExpired ¶
func (t *TeamDeleteKey) HasExpired() bool
func (TeamDeleteKey) Key ¶
func (t TeamDeleteKey) Key() string
type TeamEdge ¶
type TeamEdge = pagination.Edge[*Team]
type TeamEntraIDGroup ¶
type TeamEntraIDGroup struct {
GroupID string `json:"groupID"`
}
type TeamEnvironment ¶
type TeamEnvironment struct { Name string `json:"name"` GCPProjectID *string `json:"gcpProjectID"` SlackAlertsChannel string `json:"slackAlertsChannel"` TeamSlug slug.Slug `json:"-"` }
func GetTeamEnvironment ¶
func ListTeamEnvironments ¶
func UpdateEnvironment ¶
func UpdateEnvironment(ctx context.Context, input *UpdateTeamEnvironmentInput, actor *authz.Actor) (*TeamEnvironment, error)
func (TeamEnvironment) ID ¶
func (e TeamEnvironment) ID() ident.Ident
func (TeamEnvironment) IsNode ¶
func (TeamEnvironment) IsNode()
type TeamEnvironmentUpdatedActivityLogEntry ¶
type TeamEnvironmentUpdatedActivityLogEntry struct { activitylog.GenericActivityLogEntry Data *TeamEnvironmentUpdatedActivityLogEntryData `json:"data"` }
type TeamEnvironmentUpdatedActivityLogEntryData ¶
type TeamEnvironmentUpdatedActivityLogEntryData struct {
UpdatedFields []*TeamEnvironmentUpdatedActivityLogEntryDataUpdatedField `json:"updatedFields"`
}
type TeamExternalResources ¶
type TeamExternalResources struct {
// contains filtered or unexported fields
}
func (*TeamExternalResources) CDN ¶
func (t *TeamExternalResources) CDN() *TeamCDN
func (*TeamExternalResources) EntraIDGroup ¶
func (t *TeamExternalResources) EntraIDGroup() *TeamEntraIDGroup
func (*TeamExternalResources) GitHubTeam ¶
func (t *TeamExternalResources) GitHubTeam() *TeamGitHubTeam
func (*TeamExternalResources) GoogleArtifactRegistry ¶
func (t *TeamExternalResources) GoogleArtifactRegistry() *TeamGoogleArtifactRegistry
func (*TeamExternalResources) GoogleGroup ¶
func (t *TeamExternalResources) GoogleGroup() *TeamGoogleGroup
type TeamGitHubTeam ¶
type TeamGitHubTeam struct {
Slug string `json:"slug"`
}
type TeamGoogleArtifactRegistry ¶
type TeamGoogleArtifactRegistry struct {
Repository string `json:"repository"`
}
type TeamGoogleGroup ¶
type TeamGoogleGroup struct {
Email string `json:"email"`
}
type TeamInventoryCounts ¶
type TeamMember ¶
type TeamMember struct { Role TeamMemberRole TeamSlug slug.Slug `json:"-"` UserID uuid.UUID `json:"-"` }
func GetMemberByEmail ¶
type TeamMemberAddedActivityLogEntry ¶
type TeamMemberAddedActivityLogEntry struct { activitylog.GenericActivityLogEntry Data *TeamMemberAddedActivityLogEntryData `json:"data"` }
type TeamMemberAddedActivityLogEntryData ¶
type TeamMemberAddedActivityLogEntryData struct { Role TeamMemberRole `json:"role"` UserUUID uuid.UUID `json:"userID"` UserEmail string `json:"userEmail"` }
func (TeamMemberAddedActivityLogEntryData) UserID ¶
func (t TeamMemberAddedActivityLogEntryData) UserID() ident.Ident
type TeamMemberConnection ¶
type TeamMemberConnection = pagination.Connection[*TeamMember]
func ListForUser ¶
func ListForUser(ctx context.Context, userID uuid.UUID, page *pagination.Pagination, orderBy *UserTeamOrder) (*TeamMemberConnection, error)
func ListMembers ¶
func ListMembers(ctx context.Context, teamSlug slug.Slug, page *pagination.Pagination, orderBy *TeamMemberOrder) (*TeamMemberConnection, error)
type TeamMemberEdge ¶
type TeamMemberEdge = pagination.Edge[*TeamMember]
type TeamMemberOrder ¶
type TeamMemberOrder struct { Field TeamMemberOrderField `json:"field"` Direction model.OrderDirection `json:"direction"` }
func (*TeamMemberOrder) String ¶
func (o *TeamMemberOrder) String() string
type TeamMemberOrderField ¶
type TeamMemberOrderField string
const ( TeamMemberOrderFieldName TeamMemberOrderField = "NAME" TeamMemberOrderFieldEmail TeamMemberOrderField = "EMAIL" TeamMemberOrderFieldRole TeamMemberOrderField = "ROLE" )
func (TeamMemberOrderField) IsValid ¶
func (e TeamMemberOrderField) IsValid() bool
func (TeamMemberOrderField) MarshalGQL ¶
func (e TeamMemberOrderField) MarshalGQL(w io.Writer)
func (TeamMemberOrderField) String ¶
func (e TeamMemberOrderField) String() string
func (*TeamMemberOrderField) UnmarshalGQL ¶
func (e *TeamMemberOrderField) UnmarshalGQL(v interface{}) error
type TeamMemberRemovedActivityLogEntry ¶
type TeamMemberRemovedActivityLogEntry struct { activitylog.GenericActivityLogEntry Data *TeamMemberRemovedActivityLogEntryData `json:"data"` }
type TeamMemberRemovedActivityLogEntryData ¶
type TeamMemberRemovedActivityLogEntryData struct { UserUUID uuid.UUID `json:"userID"` UserEmail string `json:"userEmail"` }
func (TeamMemberRemovedActivityLogEntryData) UserID ¶
func (t TeamMemberRemovedActivityLogEntryData) UserID() ident.Ident
type TeamMemberRole ¶
type TeamMemberRole string
const ( TeamMemberRoleMember TeamMemberRole = "MEMBER" TeamMemberRoleOwner TeamMemberRole = "OWNER" )
func (TeamMemberRole) IsValid ¶
func (e TeamMemberRole) IsValid() bool
func (TeamMemberRole) MarshalGQL ¶
func (e TeamMemberRole) MarshalGQL(w io.Writer)
func (TeamMemberRole) String ¶
func (e TeamMemberRole) String() string
func (*TeamMemberRole) UnmarshalGQL ¶
func (e *TeamMemberRole) UnmarshalGQL(v interface{}) error
type TeamMemberSetRoleActivityLogEntry ¶
type TeamMemberSetRoleActivityLogEntry struct { activitylog.GenericActivityLogEntry Data *TeamMemberSetRoleActivityLogEntryData `json:"data"` }
type TeamMemberSetRoleActivityLogEntryData ¶
type TeamMemberSetRoleActivityLogEntryData struct { Role TeamMemberRole `json:"role"` UserUUID uuid.UUID `json:"userID"` UserEmail string `json:"userEmail"` }
func (TeamMemberSetRoleActivityLogEntryData) UserID ¶
func (t TeamMemberSetRoleActivityLogEntryData) UserID() ident.Ident
type TeamOrder ¶
type TeamOrder struct { Field TeamOrderField `json:"field"` Direction model.OrderDirection `json:"direction"` }
type TeamOrderField ¶
type TeamOrderField string
const (
TeamOrderFieldSlug TeamOrderField = "SLUG"
)
func (TeamOrderField) IsValid ¶
func (e TeamOrderField) IsValid() bool
func (TeamOrderField) MarshalGQL ¶
func (e TeamOrderField) MarshalGQL(w io.Writer)
func (TeamOrderField) String ¶
func (e TeamOrderField) String() string
func (*TeamOrderField) UnmarshalGQL ¶
func (e *TeamOrderField) UnmarshalGQL(v interface{}) error
type TeamUpdatedActivityLogEntry ¶
type TeamUpdatedActivityLogEntry struct { activitylog.GenericActivityLogEntry Data *TeamUpdatedActivityLogEntryData `json:"data"` }
type TeamUpdatedActivityLogEntryData ¶
type TeamUpdatedActivityLogEntryData struct {
UpdatedFields []*TeamUpdatedActivityLogEntryDataUpdatedField `json:"updatedFields"`
}
type UpdateTeamEnvironmentInput ¶
type UpdateTeamEnvironmentInput struct { Slug slug.Slug `json:"slug"` EnvironmentName string `json:"environmentName"` SlackAlertsChannel *string `json:"slackAlertsChannel"` GCPProjectID *string `json:"-"` }
func (*UpdateTeamEnvironmentInput) Validate ¶
func (i *UpdateTeamEnvironmentInput) Validate() error
type UpdateTeamEnvironmentPayload ¶
type UpdateTeamEnvironmentPayload struct {
Environment *TeamEnvironment `json:"environment"`
}
type UpdateTeamInput ¶
type UpdateTeamInput struct { Slug slug.Slug `json:"slug"` Purpose *string `json:"purpose" ` SlackChannel *string `json:"slackChannel"` }
func (*UpdateTeamInput) Validate ¶
func (i *UpdateTeamInput) Validate() error
type UpdateTeamPayload ¶
type UpdateTeamPayload struct {
Team *Team `json:"team"`
}
type UserTeamOrder ¶
type UserTeamOrder struct { Field UserTeamOrderField `json:"field"` Direction model.OrderDirection `json:"direction"` }
func (*UserTeamOrder) String ¶
func (o *UserTeamOrder) String() string
type UserTeamOrderField ¶
type UserTeamOrderField string
const (
UserTeamOrderFieldTeamSlug UserTeamOrderField = "TEAM_SLUG"
)
func (UserTeamOrderField) IsValid ¶
func (e UserTeamOrderField) IsValid() bool
func (UserTeamOrderField) MarshalGQL ¶
func (e UserTeamOrderField) MarshalGQL(w io.Writer)
func (UserTeamOrderField) String ¶
func (e UserTeamOrderField) String() string
func (*UserTeamOrderField) UnmarshalGQL ¶
func (e *UserTeamOrderField) UnmarshalGQL(v interface{}) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.