repo

package
v0.0.0-...-4ae6852 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchLogEventsParams

type BatchLogEventsParams struct {
	DeploymentID   uuid.UUID
	ProjectID      uuid.UUID
	Event          string
	Message        string
	AttachmentID   uuid.NullUUID
	AttachmentType pgtype.Text
}

type CloneDeploymentFunctionsAssetsParams

type CloneDeploymentFunctionsAssetsParams struct {
	CloneDeploymentID    uuid.UUID
	OriginalDeploymentID uuid.UUID
	ExcludedIds          []uuid.UUID
}

type CloneDeploymentOpenAPIv3AssetsParams

type CloneDeploymentOpenAPIv3AssetsParams struct {
	CloneDeploymentID    uuid.UUID
	OriginalDeploymentID uuid.UUID
	ExcludedIds          []uuid.UUID
}

type CloneDeploymentPackagesParams

type CloneDeploymentPackagesParams struct {
	CloneDeploymentID    uuid.UUID
	OriginalDeploymentID uuid.UUID
	ExcludedIds          []uuid.UUID
}

type CloneDeploymentPackagesRow

type CloneDeploymentPackagesRow struct {
	ID        uuid.UUID
	PackageID uuid.UUID
	VersionID uuid.UUID
}

type CloneDeploymentParams

type CloneDeploymentParams struct {
	ID        uuid.UUID
	ProjectID uuid.UUID
}

type CloneDeploymentToolFunctionsParams

type CloneDeploymentToolFunctionsParams struct {
	CloneDeploymentID    uuid.UUID
	OriginalDeploymentID uuid.UUID
	ExcludedNames        []string
}

type CreateDeploymentFunctionsAccessParams

type CreateDeploymentFunctionsAccessParams struct {
	ProjectID     uuid.UUID
	DeploymentID  uuid.UUID
	FunctionID    uuid.UUID
	EncryptionKey conv.Secret
	BearerFormat  pgtype.Text
}

type CreateDeploymentParams

type CreateDeploymentParams struct {
	IdempotencyKey string
	UserID         string
	OrganizationID string
	ProjectID      uuid.UUID
	GithubRepo     pgtype.Text
	GithubPr       pgtype.Text
	GithubSha      pgtype.Text
	ExternalID     pgtype.Text
	ExternalUrl    pgtype.Text
}

type CreateFunctionsResourceParams

type CreateFunctionsResourceParams struct {
	DeploymentID uuid.UUID
	FunctionID   uuid.UUID
	ResourceUrn  urn.Resource
	ProjectID    uuid.UUID
	Runtime      string
	Name         string
	Description  string
	Uri          string
	Title        pgtype.Text
	MimeType     pgtype.Text
	Variables    []byte
	Meta         []byte
}

type CreateFunctionsToolParams

type CreateFunctionsToolParams struct {
	DeploymentID uuid.UUID
	FunctionID   uuid.UUID
	ToolUrn      urn.Tool
	ProjectID    uuid.UUID
	Runtime      string
	Name         string
	Description  string
	InputSchema  []byte
	Variables    []byte
	Meta         []byte
}

type CreateHTTPSecurityParams

type CreateHTTPSecurityParams struct {
	Key                 string
	DeploymentID        uuid.UUID
	ProjectID           uuid.NullUUID
	Openapiv3DocumentID uuid.NullUUID
	Type                pgtype.Text
	Name                pgtype.Text
	InPlacement         pgtype.Text
	Scheme              pgtype.Text
	BearerFormat        pgtype.Text
	EnvVariables        []string
	OauthTypes          []string
	OauthFlows          []byte
}

type CreateOpenAPIv3ToolDefinitionParams

type CreateOpenAPIv3ToolDefinitionParams struct {
	ProjectID           uuid.UUID
	DeploymentID        uuid.UUID
	Openapiv3DocumentID uuid.NullUUID
	ToolUrn             urn.Tool
	Name                string
	UntruncatedName     pgtype.Text
	Openapiv3Operation  pgtype.Text
	Summary             string
	Description         string
	Tags                []string
	Confirm             pgtype.Text
	ConfirmPrompt       pgtype.Text
	XGram               pgtype.Bool
	OriginalName        pgtype.Text
	OriginalSummary     pgtype.Text
	OriginalDescription pgtype.Text
	Security            []byte
	HttpMethod          string
	Path                string
	SchemaVersion       string
	Schema              []byte
	HeaderSettings      []byte
	QuerySettings       []byte
	PathSettings        []byte
	ServerEnvVar        string
	DefaultServerUrl    pgtype.Text
	RequestContentType  pgtype.Text
	ResponseFilter      *models.ResponseFilter
}

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
	CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}

type DangerouslyClearDeploymentHTTPSecurityParams

type DangerouslyClearDeploymentHTTPSecurityParams struct {
	ProjectID           uuid.NullUUID
	DeploymentID        uuid.UUID
	Openapiv3DocumentID uuid.NullUUID
}

type DangerouslyClearDeploymentToolsParams

type DangerouslyClearDeploymentToolsParams struct {
	ProjectID           uuid.UUID
	DeploymentID        uuid.UUID
	Openapiv3DocumentID uuid.UUID
}

type Deployment

type Deployment struct {
	ID             uuid.UUID
	Seq            int64
	UserID         string
	ProjectID      uuid.UUID
	OrganizationID string
	IdempotencyKey string
	ClonedFrom     uuid.NullUUID
	GithubRepo     pgtype.Text
	GithubPr       pgtype.Text
	GithubSha      pgtype.Text
	ExternalID     pgtype.Text
	ExternalUrl    pgtype.Text
	CreatedAt      pgtype.Timestamptz
	UpdatedAt      pgtype.Timestamptz
}

type DeploymentsFunction

type DeploymentsFunction struct {
	ID            uuid.UUID
	DeploymentID  uuid.UUID
	AssetID       uuid.UUID
	Name          string
	Slug          string
	Runtime       string
	RunnerVersion pgtype.Text
}

type DeploymentsOpenapiv3Asset

type DeploymentsOpenapiv3Asset struct {
	ID           uuid.UUID
	DeploymentID uuid.UUID
	AssetID      uuid.UUID
	Name         string
	Slug         string
}

type DescribeDeploymentPackagesRow

type DescribeDeploymentPackagesRow struct {
	DeploymentPackageID uuid.UUID
	PackageName         string
	PackageVersion      PackageVersion
}

type FunctionResourceDefinition

type FunctionResourceDefinition struct {
	ID           uuid.UUID
	ResourceUrn  urn.Resource
	ProjectID    uuid.UUID
	DeploymentID uuid.UUID
	FunctionID   uuid.UUID
	Runtime      string
	Name         string
	Description  string
	Uri          string
	Title        pgtype.Text
	MimeType     pgtype.Text
	Variables    []byte
	Meta         []byte
	CreatedAt    pgtype.Timestamptz
	UpdatedAt    pgtype.Timestamptz
	DeletedAt    pgtype.Timestamptz
	Deleted      bool
}

type FunctionToolDefinition

type FunctionToolDefinition struct {
	ID           uuid.UUID
	ToolUrn      urn.Tool
	ProjectID    uuid.UUID
	DeploymentID uuid.UUID
	FunctionID   uuid.UUID
	Runtime      string
	Name         string
	Description  string
	InputSchema  []byte
	Variables    []byte
	Meta         []byte
	CreatedAt    pgtype.Timestamptz
	UpdatedAt    pgtype.Timestamptz
	DeletedAt    pgtype.Timestamptz
	Deleted      bool
}

type GetDeploymentByIdempotencyKeyParams

type GetDeploymentByIdempotencyKeyParams struct {
	IdempotencyKey string
	ProjectID      uuid.UUID
}

type GetDeploymentByIdempotencyKeyRow

type GetDeploymentByIdempotencyKeyRow struct {
	Deployment Deployment
	Status     string
}

type GetDeploymentFunctionsParams

type GetDeploymentFunctionsParams struct {
	ProjectID    uuid.UUID
	DeploymentID uuid.UUID
}

type GetDeploymentFunctionsWithoutAccessParams

type GetDeploymentFunctionsWithoutAccessParams struct {
	DeploymentID uuid.UUID
	ProjectID    uuid.UUID
}

type GetDeploymentLogsParams

type GetDeploymentLogsParams struct {
	DeploymentID uuid.UUID
	ProjectID    uuid.UUID
	Cursor       uuid.NullUUID
}

type GetDeploymentLogsRow

type GetDeploymentLogsRow struct {
	Status         string
	ID             uuid.UUID
	Event          string
	Message        string
	AttachmentID   uuid.NullUUID
	AttachmentType pgtype.Text
	CreatedAt      pgtype.Timestamptz
}

type GetDeploymentParams

type GetDeploymentParams struct {
	ID        uuid.UUID
	ProjectID uuid.UUID
}

type GetDeploymentRow

type GetDeploymentRow struct {
	Deployment Deployment
	Status     string
}

type GetDeploymentWithAssetsParams

type GetDeploymentWithAssetsParams struct {
	ID        uuid.UUID
	ProjectID uuid.UUID
}

type GetDeploymentWithAssetsRow

type GetDeploymentWithAssetsRow struct {
	Deployment                       Deployment
	Status                           string
	DeploymentsOpenapiv3AssetID      uuid.NullUUID
	DeploymentsOpenapiv3AssetStoreID uuid.NullUUID
	DeploymentsOpenapiv3AssetName    pgtype.Text
	DeploymentsOpenapiv3AssetSlug    pgtype.Text
	DeploymentsFunctionsID           uuid.NullUUID
	DeploymentsFunctionsAssetID      uuid.NullUUID
	DeploymentsFunctionsName         pgtype.Text
	DeploymentsFunctionsSlug         pgtype.Text
	DeploymentsFunctionsRuntime      pgtype.Text
	DeploymentPackageID              uuid.NullUUID
	PackageName                      pgtype.Text
	PackageVersionMajor              pgtype.Int8
	PackageVersionMinor              pgtype.Int8
	PackageVersionPatch              pgtype.Int8
	PackageVersionPrerelease         pgtype.Text
	PackageVersionBuild              pgtype.Text
	Openapiv3ToolCount               int64
	FunctionsToolCount               int64
}

type GetFunctionCredentialsBatchParams

type GetFunctionCredentialsBatchParams struct {
	ProjectID    uuid.UUID
	DeploymentID uuid.UUID
	FunctionIds  []uuid.UUID
}

type GetFunctionCredentialsBatchRow

type GetFunctionCredentialsBatchRow struct {
	ID            uuid.UUID
	FunctionID    uuid.UUID
	EncryptionKey conv.Secret
	BearerFormat  pgtype.Text
}

type HttpSecurity

type HttpSecurity struct {
	ID                  uuid.UUID
	DeploymentID        uuid.UUID
	ProjectID           uuid.NullUUID
	Openapiv3DocumentID uuid.NullUUID
	Key                 string
	Type                pgtype.Text
	Name                pgtype.Text
	InPlacement         pgtype.Text
	Scheme              pgtype.Text
	BearerFormat        pgtype.Text
	OauthTypes          []string
	OauthFlows          []byte
	EnvVariables        []string
	CreatedAt           pgtype.Timestamptz
	UpdatedAt           pgtype.Timestamptz
	DeletedAt           pgtype.Timestamptz
	Deleted             bool
}

type HttpToolDefinition

type HttpToolDefinition struct {
	ID                  uuid.UUID
	ToolUrn             urn.Tool
	ProjectID           uuid.UUID
	DeploymentID        uuid.UUID
	Openapiv3DocumentID uuid.NullUUID
	Confirm             pgtype.Text
	ConfirmPrompt       pgtype.Text
	Summarizer          pgtype.Text
	Name                string
	UntruncatedName     pgtype.Text
	Summary             string
	Description         string
	Openapiv3Operation  pgtype.Text
	Tags                []string
	XGram               pgtype.Bool
	OriginalName        pgtype.Text
	OriginalSummary     pgtype.Text
	OriginalDescription pgtype.Text
	ServerEnvVar        string
	DefaultServerUrl    pgtype.Text
	Security            []byte
	HttpMethod          string
	Path                string
	SchemaVersion       string
	Schema              []byte
	HeaderSettings      []byte
	QuerySettings       []byte
	PathSettings        []byte
	RequestContentType  pgtype.Text
	ResponseFilter      *models.ResponseFilter
	CreatedAt           pgtype.Timestamptz
	UpdatedAt           pgtype.Timestamptz
	DeletedAt           pgtype.Timestamptz
	Deleted             bool
}

type ListDeploymentsParams

type ListDeploymentsParams struct {
	ProjectID uuid.UUID
	Cursor    uuid.NullUUID
}

type ListDeploymentsRow

type ListDeploymentsRow struct {
	ID                  uuid.UUID
	UserID              string
	CreatedAt           pgtype.Timestamptz
	Status              string
	Openapiv3AssetCount int64
	Openapiv3ToolCount  int64
	FunctionsAssetCount int64
	FunctionsToolCount  int64
}

type LogDeploymentEventParams

type LogDeploymentEventParams struct {
	DeploymentID   uuid.UUID
	ProjectID      uuid.UUID
	Event          string
	Message        string
	AttachmentID   uuid.NullUUID
	AttachmentType pgtype.Text
}

type PackageVersion

type PackageVersion struct {
	ID           uuid.UUID
	PackageID    uuid.UUID
	DeploymentID uuid.UUID
	Visibility   string
	Major        int64
	Minor        int64
	Patch        int64
	Prerelease   pgtype.Text
	Build        pgtype.Text
	CreatedAt    pgtype.Timestamptz
	UpdatedAt    pgtype.Timestamptz
	DeletedAt    pgtype.Timestamptz
	Deleted      bool
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) BatchLogEvents

func (q *Queries) BatchLogEvents(ctx context.Context, arg []BatchLogEventsParams) (int64, error)

func (*Queries) CloneDeployment

func (q *Queries) CloneDeployment(ctx context.Context, arg CloneDeploymentParams) (uuid.UUID, error)

func (*Queries) CloneDeploymentFunctionsAssets

func (q *Queries) CloneDeploymentFunctionsAssets(ctx context.Context, arg CloneDeploymentFunctionsAssetsParams) ([]uuid.UUID, error)

func (*Queries) CloneDeploymentOpenAPIv3Assets

func (q *Queries) CloneDeploymentOpenAPIv3Assets(ctx context.Context, arg CloneDeploymentOpenAPIv3AssetsParams) ([]uuid.UUID, error)

func (*Queries) CloneDeploymentPackages

func (q *Queries) CloneDeploymentPackages(ctx context.Context, arg CloneDeploymentPackagesParams) ([]CloneDeploymentPackagesRow, error)

func (*Queries) CloneDeploymentToolFunctions

func (q *Queries) CloneDeploymentToolFunctions(ctx context.Context, arg CloneDeploymentToolFunctionsParams) ([]uuid.UUID, error)

func (*Queries) CreateDeployment

func (q *Queries) CreateDeployment(ctx context.Context, arg CreateDeploymentParams) (pgconn.CommandTag, error)

func (*Queries) CreateDeploymentFunctionsAccess

func (q *Queries) CreateDeploymentFunctionsAccess(ctx context.Context, arg CreateDeploymentFunctionsAccessParams) (uuid.UUID, error)

func (*Queries) CreateFunctionsResource

func (q *Queries) CreateFunctionsResource(ctx context.Context, arg CreateFunctionsResourceParams) (FunctionResourceDefinition, error)

func (*Queries) CreateFunctionsTool

func (q *Queries) CreateFunctionsTool(ctx context.Context, arg CreateFunctionsToolParams) (FunctionToolDefinition, error)

func (*Queries) CreateHTTPSecurity

func (q *Queries) CreateHTTPSecurity(ctx context.Context, arg CreateHTTPSecurityParams) (HttpSecurity, error)

func (*Queries) CreateOpenAPIv3ToolDefinition

func (q *Queries) CreateOpenAPIv3ToolDefinition(ctx context.Context, arg CreateOpenAPIv3ToolDefinitionParams) (HttpToolDefinition, error)

func (*Queries) DangerouslyClearDeploymentHTTPSecurity

func (q *Queries) DangerouslyClearDeploymentHTTPSecurity(ctx context.Context, arg DangerouslyClearDeploymentHTTPSecurityParams) (int64, error)

func (*Queries) DangerouslyClearDeploymentTools

func (q *Queries) DangerouslyClearDeploymentTools(ctx context.Context, arg DangerouslyClearDeploymentToolsParams) (int64, error)

func (*Queries) DescribeDeploymentPackages

func (q *Queries) DescribeDeploymentPackages(ctx context.Context, deploymentID uuid.UUID) ([]DescribeDeploymentPackagesRow, error)

func (*Queries) GetActiveDeploymentID

func (q *Queries) GetActiveDeploymentID(ctx context.Context, projectID uuid.UUID) (uuid.UUID, error)

func (*Queries) GetDeployment

func (q *Queries) GetDeployment(ctx context.Context, arg GetDeploymentParams) (GetDeploymentRow, error)

func (*Queries) GetDeploymentFunctions

func (q *Queries) GetDeploymentFunctions(ctx context.Context, arg GetDeploymentFunctionsParams) ([]DeploymentsFunction, error)

func (*Queries) GetDeploymentFunctionsWithoutAccess

func (q *Queries) GetDeploymentFunctionsWithoutAccess(ctx context.Context, arg GetDeploymentFunctionsWithoutAccessParams) ([]uuid.UUID, error)

func (*Queries) GetDeploymentLogs

func (q *Queries) GetDeploymentLogs(ctx context.Context, arg GetDeploymentLogsParams) ([]GetDeploymentLogsRow, error)

func (*Queries) GetDeploymentOpenAPIv3

func (q *Queries) GetDeploymentOpenAPIv3(ctx context.Context, deploymentID uuid.UUID) ([]DeploymentsOpenapiv3Asset, error)

func (*Queries) GetDeploymentWithAssets

func (q *Queries) GetDeploymentWithAssets(ctx context.Context, arg GetDeploymentWithAssetsParams) ([]GetDeploymentWithAssetsRow, error)

func (*Queries) GetLatestDeploymentID

func (q *Queries) GetLatestDeploymentID(ctx context.Context, projectID uuid.UUID) (uuid.UUID, error)

func (*Queries) ListDeployments

func (q *Queries) ListDeployments(ctx context.Context, arg ListDeploymentsParams) ([]ListDeploymentsRow, error)

func (*Queries) LogDeploymentEvent

func (q *Queries) LogDeploymentEvent(ctx context.Context, arg LogDeploymentEventParams) error

func (*Queries) TransitionDeployment

func (q *Queries) TransitionDeployment(ctx context.Context, arg TransitionDeploymentParams) (TransitionDeploymentRow, error)

func (*Queries) UpsertDeploymentPackage

func (q *Queries) UpsertDeploymentPackage(ctx context.Context, arg UpsertDeploymentPackageParams) (uuid.UUID, error)

func (*Queries) WithTx

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

type TransitionDeploymentParams

type TransitionDeploymentParams struct {
	DeploymentID uuid.UUID
	Status       string
	ProjectID    uuid.UUID
	Event        string
	Message      string
}

type TransitionDeploymentRow

type TransitionDeploymentRow struct {
	StatusID uuid.UUID
	Status   string
	Moved    bool
}

type UpsertDeploymentFunctionsAssetParams

type UpsertDeploymentFunctionsAssetParams struct {
	DeploymentID uuid.UUID
	AssetID      uuid.UUID
	Name         string
	Slug         string
	Runtime      string
}

type UpsertDeploymentFunctionsAssetRow

type UpsertDeploymentFunctionsAssetRow struct {
	ID      uuid.UUID
	AssetID uuid.UUID
	Name    string
	Slug    string
}

type UpsertDeploymentOpenAPIv3AssetParams

type UpsertDeploymentOpenAPIv3AssetParams struct {
	DeploymentID uuid.UUID
	AssetID      uuid.UUID
	Name         string
	Slug         string
}

type UpsertDeploymentOpenAPIv3AssetRow

type UpsertDeploymentOpenAPIv3AssetRow struct {
	ID      uuid.UUID
	AssetID uuid.UUID
	Name    string
	Slug    string
}

type UpsertDeploymentPackageParams

type UpsertDeploymentPackageParams struct {
	DeploymentID uuid.UUID
	PackageID    uuid.UUID
	VersionID    uuid.UUID
}

Jump to

Keyboard shortcuts

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