sql

package
v0.394.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 9 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 {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type EventType

type EventType string
const (
	EventTypeCall              EventType = "call"
	EventTypeLog               EventType = "log"
	EventTypeDeploymentCreated EventType = "deployment_created"
	EventTypeDeploymentUpdated EventType = "deployment_updated"
	EventTypeIngress           EventType = "ingress"
	EventTypeCronScheduled     EventType = "cron_scheduled"
	EventTypeAsyncExecute      EventType = "async_execute"
)

func (*EventType) Scan

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

type InsertTimelineAsyncExecuteEventParams added in v0.393.0

type InsertTimelineAsyncExecuteEventParams struct {
	DeploymentKey model.DeploymentKey
	RequestKey    optional.Option[string]
	TimeStamp     time.Time
	Module        string
	Verb          string
	Payload       api.EncryptedTimelineColumn
}

type InsertTimelineCallEventParams

type InsertTimelineCallEventParams struct {
	DeploymentKey    model.DeploymentKey
	RequestKey       optional.Option[string]
	ParentRequestKey optional.Option[string]
	TimeStamp        time.Time
	SourceModule     optional.Option[string]
	SourceVerb       optional.Option[string]
	DestModule       string
	DestVerb         string
	Payload          api.EncryptedTimelineColumn
}

type InsertTimelineCronScheduledEventParams added in v0.377.0

type InsertTimelineCronScheduledEventParams struct {
	DeploymentKey model.DeploymentKey
	TimeStamp     time.Time
	Module        string
	Verb          string
	Payload       api.EncryptedTimelineColumn
}

type InsertTimelineDeploymentCreatedEventParams

type InsertTimelineDeploymentCreatedEventParams struct {
	DeploymentKey model.DeploymentKey
	Language      string
	ModuleName    string
	Payload       api.EncryptedTimelineColumn
}

type InsertTimelineDeploymentUpdatedEventParams

type InsertTimelineDeploymentUpdatedEventParams struct {
	DeploymentKey model.DeploymentKey
	Language      string
	ModuleName    string
	Payload       api.EncryptedTimelineColumn
}

type InsertTimelineIngressEventParams

type InsertTimelineIngressEventParams struct {
	DeploymentKey model.DeploymentKey
	RequestKey    optional.Option[string]
	TimeStamp     time.Time
	Module        string
	Verb          string
	IngressType   string
	Payload       api.EncryptedTimelineColumn
}

type InsertTimelineLogEventParams

type InsertTimelineLogEventParams struct {
	DeploymentKey model.DeploymentKey
	RequestKey    optional.Option[string]
	TimeStamp     time.Time
	Level         int32
	Payload       api.EncryptedTimelineColumn
}

type NullEventType

type NullEventType struct {
	EventType EventType
	Valid     bool // Valid is true if EventType is not NULL
}

func (*NullEventType) Scan

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

Scan implements the Scanner interface.

func (NullEventType) Value

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

Value implements the driver Valuer interface.

type Querier

type Querier interface {
	DeleteOldTimelineEvents(ctx context.Context, timeout sqltypes.Duration, type_ EventType) (int64, error)
	// This is a dummy query to ensure that the Timeline model is generated.
	DummyQueryTimeline(ctx context.Context, id int64) (Timeline, error)
	InsertTimelineAsyncExecuteEvent(ctx context.Context, arg InsertTimelineAsyncExecuteEventParams) error
	InsertTimelineCallEvent(ctx context.Context, arg InsertTimelineCallEventParams) error
	InsertTimelineCronScheduledEvent(ctx context.Context, arg InsertTimelineCronScheduledEventParams) error
	InsertTimelineDeploymentCreatedEvent(ctx context.Context, arg InsertTimelineDeploymentCreatedEventParams) error
	InsertTimelineDeploymentUpdatedEvent(ctx context.Context, arg InsertTimelineDeploymentUpdatedEventParams) error
	InsertTimelineIngressEvent(ctx context.Context, arg InsertTimelineIngressEventParams) error
	InsertTimelineLogEvent(ctx context.Context, arg InsertTimelineLogEventParams) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) DeleteOldTimelineEvents

func (q *Queries) DeleteOldTimelineEvents(ctx context.Context, timeout sqltypes.Duration, type_ EventType) (int64, error)

func (*Queries) DummyQueryTimeline

func (q *Queries) DummyQueryTimeline(ctx context.Context, id int64) (Timeline, error)

This is a dummy query to ensure that the Timeline model is generated.

func (*Queries) InsertTimelineAsyncExecuteEvent added in v0.393.0

func (q *Queries) InsertTimelineAsyncExecuteEvent(ctx context.Context, arg InsertTimelineAsyncExecuteEventParams) error

func (*Queries) InsertTimelineCallEvent

func (q *Queries) InsertTimelineCallEvent(ctx context.Context, arg InsertTimelineCallEventParams) error

func (*Queries) InsertTimelineCronScheduledEvent added in v0.377.0

func (q *Queries) InsertTimelineCronScheduledEvent(ctx context.Context, arg InsertTimelineCronScheduledEventParams) error

func (*Queries) InsertTimelineDeploymentCreatedEvent

func (q *Queries) InsertTimelineDeploymentCreatedEvent(ctx context.Context, arg InsertTimelineDeploymentCreatedEventParams) error

func (*Queries) InsertTimelineDeploymentUpdatedEvent

func (q *Queries) InsertTimelineDeploymentUpdatedEvent(ctx context.Context, arg InsertTimelineDeploymentUpdatedEventParams) error

func (*Queries) InsertTimelineIngressEvent

func (q *Queries) InsertTimelineIngressEvent(ctx context.Context, arg InsertTimelineIngressEventParams) error

func (*Queries) InsertTimelineLogEvent

func (q *Queries) InsertTimelineLogEvent(ctx context.Context, arg InsertTimelineLogEventParams) error

func (*Queries) WithTx

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

type Timeline

type Timeline struct {
	ID              int64
	TimeStamp       time.Time
	DeploymentID    int64
	RequestID       optional.Option[int64]
	Type            EventType
	CustomKey1      optional.Option[string]
	CustomKey2      optional.Option[string]
	CustomKey3      optional.Option[string]
	CustomKey4      optional.Option[string]
	Payload         api.EncryptedTimelineColumn
	ParentRequestID optional.Option[string]
}

Jump to

Keyboard shortcuts

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