model

package
v0.0.0-...-96f7096 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllRepositoryAuthorization = []RepositoryAuthorization{
	RepositoryAuthorizationDeploy,
}

Functions

This section is empty.

Types

type CreateTeamInput

type CreateTeamInput struct {
	// Team slug. After creation, this value can not be changed.
	Slug *slug.Slug `json:"slug"`
	// Team purpose.
	Purpose string `json:"purpose"`
	// Specify the Slack channel for the team.
	SlackChannel string `json:"slackChannel"`
}

Input for creating a new team.

func (CreateTeamInput) Sanitize

func (input CreateTeamInput) Sanitize() CreateTeamInput

func (CreateTeamInput) Validate

func (input CreateTeamInput) Validate() error

type GcpProject

type GcpProject struct {
	// The environment for the project.
	Environment string `json:"environment"`
	// The display name of the project.
	ProjectName string `json:"projectName"`
	// The GCP project ID.
	ProjectID string `json:"projectId"`
}

GCP project type.

type NaisNamespace

type NaisNamespace struct {
	// The environment for the namespace.
	Environment string `json:"environment"`
	// The namespace.
	Namespace *slug.Slug `json:"namespace"`
}

NAIS namespace type.

type ReconcilerConfigInput

type ReconcilerConfigInput struct {
	// Configuration key.
	Key sqlc.ReconcilerConfigKey `json:"key"`
	// Configuration value.
	Value string `json:"value"`
}

Reconciler configuration input.

type ReconcilerState

type ReconcilerState struct {
	// The GitHub team slug.
	GitHubTeamSlug *slug.Slug `json:"gitHubTeamSlug,omitempty"`
	// The Google Workspace group email.
	GoogleWorkspaceGroupEmail *string `json:"googleWorkspaceGroupEmail,omitempty"`
	// The Azure AD group ID.
	AzureADGroupID *uuid.UUID `json:"azureADGroupId,omitempty"`
	// A list of GCP projects.
	GcpProjects []*GcpProject `json:"gcpProjects"`
	// A list of NAIS namespaces.
	NaisNamespaces []*NaisNamespace `json:"naisNamespaces"`
	// Timestamp of when the NAIS deploy key was provisioned.
	NaisDeployKeyProvisioned *time.Time `json:"naisDeployKeyProvisioned,omitempty"`
	// Name of the GAR repository for the team.
	GarRepositoryName *string `json:"garRepositoryName,omitempty"`
}

Reconciler state type.

type RepositoryAuthorization

type RepositoryAuthorization string

Repository authorizations.

const (
	// Authorize for NAIS deployment.
	RepositoryAuthorizationDeploy RepositoryAuthorization = "DEPLOY"
)

func (RepositoryAuthorization) IsValid

func (e RepositoryAuthorization) IsValid() bool

func (RepositoryAuthorization) MarshalGQL

func (e RepositoryAuthorization) MarshalGQL(w io.Writer)

func (RepositoryAuthorization) String

func (e RepositoryAuthorization) String() string

func (*RepositoryAuthorization) UnmarshalGQL

func (e *RepositoryAuthorization) UnmarshalGQL(v interface{}) error

type SlackAlertsChannel

type SlackAlertsChannel struct {
	// The environment for the alerts sent to the channel.
	Environment string `json:"environment"`
	// The name of the Slack channel.
	ChannelName string `json:"channelName"`
}

Slack alerts channel type.

type SlackAlertsChannelInput

type SlackAlertsChannelInput struct {
	// The environment for the alerts sent to the channel.
	Environment string `json:"environment"`
	// The name of the Slack channel.
	ChannelName *string `json:"channelName,omitempty"`
}

Slack alerts channel input.

type SyncError

type SyncError struct {
	// Creation time of the error.
	CreatedAt time.Time `json:"createdAt"`
	// The name of the reconciler.
	Reconciler sqlc.ReconcilerName `json:"reconciler"`
	// Error message.
	Error string `json:"error"`
}

Sync error type.

type TeamMember

type TeamMember struct {
	// Team instance.
	Team *db.Team `json:"team"`
	// User instance.
	User *db.User `json:"user"`
	// The role that the user has in the team.
	Role TeamRole `json:"role"`
	// Reconcilers for this member in this team.
	Reconcilers []*sqlc.GetTeamMemberOptOutsRow `json:"reconcilers"`
}

Team member.

type TeamMemberInput

type TeamMemberInput struct {
	// The ID of user.
	UserID *uuid.UUID `json:"userId"`
	// The role that the user will receive.
	Role TeamRole `json:"role"`
	// Reconcilers to opt the team member out of.
	ReconcilerOptOuts []sqlc.ReconcilerName `json:"reconcilerOptOuts,omitempty"`
}

Team member input.

type TeamRole

type TeamRole string

Available team roles.

const (
	// Regular member, read only access.
	TeamRoleMember TeamRole = "MEMBER"
	// Team owner, full access to the team.
	TeamRoleOwner TeamRole = "OWNER"
)

func (TeamRole) IsValid

func (e TeamRole) IsValid() bool

func (TeamRole) MarshalGQL

func (e TeamRole) MarshalGQL(w io.Writer)

func (TeamRole) String

func (e TeamRole) String() string

func (*TeamRole) UnmarshalGQL

func (e *TeamRole) UnmarshalGQL(v interface{}) error

type TeamSync

type TeamSync struct {
	// The correlation ID for the sync.
	CorrelationID *uuid.UUID `json:"correlationID"`
}

Team sync type.

type UpdateTeamInput

type UpdateTeamInput struct {
	// Specify team purpose to update the existing value.
	Purpose *string `json:"purpose,omitempty"`
	// Specify the Slack channel to update the existing value.
	SlackChannel *string `json:"slackChannel,omitempty"`
	// A list of Slack channels for NAIS alerts.
	SlackAlertsChannels []*SlackAlertsChannelInput `json:"slackAlertsChannels,omitempty"`
}

Input for updating an existing team.

func (UpdateTeamInput) Sanitize

func (input UpdateTeamInput) Sanitize() UpdateTeamInput

func (UpdateTeamInput) Validate

func (input UpdateTeamInput) Validate(validEnvironments []string) error

type UserSyncRunStatus

type UserSyncRunStatus string

User sync run status.

const (
	// User sync run in progress.
	UserSyncRunStatusInProgress UserSyncRunStatus = "IN_PROGRESS"
	// Successful user sync run.
	UserSyncRunStatusSuccess UserSyncRunStatus = "SUCCESS"
	// Failed user sync run.
	UserSyncRunStatusFailure UserSyncRunStatus = "FAILURE"
)

func (UserSyncRunStatus) IsValid

func (e UserSyncRunStatus) IsValid() bool

func (UserSyncRunStatus) MarshalGQL

func (e UserSyncRunStatus) MarshalGQL(w io.Writer)

func (UserSyncRunStatus) String

func (e UserSyncRunStatus) String() string

func (*UserSyncRunStatus) UnmarshalGQL

func (e *UserSyncRunStatus) UnmarshalGQL(v interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL