grpcteamsql

package
v0.0.0-...-f8970bf Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type IsTeamRepositoryParams

type IsTeamRepositoryParams struct {
	TeamSlug         slug.Slug
	GithubRepository string
}

type ListEnvironmentsParams

type ListEnvironmentsParams struct {
	TeamSlug slug.Slug
	Offset   int32
	Limit    int32
}

type ListMembersParams

type ListMembersParams struct {
	TeamSlug slug.Slug
	Offset   int32
	Limit    int32
}

type ListParams

type ListParams struct {
	Offset int32
	Limit  int32
}

type Querier

type Querier interface {
	Count(ctx context.Context) (int64, error)
	CountEnvironments(ctx context.Context, teamSlug slug.Slug) (int64, error)
	CountMembers(ctx context.Context, teamSlug slug.Slug) (int64, error)
	Delete(ctx context.Context, argSlug slug.Slug) error
	Get(ctx context.Context, argSlug slug.Slug) (*Team, error)
	GetTeamRepositories(ctx context.Context, teamSlug slug.Slug) ([]string, error)
	IsTeamRepository(ctx context.Context, arg IsTeamRepositoryParams) (bool, error)
	List(ctx context.Context, arg ListParams) ([]*Team, error)
	ListEnvironments(ctx context.Context, arg ListEnvironmentsParams) ([]*TeamAllEnvironment, error)
	ListMembers(ctx context.Context, arg ListMembersParams) ([]*User, error)
	SetLastSuccessfulSync(ctx context.Context, argSlug slug.Slug) error
	UpdateExternalReferences(ctx context.Context, arg UpdateExternalReferencesParams) error
	UpsertEnvironment(ctx context.Context, arg UpsertEnvironmentParams) error
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) Count

func (q *Queries) Count(ctx context.Context) (int64, error)

func (*Queries) CountEnvironments

func (q *Queries) CountEnvironments(ctx context.Context, teamSlug slug.Slug) (int64, error)

func (*Queries) CountMembers

func (q *Queries) CountMembers(ctx context.Context, teamSlug slug.Slug) (int64, error)

func (*Queries) Delete

func (q *Queries) Delete(ctx context.Context, argSlug slug.Slug) error

func (*Queries) Get

func (q *Queries) Get(ctx context.Context, argSlug slug.Slug) (*Team, error)

func (*Queries) GetTeamRepositories

func (q *Queries) GetTeamRepositories(ctx context.Context, teamSlug slug.Slug) ([]string, error)

func (*Queries) IsTeamRepository

func (q *Queries) IsTeamRepository(ctx context.Context, arg IsTeamRepositoryParams) (bool, error)

func (*Queries) List

func (q *Queries) List(ctx context.Context, arg ListParams) ([]*Team, error)

func (*Queries) ListEnvironments

func (q *Queries) ListEnvironments(ctx context.Context, arg ListEnvironmentsParams) ([]*TeamAllEnvironment, error)

func (*Queries) ListMembers

func (q *Queries) ListMembers(ctx context.Context, arg ListMembersParams) ([]*User, error)

func (*Queries) SetLastSuccessfulSync

func (q *Queries) SetLastSuccessfulSync(ctx context.Context, argSlug slug.Slug) error

func (*Queries) UpdateExternalReferences

func (q *Queries) UpdateExternalReferences(ctx context.Context, arg UpdateExternalReferencesParams) error

func (*Queries) UpsertEnvironment

func (q *Queries) UpsertEnvironment(ctx context.Context, arg UpsertEnvironmentParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type Team

type Team struct {
	Slug                 slug.Slug
	Purpose              string
	LastSuccessfulSync   pgtype.Timestamp
	SlackChannel         string
	GoogleGroupEmail     *string
	EntraIDGroupID       *uuid.UUID
	GithubTeamSlug       *string
	GarRepository        *string
	CdnBucket            *string
	DeleteKeyConfirmedAt pgtype.Timestamptz
}

type TeamAllEnvironment

type TeamAllEnvironment struct {
	TeamSlug           slug.Slug
	Environment        string
	Gcp                bool
	GcpProjectID       *string
	ID                 uuid.UUID
	SlackAlertsChannel string
}

type UpdateExternalReferencesParams

type UpdateExternalReferencesParams struct {
	GoogleGroupEmail *string
	EntraIDGroupID   *uuid.UUID
	GithubTeamSlug   *string
	GarRepository    *string
	CdnBucket        *string
	Slug             slug.Slug
}

type UpsertEnvironmentParams

type UpsertEnvironmentParams struct {
	TeamSlug           slug.Slug
	Environment        string
	SlackAlertsChannel *string
	GcpProjectID       *string
}

type User

type User struct {
	ID         uuid.UUID
	Email      string
	Name       string
	ExternalID string
}

Jump to

Keyboard shortcuts

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