db

package
v0.0.0-...-a57b13e Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Changelog

type Changelog struct {
	ID          int64
	WorkspaceID string
	Title       pgtype.Text
	Subtitle    pgtype.Text
	SourceID    pgtype.Int8
	SourceType  NullSourceType
	LogoSrc     pgtype.Text
	LogoLink    pgtype.Text
	LogoAlt     pgtype.Text
	LogoHeight  pgtype.Text
	LogoWidth   pgtype.Text
	CreatedAt   pgtype.Timestamp
}

type ChangelogSource

type ChangelogSource struct {
	ID             pgtype.Int8
	WorkspaceID    pgtype.Text
	Owner          pgtype.Text
	Repo           pgtype.Text
	Path           pgtype.Text
	InstallationID pgtype.Int8
}

type CreateChangelogParams

type CreateChangelogParams struct {
	WorkspaceID string
	Title       pgtype.Text
	Subtitle    pgtype.Text
	LogoSrc     pgtype.Text
	LogoLink    pgtype.Text
	LogoAlt     pgtype.Text
	LogoHeight  pgtype.Text
	LogoWidth   pgtype.Text
}

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 DeleteChangelogParams

type DeleteChangelogParams struct {
	WorkspaceID string
	ID          int64
}

type GetChangelogParams

type GetChangelogParams struct {
	WorkspaceID string
	ID          int64
}

type GetChangelogRow

type GetChangelogRow struct {
	Changelog       Changelog
	ChangelogSource ChangelogSource
}

type GhSource

type GhSource struct {
	ID             int64
	WorkspaceID    string
	Owner          string
	Repo           string
	Path           string
	InstallationID int64
}

type ListChangelogsRow

type ListChangelogsRow struct {
	Changelog       Changelog
	ChangelogSource ChangelogSource
}

type NullSourceType

type NullSourceType struct {
	SourceType SourceType
	Valid      bool // Valid is true if SourceType is not NULL
}

func (*NullSourceType) Scan

func (ns *NullSourceType) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullSourceType) Value

func (ns NullSourceType) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateChangelog

func (q *Queries) CreateChangelog(ctx context.Context, arg CreateChangelogParams) (Changelog, error)

func (*Queries) DeleteChangelog

func (q *Queries) DeleteChangelog(ctx context.Context, arg DeleteChangelogParams) error

func (*Queries) GetChangelog

func (q *Queries) GetChangelog(ctx context.Context, arg GetChangelogParams) (GetChangelogRow, error)

func (*Queries) ListChangelogs

func (q *Queries) ListChangelogs(ctx context.Context, workspaceID string) ([]ListChangelogsRow, error)

func (*Queries) UpdateChangelog

func (q *Queries) UpdateChangelog(ctx context.Context, arg UpdateChangelogParams) (Changelog, error)

func (*Queries) UpdateChangelogSource

func (q *Queries) UpdateChangelogSource(ctx context.Context, arg UpdateChangelogSourceParams) error

func (*Queries) WithTx

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

type SourceType

type SourceType string
const (
	SourceTypeGitHub SourceType = "GitHub"
)

func (*SourceType) Scan

func (e *SourceType) Scan(src interface{}) error

type UpdateChangelogParams

type UpdateChangelogParams struct {
	Title       pgtype.Text
	Subtitle    pgtype.Text
	LogoSrc     pgtype.Text
	LogoLink    pgtype.Text
	LogoAlt     pgtype.Text
	LogoHeight  pgtype.Text
	LogoWidth   pgtype.Text
	WorkspaceID string
	ID          int64
}

type UpdateChangelogSourceParams

type UpdateChangelogSourceParams struct {
	SourceID    pgtype.Int8
	SourceType  NullSourceType
	WorkspaceID string
	ID          int64
}

Jump to

Keyboard shortcuts

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