sql

package
v0.364.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 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"
)

func (*EventType) Scan

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

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 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 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)
	InsertTimelineCallEvent(ctx context.Context, arg InsertTimelineCallEventParams) error
	InsertTimelineDeploymentCreatedEvent(ctx context.Context, arg InsertTimelineDeploymentCreatedEventParams) error
	InsertTimelineDeploymentUpdatedEvent(ctx context.Context, arg InsertTimelineDeploymentUpdatedEventParams) 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) InsertTimelineCallEvent

func (q *Queries) InsertTimelineCallEvent(ctx context.Context, arg InsertTimelineCallEventParams) 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) 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